-
Notifications
You must be signed in to change notification settings - Fork 78
Vendor instrumentations #280
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
Vendor instrumentations #280
Conversation
azure-monitor-opentelemetry/azure/monitor/opentelemetry/vendor/wrapt/arguments.py
Outdated
Show resolved
Hide resolved
200484b to
75044bb
Compare
75044bb to
9348ee4
Compare
azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py
Outdated
Show resolved
Hide resolved
...ntelemetry/azure/monitor/opentelemetry/vendor/opentelemetry/instrumentation/asgi/__init__.py
Outdated
Show resolved
Hide resolved
azure-monitor-opentelemetry/azure/monitor/opentelemetry/vendor/opentelemetry/__init__.py
Show resolved
Hide resolved
...r-opentelemetry/azure/monitor/opentelemetry/vendor/opentelemetry/instrumentation/__init__.py
Show resolved
Hide resolved
...ntelemetry/azure/monitor/opentelemetry/vendor/opentelemetry/instrumentation/asgi/__init__.py
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,661 @@ | |||
| # Copyright The OpenTelemetry Authors | |||
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.
What are the legal implications of using two copyrights and will this affect us negatively in the future if we don't have the Microsoft license? I remember having issues with azure-sdk if the code isn't under the MiT license. Might be a good question to ask CELA/azure-sdk
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.
Asked Anna.
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.
What is the verdict?
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.
On vacation until June 15th. Will ask someone else.
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.
Kashif recommended I ask a lawyer.
|
Just to confirm, these were copied from the production version of the instrumentations on Pypi correct? |
comments+docstrings
72897c4 to
3d0dc62
Compare
comments+docstrings
…oss/ApplicationInsights-Python into vendor-instrumentations
748f0b7 to
58f20ec
Compare
| @@ -0,0 +1,134 @@ | |||
| # Copyright The OpenTelemetry Authors | |||
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.
Would the existence of another sizecustomize.py mess up the autoinstrumentation we already have?
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.
No. Sitecustomize needs to be pointed to. They would have to manually set their python path to point here to intentionally use this script.
|
What is the behavior when user uses the distro AND manually instruments with new versions of the supported instrumentations, now that we are vendoring current versions of the instrumentations? |
After some testing, I have determined that our vendored instrumentation is considered different than any instrumentation the Cx may put on top of it. Because "_is_instrumented_by_opentelemetry" is a class level variable and our vendored instrumentations are in a different module, if the Cx uses our vendored instrumentation and then triggers there own, the 2nd will occur without the "Attempting to instrument while already instrumented" message. THe 2nd instrumentation seems to overwrite the vendored 1st one. I think this is the appropriate approach because it means our instrumentation does not interfere with the Cx's. |
Does that mean user will get duplicate telemetry? |
No duplication will occur. |
Vendored with the following logic:
_SUPPORTED_INSTRUMENTED_LIBRARIES_TO_INSTRUMENTS_MAPSince I need code to be used to pass lint, I did not separate this pr. But I have separated the vendor folder as the first commit to make reviewing easier.