Instrumentation runtime checks#475
Merged
lzchen merged 2 commits intoopen-telemetry:mainfrom May 27, 2021
Merged
Conversation
5b811ae to
8829586
Compare
49e25cb to
f84cbdf
Compare
9377231 to
e00338d
Compare
lzchen
reviewed
May 26, 2021
| # limitations under the License. | ||
|
|
||
|
|
||
| _instruments = ("boto~=2.0",) |
Contributor
There was a problem hiding this comment.
Could you include in CONTRIBUTING.MD for the instrumentation checklist that _instruments needs to be included?
Contributor
Author
There was a problem hiding this comment.
Yes. I'll do it in #514 as it includes some more changes wrt to contributing instrumentations.
lzchen
approved these changes
May 26, 2021
srikanthccv
approved these changes
May 26, 2021
opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py
Outdated
Show resolved
Hide resolved
ocelotl
approved these changes
May 26, 2021
exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/spanprocessor.py
Outdated
Show resolved
Hide resolved
e8a1574 to
0fafe94
Compare
0fafe94 to
35e7010
Compare
This was referenced May 27, 2021
adamantike
added a commit
to adamantike/opentelemetry-python-contrib
that referenced
this pull request
Jul 22, 2021
Since the introduction of the `_instruments` runtime checks in open-telemetry#475, the FastAPI instrumentation has stopped working for versions >= `0.59.0`. However the current test suite passes even for the latest released version at the moment (`0.67.0`). It seems this isn't related to a limitation in the instrumentation code, but actually because of it being created when `0.58` was the latest version: open-telemetry/opentelemetry-python@7bec76a.
7 tasks
adamantike
added a commit
to adamantike/opentelemetry-python-contrib
that referenced
this pull request
Jul 22, 2021
Since the introduction of the `_instruments` runtime checks in open-telemetry#475, the FastAPI instrumentation has stopped working for versions >= `0.59.0`. However the current test suite passes even for the latest released version at the moment (`0.67.0`). It seems this isn't related to a limitation in the instrumentation code, but actually because of it being created when `0.58` was the latest version: open-telemetry/opentelemetry-python@7bec76a.
owais
added a commit
that referenced
this pull request
Aug 24, 2021
* Allow instrumentation of newer FastAPI versions Since the introduction of the `_instruments` runtime checks in #475, the FastAPI instrumentation has stopped working for versions >= `0.59.0`. However the current test suite passes even for the latest released version at the moment (`0.67.0`). It seems this isn't related to a limitation in the instrumentation code, but actually because of it being created when `0.58` was the latest version: open-telemetry/opentelemetry-python@7bec76a. * Add changelog entry Co-authored-by: Owais Lone <owais@users.noreply.github.com>
6 tasks
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.
Description
This change updates instrumentations to remove the instrumented libraries as install time dependencies. It also adds runtime checks to instrumentations so they don't try to instrument unsupported versions of a library.
Effectively this means installing instrumentations will not automatically install the instrumented libraries. For example:
opentelemetry-instrumentation-requestswill not installrequests.Manual instrumentation
ImportError.Auto instrumentation (via opentelemetry-instrument command)
Updated logic is mostly contained in the opentelemetry-instrumentation package. Look at
instrumentors.BaseInsrumentorandsitecustomize._load_instrumentors. Rest of the changes are just about updating packaging/layout for all instrumentations.Implements a solution for: open-telemetry/opentelemetry-python#1729
Includes changes from #474. Will get simpler once that is merged.
Blocks #514
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.