From 48249a13ad08b7c88d0e930a3f46a37731f18e11 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Tue, 19 Sep 2023 14:56:43 -0400 Subject: [PATCH 1/3] Set metric descriptions per semantic conventions --- .../src/opentelemetry/instrumentation/urllib/__init__.py | 6 +++--- .../src/opentelemetry/instrumentation/urllib3/__init__.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py index cdd35a0bad..30858ce488 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py @@ -297,17 +297,17 @@ def _create_client_histograms(meter) -> Dict[str, Histogram]: MetricInstruments.HTTP_CLIENT_DURATION: meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_DURATION, unit="ms", - description="measures the duration outbound HTTP requests", + description="Measures the duration of outbound HTTP requests.", ), MetricInstruments.HTTP_CLIENT_REQUEST_SIZE: meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_REQUEST_SIZE, unit="By", - description="measures the size of HTTP request messages (compressed)", + description="Measures the size of HTTP request messages.", ), MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE: meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE, unit="By", - description="measures the size of HTTP response messages (compressed)", + description="Measures the size of HTTP response messages.", ), } diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py index d3016ea5ee..a2197a367c 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py @@ -173,17 +173,17 @@ def _instrument(self, **kwargs): duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_DURATION, unit="ms", - description="measures the duration outbound HTTP requests", + description="Measures the duration of outbound HTTP requests.", ) request_size_histogram = meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_REQUEST_SIZE, unit="By", - description="measures the size of HTTP request messages (compressed)", + description="Measures the size of HTTP request messages.", ) response_size_histogram = meter.create_histogram( name=MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE, unit="By", - description="measures the size of HTTP response messages (compressed)", + description="Measures the size of HTTP response messages.", ) _instrument( From 6b27553f601090d22e2f94611f0bd433be682dd9 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Tue, 19 Sep 2023 16:33:39 -0400 Subject: [PATCH 2/3] Set metric descriptions per semantic conventions --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1206844e55..384c5d911b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- `opentelemetry-instrumentation-urllib` Fix metric descriptions to match semantic conventions + ([#1959]((https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1959)) +- `opentelemetry-instrumentation-urllib3` Fix metric descriptions to match semantic conventions + ([#1959]((https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1959)) + ## Version 1.20.0/0.41b0 (2023-09-01) ### Fixed From 7fd9a388a585f2b3129e3ce4094939eae4f8785e Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Thu, 12 Oct 2023 20:32:02 -0400 Subject: [PATCH 3/3] fix spelling --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f71a92db3c..27e695dc34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -366,7 +366,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-instrumentation-sqlalchemy` Added span for the connection phase ([#1133](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1133)) - Add metric instrumentation in asgi ([#1197](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1197)) -- Add metric instumentation for flask +- Add metric instrumentation for flask ([#1186](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1186)) - Add a test for asgi using NoOpTracerProvider ([#1367](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1367))