Request/Response hooks for Tornado server and client#426
Request/Response hooks for Tornado server and client#426codeboten merged 1 commit intoopen-telemetry:mainfrom
Conversation
|
|
||
| # apply tornado instrumentation | ||
| TornadoInstrumentor().instrument() | ||
| # TornadoInstrumentor().instrument() |
There was a problem hiding this comment.
Do we need this to be commented?
.../opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
Show resolved
Hide resolved
.../opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
Show resolved
Hide resolved
| span.set_attribute(key, value) | ||
|
|
||
| with trace.use_span(span): | ||
| if request_hook: |
There was a problem hiding this comment.
Any difference between calling request_hook within the use_span vs outside?
There was a problem hiding this comment.
Should be called right after the span is created right?
There was a problem hiding this comment.
No difference really. I'll move it out to avoid any future confusion.
| @@ -0,0 +1,7 @@ | |||
| OpenTelemetry Tornado Instrumentation | |||
There was a problem hiding this comment.
Is this the right place for this doc? i'm confused about the tornado/starlette/tornado.rst path.
There was a problem hiding this comment.
Sorry about that. No idea how that happened. My guess is an unintentional drag in vscode sidebar :)
codeboten
left a comment
There was a problem hiding this comment.
Thanks for addressing my comment!
|
@owais please address the conflicts so we can get this merged |
|
@codeboten updated. |
Description
Adds support for request and response hooks to Falcon instrumentation. Given how tornado works, we only have a single hook that gets called once per request. It gets passed the active handler instead of request/response objects.
Fixes #132
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.