-
Notifications
You must be signed in to change notification settings - Fork 626
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
Consistent way of not instrumenting multiple times #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the string
_is_instrumented_by_opentelemetry
for all functionality involving indicating whether a component has been instrumented.
@lzchen this statement in the PR description was confusing to me, that variable is a boolean, not a string correct?
@codeboten |
.../opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/__init__.py
Outdated
Show resolved
Hide resolved
...tion/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
Show resolved
Hide resolved
Should this be specified in the spec or is this implementation specific details? https://github.com/open-telemetry/oteps/pull/165/files?short_path=fac8c59#diff-fac8c5914f3523b6888b428ec9eea8229238297768d93e2171418f7c45f805ce |
...tion/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for addressing my comments
Fixes #439
We use
_is_instrumented_by_opentelemetry
for all functionality involving indicating whether a component has been instrumented. This is the text that should be used for any context variable/property that is used revolving around determining whether an instrumentation is already instrumented or not.Another thing to note is the relationship between
instrument()
andinstrument_app
/instrument_connection()
etc.instrument_X()
should take priority overinstrument()
, i.e. ifuninstrument_app(app)
is called afterinstrument()
,app
should produce no telemetry.As well, calling
instrument_app(app)
afterinstrument()
should not produce double telemetry.Also a bunch of other consistency-based changes:
instrument/uninstrument_X
static methods, whereX
is a componentuninstrument_app
warning
toerror
on dependency conflict forinstrument()