Skip to content

Commit

Permalink
Merge branch 'main' into instrumentationServiceFabricRemoting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Dec 9, 2024
2 parents cbf8040 + 5811e1d commit aed82ee
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* `TelemetryHttpModule` will now pass the `url.path` tag (set to
[Request.Unvalidated.Path](https://learn.microsoft.com/dotnet/api/system.web.unvalidatedrequestvalues.path))
when starting `Activity` instances for incoming requests so that it is
Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Updated registration extension code to retrieve environment variables through
`IConfiguration`.
([#1976](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1976))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#if !NET
using OpenTelemetry.Instrumentation.AspNetCore;
using OpenTelemetry.Instrumentation.AspNetCore.Implementation;
#endif
using OpenTelemetry.Internal;

namespace OpenTelemetry.Metrics;
Expand All @@ -22,27 +18,15 @@ public static class AspNetCoreInstrumentationMeterProviderBuilderExtensions
public static MeterProviderBuilder AddAspNetCoreInstrumentation(
this MeterProviderBuilder builder)
{
Guard.ThrowIfNull(builder);

#if NET
return builder.ConfigureMeters();
#else
// Note: Warm-up the status code and method mapping.
_ = TelemetryHelper.BoxedStatusCodes;
_ = TelemetryHelper.RequestDataHelper;

builder.AddMeter(HttpInMetricsListener.InstrumentationName);
#if NETSTANDARD2_0_OR_GREATER
if (Environment.Version.Major < 8)
{
throw new PlatformNotSupportedException("Metrics instrumentation is not supported when executing on .NET 7 and lower.");
}

#pragma warning disable CA2000
builder.AddInstrumentation(new AspNetCoreMetrics());
#pragma warning restore CA2000

return builder;
#endif
}
Guard.ThrowIfNull(builder);

internal static MeterProviderBuilder ConfigureMeters(this MeterProviderBuilder builder)
{
return builder
.AddMeter("Microsoft.AspNetCore.Hosting")
.AddMeter("Microsoft.AspNetCore.Server.Kestrel")
Expand Down
41 changes: 0 additions & 41 deletions src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreMetrics.cs

This file was deleted.

7 changes: 6 additions & 1 deletion src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## Unreleased

## 1.10.0

Released 2024-Dec-09

* Drop support for .NET 6 as this target is no longer supported.
([#2138](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2138))
([#2138](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2138),
([#2360](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2360))

* Updated OpenTelemetry core component version(s) to `1.10.0`.
([#2317](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2317))
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>ASP.NET Core instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing;AspNetCore</PackageTags>
<MinVerTagPrefix>Instrumentation.AspNetCore-</MinVerTagPrefix>
<PackageValidationBaselineVersion>1.9.0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>1.10.0</PackageValidationBaselineVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
31 changes: 0 additions & 31 deletions src/OpenTelemetry.Instrumentation.AspNetCore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,8 @@ public void ConfigureServices(IServiceCollection services)
}
```

Following list of attributes are added by default on
`http.server.request.duration` metric. See
[http-metrics](https://github.com/open-telemetry/semantic-conventions/tree/v1.23.0/docs/http/http-metrics.md)
for more details about each individual attribute. `.NET8.0` and above supports
additional metrics, see [list of metrics produced](#list-of-metrics-produced) for
more details.

* `error.type`
* `http.response.status_code`
* `http.request.method`
* `http.route`
* `network.protocol.version`
* `url.scheme`

#### List of metrics produced

When the application targets `.NET6.0` or `.NET7.0`, the instrumentation emits
the following metric:

| Name | Details |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `http.server.request.duration` | [Specification](https://github.com/open-telemetry/semantic-conventions/blob/release/v1.23.x/docs/http/http-metrics.md#metric-httpserverrequestduration) |

Starting from `.NET8.0`, metrics instrumentation is natively implemented, and
the ASP.NET Core library has incorporated support for [built-in
metrics](https://learn.microsoft.com/dotnet/core/diagnostics/built-in-metrics-aspnetcore)
Expand Down Expand Up @@ -164,16 +143,6 @@ to achieve this.
> There is no difference in features or emitted metrics when enabling metrics
using `AddMeter()` or `AddAspNetCoreInstrumentation()` on `.NET8.0` and newer
versions.
<!-- This comment is to make sure the two notes above and below are not merged -->
> [!NOTE]
> The `http.server.request.duration` metric is emitted in `seconds` as per the
semantic convention. While the convention [recommends using custom histogram
buckets](https://github.com/open-telemetry/semantic-conventions/blob/release/v1.23.x/docs/http/http-metrics.md)
, this feature is not yet available via .NET Metrics API. A
[workaround](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4820)
has been included in OTel SDK starting version `1.6.0` which applies recommended
buckets by default for `http.server.request.duration`. This applies to all
targeted frameworks.

## Advanced configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* The new database semantic conventions can be opted in to by setting
the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable. This allows for a
transition period for users to experiment with the new semantic conventions
Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.GrpcNetClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Drop support for .NET 6 as this target is no longer supported.
([#2150](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2150))

Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.Process/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Updated OpenTelemetry core component version(s) to `1.10.0`.
([#2317](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2317))

Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.Quartz/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Updated OpenTelemetry core component version(s) to `1.10.0`.
([#2317](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2317))

Expand Down
8 changes: 7 additions & 1 deletion src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Drop support for .NET 6 as this target is no longer supported.
([#2159](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2159))

Expand Down Expand Up @@ -52,11 +56,13 @@
([#2277](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2277))

* **Breaking change**: The `SetDbStatementForStoredProcedure` option has been removed.
([#TBD](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/TBD))
([#2284](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2284))

* Add support for metric `db.client.operation.duration`
from [new database semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/v1.28.0/docs/database/database-metrics.md#metric-dbclientoperationduration)
on .NET 8+.
([#2309](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2309))

* Add support for metric `db.client.operation.duration`
from [new database semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/v1.28.0/docs/database/database-metrics.md#metric-dbclientoperationduration)
on .NET Framework.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.10.0-beta.1

Released 2024-Dec-09

* Drop support for .NET 6 as this target is no longer supported and add .NET 8 target.
([#2160](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2160))

Expand Down
Loading

0 comments on commit aed82ee

Please sign in to comment.