-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telemetry events #341
Comments
One important consideration: retries. We should think of how to instrument those, because they should not be instrumented like the whole request pipeline. Otherwise, you might end up with requests that look like they took seconds because they were retried a few times. Just putting this out there. |
I think you need at least two telemetry IMO,
|
May I add: we definitely need to have the |
Agreed, thank you for mentioning it here. |
One good example I've seen is in the stripe hex lib, where the retry count is one of the metadata fields. Works pretty ok. |
Yeah I think emitting events and having the retry information in the event itself would be enough for other libs to build stuff on top of them. |
This issue is a starting point to discuss what the API for Telemetry events (emitted by Req) will look like.
An initial sketch would be to have default events like this, resembling a
telemetry:span/3
.[:req, :request, :pipeline, :start]
[:req, :request, :pipeline, :stop]
[:req, :request, :pipeline, :exception]
These would measure the entire request pipeline.
I would love if we could also customize the prefix, something like this:
Resulting in events such as
[:my_app, :stripe_client, :pipeline, ...]
.Steps
At some point we might want to instrument steps, such as JSON decoding/encoding, but I’m not sure this is critical to get this out the door. Adding Telemetry events is not a breaking change, so this is not a blocker for 1.0.
cc @wojtekmach
The text was updated successfully, but these errors were encountered: