Skip to content

Commit

Permalink
Merge branch 'main' into vibankwa/rename-instrumentationOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla committed Dec 1, 2023
2 parents 0971bbc + 94c20c6 commit e17a5b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Instrumentation.Http/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
`HttpClientTraceInstrumentationOptions`.
([#5109](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5109))

* **Breaking Change**: Removed `http.user_agent` tag from HttpClient activity.
([#5110](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5110))

## 1.6.0-beta.3

Released 2023-Nov-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,6 @@ public void OnStartActivity(Activity activity, object payload)

activity.SetTag(SemanticConventions.AttributeUrlFull, HttpTagHelper.GetUriTagValueFromRequestUri(request.RequestUri));

if (request.Headers.TryGetValues("User-Agent", out var userAgentValues))
{
var userAgent = userAgentValues.FirstOrDefault();
if (!string.IsNullOrEmpty(userAgent))
{
activity.SetTag(SemanticConventions.AttributeHttpUserAgent, userAgent);
}
}

try
{
this.options.EnrichWithHttpRequestMessage?.Invoke(activity, request);
Expand Down

0 comments on commit e17a5b8

Please sign in to comment.