From bfaabbf7e198855fa6356f573b0db89f42e94a32 Mon Sep 17 00:00:00 2001 From: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:39:06 -0500 Subject: [PATCH] Make Falcon instrumentation compatible with Falcon >=3 (#607) * Make Falcon instrumentation compatible with Falcon >=3 Replace falcon.api.Request -> falcon.Request which exists on both Falcon 2 & 3 * Update package.py * Update CHANGELOG.md * update tox.ini * revert changes to tox.ini to test failures * Update package.py Co-authored-by: Owais Lone --- CHANGELOG.md | 2 ++ .../src/opentelemetry/instrumentation/falcon/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d6da182c..9a43525b65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#595](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/595)) ### Changed +- `opentelemetry-instrumentation-falcon` added support for Falcon 3. + ([#607](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/607)) - `opentelemetry-instrumentation-tornado` properly instrument work done in tornado on_finish method. ([#499](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/499)) - `opentelemetry-instrumentation` Fixed cases where trying to use an instrumentation package without the 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 2d4992072c..8d05ea73b3 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py @@ -126,7 +126,7 @@ def response_hook(span, req, resp): _excluded_urls = get_excluded_urls("FALCON") _traced_request_attrs = get_traced_request_attrs("FALCON") -_response_propagation_setter = FuncSetter(falcon.api.Response.append_header) +_response_propagation_setter = FuncSetter(falcon.Response.append_header) class FalconInstrumentor(BaseInstrumentor):