Released 2025-Nov-13
-
Update .NET 10.0 NuGet package versions from
10.0.0-rc.2.25502.107to10.0.0. (#3403) -
Updated OpenTelemetry core component version(s) to
1.14.0. (#3403)
Released 2025-Nov-05
- Add support for .NET 10.0. (#2822)
Released 2025-Oct-22
-
Added support for listening to ASP.NET Core Blazor activities. Configurable with the
AspNetCoreTraceInstrumentationOptions.EnableRazorComponentsSupportoption which defaults totrue. Only applies to .NET 10.0 or greater. (#3012) -
Following metrics will now be enabled by default when targeting
.NET10.0or newer framework:- Meter :
Microsoft.AspNetCore.MemoryPoolaspnetcore.memory_pool.pooledaspnetcore.memory_pool.evictedaspnetcore.memory_pool.allocatedaspnetcore.memory_pool.rented
- Meter :
Microsoft.AspNetCore.Authenticationaspnetcore.authentication.authenticate.durationaspnetcore.authentication.challengesaspnetcore.authentication.forbidsaspnetcore.authentication.sign_insaspnetcore.authentication.sign_outs
- Meter :
Microsoft.AspNetCore.Authorizationaspnetcore.authorization.attempts
- Meter :
Microsoft.AspNetCore.Identityaspnetcore.identity.user.create.durationaspnetcore.identity.user.update.durationaspnetcore.identity.user.delete.durationaspnetcore.identity.user.check_password_attemptsaspnetcore.identity.user.generated_tokensaspnetcore.identity.user.verify_token_attemptsaspnetcore.identity.sign_in.authenticate.durationaspnetcore.identity.sign_in.check_password_attemptsaspnetcore.identity.sign_in.sign_insaspnetcore.identity.sign_in.sign_outsaspnetcore.identity.sign_in.two_factor_clients_rememberedaspnetcore.identity.sign_in.two_factor_clients_forgotten
- Meter :
Microsoft.AspNetCore.Componentsaspnetcore.components.navigateaspnetcore.components.handle_event.duration
- Meter :
Microsoft.AspNetCore.Components.Lifecycleaspnetcore.components.update_parameters.durationaspnetcore.components.render_diff.durationaspnetcore.components.render_diff.size
- Meter :
Microsoft.AspNetCore.Components.Server.Circuitsaspnetcore.components.circuit.activeaspnetcore.components.circuit.connectedaspnetcore.components.circuit.duration
For details about each individual metric check ASP.NET Core docs page. (#3012)
- Meter :
-
Updated OpenTelemetry core component version(s) to
1.13.1. (#3218)
Released 2025-May-05
- Updated OpenTelemetry core component version(s) to
1.12.0. (#2725)
Released 2025-Mar-05
-
Added support for listening to ASP.NET Core SignalR activities. Configurable with the
AspNetCoreTraceInstrumentationOptions.EnableAspNetCoreSignalRSupportoption which defaults totrue. Only applies to .NET 9.0 or greater. (#2539) -
Updated OpenTelemetry core component version(s) to
1.11.2. (#2582)
Released 2025-Jan-27
-
The
http.server.request.durationhistogram (measured in seconds) produced by the metrics instrumentation in this package now uses the Advice API to set default explicit buckets following the OpenTelemetry Specification. (#2430) -
Updated OpenTelemetry core component version(s) to
1.11.1. (#2477)
Released 2024-Dec-10
- Metric support for the .NET Standard target was removed by mistake in 1.10.0. This functionality has been restored. (#2403)
Released 2024-Dec-09
-
Drop support for .NET 6 as this target is no longer supported. (#2138)
-
Updated OpenTelemetry core component version(s) to
1.10.0. (#2317)
Released 2024-Jun-17
- Updated OpenTelemetry core component version(s) to
1.9.0. (#1888)
Released 2024-Apr-12
- Breaking Change: Fixed tracing instrumentation so that by default any
values detected in the query string component of requests are replaced with
the text
Redactedwhen building theurl.querytag. For example,?key1=value1&key2=value2becomes?key1=Redacted&key2=Redacted. You can disable this redaction by setting the environment variableOTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTIONtotrue. (#5532)
Released 2024-Apr-04
-
Fixed an issue for spans when
server.portattribute was not set withserver.addresswhen it has default values (80forHTTPand443forHTTPSprotocol). (#5419) -
Fixed an issue where the
http.request.method_originalattribute was not set on activity. Now, whenhttp.request.methodis set and the original method is converted to its canonical form (e.g.,Getis converted toGET), the original valueGetwill be stored inhttp.request.method_original. (#5471) -
Fixed the name of spans that have
http.request.methodattribute set to_OTHER. The span name will be set asHTTP {http.route}as per the specification. (#5484)
Released 2024-Feb-09
-
Fixed issue #4466 where the activity instance returned by
Activity.Currentwas different than instance obtained fromIHttpActivityFeature.Activity. (#5136) -
Fixed an issue where the
http.routeattribute was not set on either theActivityorhttp.server.request.durationmetric generated from a request when an exception handling middleware is invoked. One caveat is that this fix does not address the problem for thehttp.server.request.durationmetric when running ASP.NET Core 8. ASP.NET Core 8 contains an equivalent fix which should ship in version 8.0.2 (see: dotnet/aspnetcore#52652). (#5135) -
Fixes scenario when the
net6.0target of this library is loaded into a .NET 7+ process and the instrumentation does not behave as expected. This is an unusual scenario that does not affect users consuming this package normally. This fix is primarily to support the opentelemetry-dotnet-instrumentation project. (#5252)
Released 2023-Dec-13
Released 2023-Dec-13
- Re-introduced support for gRPC instrumentation as an opt-in experimental
feature. From now onwards, gRPC can be enabled by setting
OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_ENABLE_GRPC_INSTRUMENTATIONflag toTrue.OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_ENABLE_GRPC_INSTRUMENTATIONcan be set as an environment variable or via IConfiguration. The change is introduced in order to support stable release ofhttpinstrumentation. Semantic conventions for RPC is still experimental and hence the package will only support it as an opt-in experimental feature. Note that the support was removed in1.6.0-rc.1version of the package and versions released before1.6.0-rc.1had gRPC instrumentation enabled by default. (#5130)
Released 2023-Dec-01
-
Removed support for
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable. The library will now emit only the stable semantic conventions. (#5066) -
Removed
netstandard2.1target. (#5094) -
Removed support for grpc instrumentation to unblock stable release of http instrumentation. For details, see issue #5098 (#5097)
-
Breaking Change : Renamed
AspNetCoreInstrumentationOptionstoAspNetCoreTraceInstrumentationOptions. (#5108)
Released 2023-Nov-17
-
Removed the Activity Status Description that was being set during exceptions. Activity Status will continue to be reported as
Error. This is a breaking change.EnrichWithExceptioncan be leveraged to restore this behavior. (#5025) -
Updated
http.request.methodto match specification guidelines.- For activity, if the method does not belong to one of the known
values
then the request method will be set on an additional tag
http.request.method.originalandhttp.request.methodwill be set to_OTHER. - For metrics, if the original method does not belong to one of the known
values
then
http.request.methodonhttp.server.request.durationmetric will be set to_OTHER
http.request.methodis set onhttp.server.request.durationmetric or activity whenOTEL_SEMCONV_STABILITY_OPT_INenvironment variable is set tohttporhttp/dup. (#5001) - For activity, if the method does not belong to one of the known
values
then the request method will be set on an additional tag
-
An additional attribute
error.typewill be added to activity andhttp.server.request.durationmetric when the request results in unhandled exception. The attribute value will be set to full name of exception type.The attribute will only be added when
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable is set tohttporhttp/dup. (#4986) -
Fixed
network.protocol.versionattribute values to match the specification. (#5007) -
Calls to
/metricswill now be included in thehttp.server.request.durationmetric. This change may affect Prometheus pull scenario if the Prometheus server sends request to the scraping endpoint that contains/metricsin path. (#5044) -
Fixes the
http.routeattribute for scenarios in which it was previously missing or incorrect. Additionally, thehttp.routeattribute is now the same for both the metric andActivityemitted for a request. Lastly, theActivity.DisplayNamehas been adjusted to have the format{http.request.method} {http.route}to conform with the specification. There remain scenarios when using conventional routing or Razor pages wherehttp.routeis still incorrect. See #5056 and #5057 for more details. (#5026) -
Removed
network.protocol.namefromhttp.server.request.durationmetric as per spec. (#5049)
Released 2023-Oct-26
-
Introduced a new metric,
http.server.request.durationmeasured in seconds. The OTel SDK (starting with version 1.6.0) applies custom histogram buckets for this metric to comply with the Semantic Convention for Http Metrics. This new metric is only available for users who opt-in to the new semantic convention by configuring theOTEL_SEMCONV_STABILITY_OPT_INenvironment variable to eitherhttp(to emit only the new metric) orhttp/dup(to emit both the new and old metrics). (#4802)- New metric:
http.server.request.duration- Unit:
s(seconds) - Histogram Buckets:
0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
- Unit:
- Old metric:
http.server.duration- Unit:
ms(milliseconds) - Histogram Buckets:
0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000
- Unit:
Note: the older
http.server.durationmetric andOTEL_SEMCONV_STABILITY_OPT_INenvironment variable will eventually be removed after the HTTP semantic conventions are marked stable. At which time this instrumentation can publish a stable release. Refer to the specification for more information regarding the new HTTP semantic conventions for both spans and metrics. - New metric:
-
Following metrics will now be enabled by default when targeting
.NET8.0or newer framework:-
Meter :
Microsoft.AspNetCore.Hostinghttp.server.request.durationhttp.server.active_requests
-
Meter :
Microsoft.AspNetCore.Server.Kestrelkestrel.active_connectionskestrel.connection.durationkestrel.rejected_connectionskestrel.queued_connectionskestrel.queued_requestskestrel.upgraded_connectionskestrel.tls_handshake.durationkestrel.active_tls_handshakes
-
Meter :
Microsoft.AspNetCore.Http.Connectionssignalr.server.connection.durationsignalr.server.active_connections
-
Meter :
Microsoft.AspNetCore.Routingaspnetcore.routing.match_attempts
-
Meter :
Microsoft.AspNetCore.Diagnosticsaspnetcore.diagnostics.exceptions
-
Meter :
Microsoft.AspNetCore.RateLimitingaspnetcore.rate_limiting.active_request_leasesaspnetcore.rate_limiting.request_lease.durationaspnetcore.rate_limiting.queued_requestsaspnetcore.rate_limiting.request.time_in_queueaspnetcore.rate_limiting.requests
For details about each individual metric check ASP.NET Core docs page.
NOTES:
- When targeting
.NET8.0framework or newer,http.server.request.durationmetric will only follow v1.22.0 semantic conventions specification. Ability to switch behavior to older conventions usingOTEL_SEMCONV_STABILITY_OPT_INenvironment variable is not available. - Users can opt-out of metrics that are not required using views.
(#4934)
-
-
Added
network.protocol.namedimension tohttp.server.request.durationmetric. This change only affects users settingOTEL_SEMCONV_STABILITY_OPT_INtohttporhttp/dup. (#4934) -
Breaking: Removed
EnrichandFiltersupport for metrics instrumentation. With this change,AspNetCoreMetricsInstrumentationOptionsis no longer available. (#4981)-
Enrichmigration:An enrichment API for the
http.server.request.durationmetric is available inside AspNetCore for users targeting .NET 8.0 (or newer). For details see: Enrich the ASP.NET Core request metric. -
Filtermigration:There is no comparable filter mechanism currently available for any .NET version. Please share your feedback if you are impacted by this feature gap.
Note The View API may be used to drop dimensions.
-
-
Updated description for
http.server.request.durationmetrics to match spec definition. (#4990)
Released 2023-Jul-20
-
The new HTTP and network semantic conventions can be opted in to by setting the
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable. This allows for a transition period for users to experiment with the new semantic conventions and adapt as necessary. The environment variable supports the following values:http- emit the new, frozen (proposed for stable) HTTP and networking attributes, and stop emitting the old experimental HTTP and networking attributes that the instrumentation emitted previously.http/dup- emit both the old and the frozen (proposed for stable) HTTP and networking attributes, allowing for a more seamless transition.- The default behavior (in the absence of one of these values) is to continue
emitting the same HTTP and network semantic conventions that were emitted in
1.5.0-beta.1. - Note: this option will eventually be removed after the new HTTP and network semantic conventions are marked stable. At which time this instrumentation can receive a stable release, and the old HTTP and network semantic conventions will no longer be supported. Refer to the specification for more information regarding the new HTTP and network semantic conventions for both spans and metrics. (#4537, #4606, #4660)
-
Fixed an issue affecting NET 7.0+. If custom propagation is being used and tags are added to an Activity during sampling then that Activity would be dropped. (#4637)
Released 2023-Jun-05
-
Bumped the package version to
1.5.0-beta.1to keep its major and minor version in sync with that of the core packages. This would make it more intuitive for users to figure out what version of core packages would work with a given version of this package. The pre-release identifier has also been changed fromrctobetaas we believe this more accurately reflects the status of this package. We believe thercidentifier will be more appropriate as semantic conventions reach stability. -
Fix issue where baggage gets cleared when the ASP.NET Core Activity is stopped. The instrumentation no longer clears baggage. One problem this caused was that it prevented Activity processors from accessing baggage during their
OnEndcall. (#4274) -
Added direct reference to
System.Text.Encodings.Webwith minimum version of4.7.2due to CVE-2021-26701. This impacts target frameworksnetstandard2.0andnetstandard2.1which has a reference toMicrosoft.AspNetCore.Http.Abstractionsthat depends onSystem.Text.Encodings.Web>= 4.5.0. (#4399) -
Improve perf by avoiding boxing of common status codes values. (#4360, #4363)
Released 2023-Feb-24
- Updated OTel SDK dependency to 1.4.0
Released 2023-Feb-10
Released 2023-Feb-01
Released 2023-Jan-09
Released 2022-Dec-12
-
Users migrating from version
1.0.0-rc9.9will see the following breaking changes:-
Updated
http.status_codedimension type from string to int forhttp.server.durationmetric. (#3930) -
http.hostwill no longer be populated onhttp.server.durationmetric.net.host.nameandnet.host.portattributes will be populated instead. (#3928) -
The
http.server.durationmetric'shttp.targetattribute is replaced withhttp.routeattribute. (#3903) -
http.hostwill no longer be populated on activity.net.host.nameandnet.host.portattributes will be populated instead. (#3858)
-
-
Extension method
AddAspNetCoreInstrumentationonMeterProviderBuildernow supportsAspNetCoreMetricsInstrumentationOptions. This option class exposes configuration properties for metric filtering and tag enrichment. (#3948, #3982)
Released 2022-Nov-07
-
Breaking change The
Enrichcallback option has been removed. For better usability, it has been replaced by three separate options:EnrichWithHttpRequest,EnrichWithHttpResponseandEnrichWithException. Previously, the singleEnrichcallback required the consumer to detect which event triggered the callback to be invoked (e.g., request start, response end, or an exception) and then cast the object received to the appropriate type:HttpRequest,HttpResponse, orException. The separate callbacks make it clear what event triggers them and there is no longer the need to cast the argument to the expected type. (#3749) -
Added back
netstandard2.0andnetstandard2.1targets. (#3755)
Released 2022-Oct-17
Released 2022-Sep-29
-
Performance improvement (Reduced memory allocation) - Updated DiagnosticSource event subscription to specific set of events. (#3519)
-
Added overloads which accept a name to the
TracerProviderBuilderAddAspNetCoreInstrumentationextension to allow for more fine-grained options management (#3661) -
Fix issue where when an application has an ExceptionFilter, the exception data wouldn't be collected. (#3475)
Released 2022-Aug-18
-
Removed
netstandard2.0andnetstandard2.1targets. .NET 5 reached EOL in May 2022 and .NET Core 3.1 reaches EOL in December 2022. End of support dates for .NET are published here. The instrumentation for ASP.NET Core now requires .NET 6 or later. (#3567) -
Fixed an issue where activity started within middleware was modified by instrumentation library. (#3498)
-
Updated to use Activity native support from
System.Diagnostics.DiagnosticSourceto set activity status. (#3118) (#3555)
Released 2022-Aug-02
-
Fix Remote IP Address - NULL reference exception. (#3481)
-
Metrics instrumentation to correctly populate
http.flavortag. (1.1 instead of HTTP/1.1 etc.) (#3379) -
Tracing instrumentation to populate
http.flavortag. (#3372) -
Tracing instrumentation to populate
http.schemetag. (#3392)
Released 2022-Jun-03
-
Added additional metric dimensions. (#3247)
-
Removes net5.0 target as .NET 5.0 is going out of support. The package keeps netstandard2.1 target, so it can still be used with .NET5.0 apps. (#3147)
Released 2022-Apr-15
Released 2022-Apr-12
Released 2022-Mar-30
-
Fix: Http server span status is now unset for
400-499. (#2904) -
Fix: drop direct reference of the
Microsoft.AspNetCore.Http.Featuresfrom net5 & net6 targets (already part of the FrameworkReference since the net5). (#2860) -
Reduce allocations calculating the http.url tag. (#2947)
Released 2022-Mar-04
Released 2022-Feb-02
Released 2021-Oct-08
- Replaced
http.pathtag on activity withhttp.target. (#2266)
Released 2021-Jul-12
Released 2021-Jun-25
Released 2021-Jun-09
- Fixes bug #1740: Instrumentation.AspNetCore for gRPC services omits ALL rpc.* attributes under certain conditions (#1879)
Released 2021-Apr-23
- When using OpenTelemetry.Extensions.Hosting you can now bind
AspNetCoreInstrumentationOptionsfrom DI. (#1997)
Released 2021-Mar-19
-
Leverages added AddLegacySource API from OpenTelemetry SDK to trigger Samplers and ActivityProcessors. Samplers, ActivityProcessor.OnStart will now get the Activity before any enrichment done by the instrumentation. (#1836)
-
Performance optimization by leveraging sampling decision and short circuiting activity enrichment.
FilterandEnrichare now only called ifactivity.IsAllDataRequestedistrue(#1899)
Released 2021-Jan-29
Released 2020-Nov-17
-
AspNetCoreInstrumentation sets ActivitySource to activities created outside ActivitySource. (#1515)
-
For gRPC invocations, leading forward slash is trimmed from span name in order to conform to the specification. (#1551)
Released 2020-Nov-5
-
Record
Exceptionin AspNetCore instrumentation based onRecordExceptioninAspNetCoreInstrumentationOptions(#1408) -
Added configuration option
EnableGrpcAspNetCoreSupportto enable or disable support for adding OpenTelemetry RPC attributes when using Grpc.AspNetCore. This option is enabled by default. (#1423) -
Renamed TextMapPropagator to TraceContextPropagator, CompositePropagator to CompositeTextMapPropagator. IPropagator is renamed to TextMapPropagator and changed from interface to abstract class. (#1427)
-
Propagators.DefaultTextMapPropagator will be used as the default Propagator (#1427)
-
Removed Propagator from Instrumentation Options. Instrumentation now always respect the Propagator.DefaultTextMapPropagator. (#1448)
Released 2020-Oct-16
-
Instrumentation no longer store raw objects like
HttpRequestin Activity.CustomProperty. To enrich activity, use the Enrich action on the instrumentation. (#1261) -
Span Status is populated as per new spec (#1313)
Released 2020-Sep-15
- For gRPC invocations, the
grpc.methodandgrpc.status_codeattributes added by the library are removed from the span. The information from these attributes is contained in other attributes that follow the conventions of OpenTelemetry. (#1260)
Released 2020-08-28
-
Added Filter public API on AspNetCoreInstrumentationOptions to allow filtering of instrumentation based on HttpContext.
-
Asp.Net Core Instrumentation automatically populates HttpRequest, HttpResponse in Activity custom property
-
Changed the default propagation to support W3C Baggage (#1048)
- The default ITextFormat is now
CompositePropagator(TraceContextFormat, BaggageFormat). Baggage sent via the W3C Baggage header will now be parsed and set on incoming Http spans.
- The default ITextFormat is now
-
Introduced support for Grpc.AspNetCore (#803).
- Attributes are added to gRPC invocations:
rpc.system,rpc.service,rpc.method. These attributes are added to an existing span generated by the instrumentation. This is unlike the instrumentation for client-side gRPC calls where one span is created for the gRPC call and a separate span is created for the underlying HTTP call in the event both gRPC and HTTP instrumentation are enabled.
- Attributes are added to gRPC invocations:
-
Renamed
ITextPropagatortoIPropagator(#1190)
Released 2020-07-24
- First beta release
Released 2020-07-23
- Initial release