From 43e0972aeaa133bdc9a8b3afcbd3770c81940ab7 Mon Sep 17 00:00:00 2001 From: Daisuke Taniwaki Date: Fri, 30 Apr 2021 00:08:18 +0900 Subject: [PATCH] Fix traced_request_attrs (#473) --- CHANGELOG.md | 3 +++ .../src/opentelemetry/instrumentation/falcon/__init__.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9c64ba9a..1d042f845b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/open-telemetry/opentelemetry-python-contrib/compare/v0.200...HEAD) ### Changed + - `opentelemetry-propagator-ot-trace` Use `TraceFlags` object in `extract` ([#472](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/472)) +- Set the `traced_request_attrs` of FalconInstrumentor by an argument correctly. + ([#473](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/473)) ### Added - Move `opentelemetry-instrumentation` from core repository diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py index cf3fdf2867..bae6838e77 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py @@ -154,7 +154,7 @@ def __init__(self, *args, **kwargs): trace_middleware = _TraceMiddleware( self._tracer, - kwargs.pop("traced_request_attributes", None), + kwargs.pop("traced_request_attributes", _traced_request_attrs), kwargs.pop("request_hook", None), kwargs.pop("response_hook", None), ) @@ -215,7 +215,7 @@ def __init__( response_hook=None, ): self.tracer = tracer - self._traced_request_attrs = _traced_request_attrs + self._traced_request_attrs = traced_request_attrs self._request_hook = request_hook self._response_hook = response_hook