-
Notifications
You must be signed in to change notification settings - Fork 620
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
Add request and response hooks to web framework instrumentations #408
Comments
@lzchen I see you've created a bunch of issues to span name callbacks. This enables way more features while making it possible to set/update span names as well. Should I update all span name callback issues to implement request/response hooks instead? |
Yeah this solution looks better. Feel free to change the already created issues. There are also a couple of instrumentations that are already using span name callback so those would have to be changed as well. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L218 |
It'd be really nice for all web server instrumentations to provide request and response hooks so users can customize behavior (update span name, attributes, etc), record additional information from incoming/outgoing requests/responses, allow injecting tracing related data into responses such as trace response headers, etc. This should be implemented for both client and server libraries.
In order to be consistent across all instrumentations, I recommend all instrumentations follow the following guidelines:
The text was updated successfully, but these errors were encountered: