Skip to content

Commit

Permalink
Merge branch 'open-telemetry:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ngruson authored Nov 18, 2023
2 parents fe55188 + 276b307 commit e464fee
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.6.0-beta.3

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**. `EnrichWithException` can be leveraged
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.6.0-beta.3

Released 2023-Nov-17

## 1.6.0-beta.2

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

## Unreleased

## 1.6.0-beta.3

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**. `EnrichWithException` can be leveraged
Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.SqlClient/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.6.0-beta.3

Released 2023-Nov-17

* Updated `Microsoft.Extensions.Configuration` and
`Microsoft.Extensions.Options` package version to `8.0.0`.
([#5051](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5051))
Expand Down
9 changes: 5 additions & 4 deletions src/Shared/SpanHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ internal static class SpanHelper
/// <returns>Resolved span <see cref="Status"/> for the Http status code.</returns>
public static ActivityStatusCode ResolveSpanStatusForHttpStatusCode(ActivityKind kind, int httpStatusCode)
{
var upperBound = kind == ActivityKind.Client ? 399 : 499;
if (httpStatusCode >= 100 && httpStatusCode <= upperBound)
var lowerBound = kind == ActivityKind.Client ? 400 : 500;
var upperBound = 599;
if (httpStatusCode >= lowerBound && httpStatusCode <= upperBound)
{
return ActivityStatusCode.Unset;
return ActivityStatusCode.Error;
}

return ActivityStatusCode.Error;
return ActivityStatusCode.Unset;
}
}

0 comments on commit e464fee

Please sign in to comment.