Skip to content

Commit 2dd9bd1

Browse files
lzchenocelotl
andauthored
Pass in auto-instrumentation version to configurator (#783)
* version * Update CHANGELOG.md Co-authored-by: Diego Hurtado <[email protected]>
1 parent 5f1845d commit 2dd9bd1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
([#739](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/739))
1111
- Add support for Python 3.10
1212
([#742](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/742))
13+
- Pass in auto-instrumentation version to configurator
14+
([#783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/783))
1315
- `opentelemetry-instrumentation` Add `setuptools` to `install_requires`
1416
([#781](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/781))
1517
- `opentelemetry-instrumentation-aws-lambda` Add instrumentation for AWS Lambda Service - Implementation (Part 2/2)

opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from opentelemetry.instrumentation.environment_variables import (
2727
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS,
2828
)
29+
from opentelemetry.instrumentation.version import __version__
2930

3031
logger = getLogger(__name__)
3132

@@ -101,7 +102,7 @@ def _load_configurators():
101102
)
102103
continue
103104
try:
104-
entry_point.load()().configure() # type: ignore
105+
entry_point.load()().configure(auto_instrumentation_version=__version__) # type: ignore
105106
configured = entry_point.name
106107
except Exception as exc: # pylint: disable=broad-except
107108
logger.exception("Configuration of %s failed", entry_point.name)

0 commit comments

Comments
 (0)