From 8a89a69445a1f89917a6a159e895b9267c7cc925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 19 Jan 2024 16:21:02 +0100 Subject: [PATCH] ASP.NET and OWIN Instrumentations - fix description for `http.server.request.duration` metric (#1538) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mateusz Łach --- src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md | 3 +++ .../Implementation/HttpInMetricsListener.cs | 2 +- src/OpenTelemetry.Instrumentation.AspNet/README.md | 2 +- src/OpenTelemetry.Instrumentation.Owin/CHANGELOG.md | 2 ++ .../Implementation/OwinInstrumentationMetrics.cs | 2 +- src/OpenTelemetry.Instrumentation.Owin/README.md | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md index f58e6394ad..245eb9612b 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Fix description for `http.server.request.duration` metric. + ([#1538](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1538)) + ## 1.7.0-beta.1 Released 2023-Dec-20 diff --git a/src/OpenTelemetry.Instrumentation.AspNet/Implementation/HttpInMetricsListener.cs b/src/OpenTelemetry.Instrumentation.AspNet/Implementation/HttpInMetricsListener.cs index 93afb6ddc1..9200911cb9 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet/Implementation/HttpInMetricsListener.cs +++ b/src/OpenTelemetry.Instrumentation.AspNet/Implementation/HttpInMetricsListener.cs @@ -21,7 +21,7 @@ public HttpInMetricsListener(Meter meter, AspNetMetricsInstrumentationOptions op this.httpServerDuration = meter.CreateHistogram( "http.server.request.duration", unit: "s", - description: "Measures the duration of inbound HTTP requests."); + description: "Duration of HTTP server requests."); TelemetryHttpModule.Options.OnRequestStoppedCallback += this.OnStopActivity; this.options = options; } diff --git a/src/OpenTelemetry.Instrumentation.AspNet/README.md b/src/OpenTelemetry.Instrumentation.AspNet/README.md index 7bac6bba39..e33ae97dc6 100644 --- a/src/OpenTelemetry.Instrumentation.AspNet/README.md +++ b/src/OpenTelemetry.Instrumentation.AspNet/README.md @@ -126,7 +126,7 @@ Currently, the instrumentation supports the following metric. | Name | Instrument Type | Unit | Description | |-------|-----------------|------|-------------| -| `http.server.duration` | Histogram | `ms` | Measures the duration of inbound HTTP requests. | +| `http.server.request.duration` | Histogram | `s` | Duration of HTTP server requests. | ## Advanced trace configuration diff --git a/src/OpenTelemetry.Instrumentation.Owin/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.Owin/CHANGELOG.md index b818af9fb5..bbf1bd73d9 100644 --- a/src/OpenTelemetry.Instrumentation.Owin/CHANGELOG.md +++ b/src/OpenTelemetry.Instrumentation.Owin/CHANGELOG.md @@ -8,6 +8,8 @@ ([#929](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/929)) * Adds HTTP server metrics via `AddOwinInstrumentation` extension method on `MeterProviderBuilder` ([#1335](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1335)) +* Fix description for `http.server.request.duration` metric. + ([#1538](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1538)) ## 1.0.0-rc.3 diff --git a/src/OpenTelemetry.Instrumentation.Owin/Implementation/OwinInstrumentationMetrics.cs b/src/OpenTelemetry.Instrumentation.Owin/Implementation/OwinInstrumentationMetrics.cs index e984eb8c9c..a1d2f5a0a5 100644 --- a/src/OpenTelemetry.Instrumentation.Owin/Implementation/OwinInstrumentationMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.Owin/Implementation/OwinInstrumentationMetrics.cs @@ -14,5 +14,5 @@ internal static class OwinInstrumentationMetrics public static Meter Instance => new Meter(MeterName, AssemblyName.Version.ToString()); - public static Histogram HttpServerDuration => Instance.CreateHistogram("http.server.request.duration", "s", "Measures the duration of inbound HTTP requests."); + public static Histogram HttpServerDuration => Instance.CreateHistogram("http.server.request.duration", "s", "Duration of HTTP server requests."); } diff --git a/src/OpenTelemetry.Instrumentation.Owin/README.md b/src/OpenTelemetry.Instrumentation.Owin/README.md index efc1d3d5e3..31afb50349 100644 --- a/src/OpenTelemetry.Instrumentation.Owin/README.md +++ b/src/OpenTelemetry.Instrumentation.Owin/README.md @@ -75,7 +75,7 @@ Currently, the instrumentation supports the following metric. | Name | Instrument Type | Unit | Description | |-------|-----------------|------|-------------| -| `http.server.request.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. | +| `http.server.request.duration` | Histogram | `s` | Duration of HTTP server requests. | ## Customize OWIN span names