avoid double instrumentation of callables#708
Merged
Conversation
To achieve this, we use our own FunctionWrapper subclass, and check if the callable is already of that type. This only works if we are the only module that wraps the original function. If other providers are also wrapping the callable, we might miss it.
8b16a78 to
d27bb75
Compare
basepi
approved these changes
Feb 3, 2020
basepi
left a comment
Contributor
There was a problem hiding this comment.
Excellent work. A very clean solution. 👍
…pm-agent-python into avoid-double-instrumentation
beniwohli
added a commit
to beniwohli/apm-agent-python
that referenced
this pull request
Sep 14, 2021
* avoid double instrumentation of callables To achieve this, we use our own FunctionWrapper subclass, and check if the callable is already of that type. This only works if we are the only module that wraps the original function. If other providers are also wrapping the callable, we might miss it. * updated changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this pull request do?
To achieve this, we use our own FunctionWrapper subclass,
and check if the callable is already of that type.
This only works if we are the only module that wraps the
original function. If other providers are also wrapping
the callable, we might miss it.
Why is it important?
It might be possible in certain cases that a module
is instrumented twice.
Related issues
Fixes #695