Released 2024-Feb-07
- .NET Framework - fix description for
http.client.request.durationmetric. (#5234)
Released 2023-Dec-13
Released 2023-Dec-13
Released 2023-Dec-01
-
Removed support for
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable. The library will now emit only the stable semantic conventions. (#5068) -
Update activity DisplayName as per the specification. (#5078)
-
Removed reference to
OpenTelemetrypackage. This is a breaking change for users relying on SuppressDownstreamInstrumentation option inOpenTelemetry.Instrumentation.GrpcNetClient. For details, check out this issue. (#5077) -
Breaking Change: Renamed
HttpClientInstrumentationOptionstoHttpClientTraceInstrumentationOptions. (#5109) -
Breaking Change: Removed
http.user_agenttag from HttpClient activity. (#5110) -
HttpWebRequest: Introduced additional values forerror.typetag on activity andhttp.client.request.durationmetric. (#5111)
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.client.request.durationmetric will be set to_OTHER
http.request.methodis set onhttp.client.request.durationmetric or activity whenOTEL_SEMCONV_STABILITY_OPT_INenvironment variable is set tohttporhttp/dup. (#5003) - 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.client.request.durationmetric in case of failed requests as per the specification.Users moving to
net8.0or newer frameworks from lower versions will see difference in values in case of an exception.net8.0or newer frameworks add the ability to further drill down the exceptions to a specific type through HttpRequestError enum. For lower versions, the individual types will be rolled in to a single type. This could be a breaking change if alerts are set based on the values.The attribute will only be added when
OTEL_SEMCONV_STABILITY_OPT_INenvironment variable is set tohttporhttp/dup. -
Fixed
network.protocol.versionattribute values to match the specification. (#5006) -
Set
network.protocol.versionvalue using the protocol version on the received response. If the request fails without response, thennetwork.protocol.versionattribute will not be set on Activity andhttp.client.request.durationmetric. (#5043)
Released 2023-Oct-26
-
Introduced a new metric for
HttpClient,http.client.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). (#4870)- New metric:
http.client.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.client.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.client.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: - New metric:
-
Added support for publishing
http.client.duration&http.client.request.durationmetrics on .NET Framework forHttpWebRequest. (#4870) -
Following
HttpClientmetrics will now be enabled by default when targeting.NET8.0framework or newer.-
Meter :
System.Net.Httphttp.client.request.durationhttp.client.active_requestshttp.client.open_connectionshttp.client.connection.durationhttp.client.request.time_in_queue
-
Meter :
System.Net.NameResolutiondns.lookups.duration
For details about each individual metric check System.Net metrics docs page.
NOTES:
- When targeting
.NET8.0framework or newer,http.client.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.
(#4931)
-
-
Added
url.schemeattribute tohttp.client.request.durationmetric. The metric will be emitted whenOTEL_SEMCONV_STABILITY_OPT_INenvironment variable is set tohttporhttp/dup. (#4989) -
Updated description for
http.client.request.durationmetrics to match spec definition. (#4990) -
dns.lookups.durationmetric is renamed todns.lookup.duration. This change impacts only users on.NET8.0or newer framework. (#5049)
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. (#4538, #4639)
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. -
Fixed an issue of missing
http.client.durationmetric data in case of network failures (when response is not available). (#4098) -
Improve perf by avoiding boxing of common status codes values. (#4361, #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
-
Added
net.peer.nameandnet.peer.portas dimensions onhttp.client.durationmetric. (#3907) -
Breaking change
http.hostwill no longer be populated on activity.net.peer.nameandnet.peer.portattributes will be populated instead. (#3832)
Released 2022-Nov-07
-
Added back
netstandard2.0target. (#3787) -
Breaking change: The
Enrichcallback option has been removed. For better usability, it has been replaced by three separate options: In case ofHttpClientthe new options areEnrichWithHttpRequestMessage,EnrichWithHttpResponseMessageandEnrichWithExceptionand in case ofHttpWebRequestthe new options areEnrichWithHttpWebRequest,EnrichWithHttpWebResponseandEnrichWithException. 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:HttpRequestMessage,HttpResponsemessage, orExceptionin case ofHttpClientandHttpWebRequest,HttpWebResponseandExceptionin case ofHttpWebRequest. 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. (#3792) -
Fixed an issue which prevented custom propagators from being called on .NET 7+ runtimes for non-sampled outgoing
HttpClientspans. (#3828) -
Breaking change: The same API is now exposed for
net462andnetstandard2.0targets. TheFilterproperty on options is now exposed asFilterHttpRequestMessage(called for .NET & .NET Core) andFilterHttpWebRequest(called for .NET Framework). (#3793)
Released 2022-Oct-17
- In case of .NET Core, additional spans created during retries will now be exported. ([#3729])
Released 2022-Sep-29
-
Dropped
netstandard2.0target and addednet6.0. .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 HttpClient now requires .NET 6 or later. This does not affect applications targeting .NET Framework. (#3664) -
Added overloads which accept a name to the
TracerProviderBuilderAddHttpClientInstrumentationextension to allow for more fine-grained options management (#3664, #3667)
Released 2022-Aug-18
-
Updated to use Activity native support from
System.Diagnostics.DiagnosticSourceto set activity status. (#3118) (#3555) -
Changed activity source name from
OpenTelemetry.HttpWebRequesttoOpenTelemetry.Instrumentation.Http.HttpWebRequestforHttpWebRequests and fromOpenTelemetry.Instrumentation.HttptoOpenTelemetry.Instrumentation.Http.HttpClientforHttpClient. (#3515)
Released 2022-Aug-02
-
Added
http.schemetag to tracing instrumentation. (#3464) -
[Breaking] Removes
SetHttpFlavoroption. "http.flavor" is now always automatically populated. To remove this tag, set "http.flavor" to null usingActivityProcessor. (#3380) -
Fix
Enrichnot getting invoked when SocketException due to HostNotFound occurs. (#3407)
Released 2022-Jun-03
Released 2022-Apr-15
- Removes .NET Framework 4.6.1. The minimum .NET Framework version supported is .NET 4.6.2. (#3190)
Released 2022-Apr-12
Released 2022-Mar-30
- Updated
TracerProviderBuilderExtensions.AddHttpClientInstrumentationto supportIDeferredTracerProviderBuilderandIOptions<HttpClientInstrumentationOptions>(#3051)
Released 2022-Mar-04
Released 2022-Feb-02
- Fixed an issue with
FilterandEnrichcallbacks not firing under certain conditions when gRPC is used (#2698)
Released 2021-Oct-08
-
Removes .NET Framework 4.5.2 support. The minimum .NET Framework version supported is .NET 4.6.1. (#2138)
-
HttpClientinstances created beforeAddHttpClientInstrumentationis called on .NET Framework will now also be instrumented (#2364)
Released 2021-Jul-12
Released 2021-Jun-25
Released 2021-Jun-09
Released 2021-Apr-23
- Sanitize
http.urlattribute. (#1961) - Added
RecordExceptionto HttpClientInstrumentationOptions and HttpWebRequestInstrumentationOptions which allows Exception to be reported as ActivityEvent. - Update
AddHttpClientInstrumentationextension method for .NET Framework to use only useHttpWebRequestInstrumentationOptions(#1982)
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. (#1894)
Released 2021-Jan-29
-
otel.status_descriptiontag will no longer be set to the http status description/reason phrase for outgoing http spans. (#1579) -
Moved the DiagnosticListener filtering logic from HttpClientInstrumentation ctor to OnStartActivity method of HttpHandlerDiagnosticListener.cs; Updated the logic of OnStartActivity to inject propagation data into Headers for filtered out events as well. (#1707)
Released 2020-Nov-17
- HttpInstrumentation sets ActivitySource to activities created outside ActivitySource. (#1515)
Released 2020-Nov-5
- Instrumentation for
HttpWebRequestno longer store raw objects likeHttpWebRequestin Activity.CustomProperty. To enrich activity, use the Enrich action on the instrumentation. (#1407) - 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
HttpRequestMessagein 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
Released 2020-08-28
-
Rename FilterFunc to Filter.
-
HttpClient/HttpWebRequest instrumentation will now add the raw Request, Response, and/or Exception objects to the Activity it creates (#1099)
-
Changed the default propagation to support W3C Baggage (#1048)
- The default ITextFormat is now
CompositePropagator(TraceContextFormat, BaggageFormat). Outgoing Http request will now send Baggage using the W3C Baggage header. Previously Baggage was sent using theCorrelation-Contextheader, which is now outdated.
- The default ITextFormat is now
-
Removed
AddHttpInstrumentationandAddHttpWebRequestInstrumentation(.NET Framework)TracerProviderBuilderExtensions.AddHttpClientInstrumentationwill now registerHttpClientinstrumentation on .NET Core andHttpClient+HttpWebRequestinstrumentation on .NET Framework. -
Renamed
ITextPropagatortoIPropagator(#1190)
Released 2020-07-23
- Initial release