[bug] Adding a baggage entry for the current trace and replace key and value is not possible via Baggage API #6057
Labels
bug
Something isn't working
needs-triage
New issues which have not been classified or triaged by a community member
pkg:OpenTelemetry.Api
Issues related to OpenTelemetry.Api NuGet package
Package
OpenTelemetry.Api
Package Version
Runtime Version
net8.0
Description
Baggage allows you to add a key with a value as an attribute to every subsequent child span of the current application context. The documentation of the OpenTelemetry .NET API -> Beggage API states:
and
If I try this feature using the Baggage API this is not possible for a simple ASP.NET Core Web API.
Steps to Reproduce
Program.cs:
WeatherForecastController.cs:
Expected Result
The baggage value should be:
Actual Result
Baggage.Current.GetBaggage("MyValue")
returns nullMyValue
is not part of the trace recordAdditional Context
No response
The text was updated successfully, but these errors were encountered: