Skip to content

Commit

Permalink
Merge branch 'main' into tracing-addinstrumentation-factory-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored May 5, 2023
2 parents 3576ca7 + b9908d1 commit b129258
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/metrics/exemplars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ docker-compose up -d
```

If the above step succeeds, all dependencies would be spun up and ready now. To
test, navigate to Grafana running at: "http://localhost:3000/".
test, navigate to Grafana running at: `http://localhost:3000/`.

## Run test app

Expand Down
6 changes: 6 additions & 0 deletions src/OpenTelemetry.Instrumentation.AspNetCore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

* 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 `OnEnd` call.
([#4274](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4274))

* Added direct reference to `System.Text.Encodings.Web` with minimum version of
`4.7.2` due to [CVE-2021-26701](https://github.com/dotnet/runtime/issues/49377).
This impacts target frameworks `netstandard2.0` and `netstandard2.1` which has a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,6 @@ public void OnStopActivity(Activity activity, object payload)
// the one created by the instrumentation.
// And retrieve it here, and set it to Current.
}

var textMapPropagator = Propagators.DefaultTextMapPropagator;
if (textMapPropagator is not TraceContextPropagator)
{
Baggage.Current = default;
}
}

public void OnMvcBeforeAction(Activity activity, object payload)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public async Task ExtractContextIrrespectiveOfTheFilterApplied()
}

[Fact]
public async Task BaggageClearedWhenActivityStopped()
public async Task BaggageIsNotClearedWhenActivityStopped()
{
int? baggageCountAfterStart = null;
int? baggageCountAfterStop = null;
Expand Down Expand Up @@ -532,7 +532,7 @@ void ConfigureTestServices(IServiceCollection services)
Assert.NotNull(baggageCountAfterStart);
Assert.Equal(2, baggageCountAfterStart);
Assert.NotNull(baggageCountAfterStop);
Assert.Equal(0, baggageCountAfterStop);
Assert.Equal(2, baggageCountAfterStop);
}

[Theory]
Expand Down

0 comments on commit b129258

Please sign in to comment.