From 14932fd76cd498fb9dfa78dbd168d120bc105ef6 Mon Sep 17 00:00:00 2001 From: "allen.k1m" Date: Fri, 22 Dec 2023 08:26:11 +0900 Subject: [PATCH] include feedback --- .../src/opentelemetry/instrumentation/flask/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py index 85ac407fab..21e102dcca 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py @@ -259,10 +259,7 @@ def response_hook(span: Span, status: str, response_headers: List): from importlib import metadata except ImportError: import importlib_metadata as metadata - try: - flask_version = metadata.version("flask") - except (ImportError, metadata.PackageNotFoundError): - flask_version = "unknown" + flask_version = metadata.version("flask") from opentelemetry.instrumentation.instrumentor import BaseInstrumentor from opentelemetry.instrumentation.propagators import (