Skip to content

Commit

Permalink
Revert changes for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Mar 8, 2024
1 parent b4b2905 commit 24cff58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## Unreleased

* Fixed an issue when `server.port` attribute was not set with `server.address`
when it has default values (`80` for `HTTP` and `443` for `HTTPS` protocol).
* Fixed an issue for spans when `server.port` attribute was not set with
`server.address` when it has default values (`80` for `HTTP` and
`443` for `HTTPS` protocol).
([#5419](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5419))

## 1.7.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public static void OnStopEventWritten(Activity activity, object payload)
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeServerAddress, request.RequestUri.Host));
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeServerPort, request.RequestUri.Port));

tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeUrlScheme, request.RequestUri.Scheme));
if (!request.RequestUri.IsDefaultPort)
{
tags.Add(new KeyValuePair<string, object>(SemanticConventions.AttributeUrlScheme, request.RequestUri.Scheme));
}

if (TryFetchResponse(payload, out HttpResponseMessage response))
{
Expand Down

0 comments on commit 24cff58

Please sign in to comment.