From 1cfb5776dbec6d8e3bb500e1bbbfd33c5bf3985d Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 26 Nov 2024 08:10:56 +0100 Subject: [PATCH 1/2] starlette: Replace `_meter_provider` by `meter_provider` on `_instrument` --- CHANGELOG.md | 1 + .../src/opentelemetry/instrumentation/starlette/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173abf88f4..b619e55694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- `opentelemetry-instrumentation-starlette`: Retrieve `meter_provider` key instead of `_meter_provider` on `_instrument` - `opentelemetry-instrumentation-httpx`: instrument_client is a static method again ([#3003](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3003)) - `opentelemetry-instrumentation-system_metrics`: fix callbacks reading wrong config diff --git a/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py index 50d2fb03d8..820fa29411 100644 --- a/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/__init__.py @@ -265,7 +265,7 @@ def _instrument(self, **kwargs): _InstrumentedStarlette._client_response_hook = kwargs.get( "client_response_hook" ) - _InstrumentedStarlette._meter_provider = kwargs.get("_meter_provider") + _InstrumentedStarlette._meter_provider = kwargs.get("meter_provider") applications.Starlette = _InstrumentedStarlette From 9359d21bc7f4ba99fc4b798e157fe8485ef840d5 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 26 Nov 2024 08:11:47 +0100 Subject: [PATCH 2/2] Add PR on the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b619e55694..b66c98479c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `opentelemetry-instrumentation-starlette`: Retrieve `meter_provider` key instead of `_meter_provider` on `_instrument` + ([#3048](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3048)) - `opentelemetry-instrumentation-httpx`: instrument_client is a static method again ([#3003](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3003)) - `opentelemetry-instrumentation-system_metrics`: fix callbacks reading wrong config