opentelemetry-dotnet-contrib
opentelemetry-dotnet-contrib copied to clipboard
OpenTelemetry.Instrumentation.StackExchangeRedis
Issue with OpenTelemetry.Instrumentation.StackExchangeRedis
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g. OpenTelemetry 1.2.0
):
OpenTelemetry1.3.1
Runtime version (e.g. net462
, net48
, netcoreapp3.1
, net6.0
etc. You can
find this information from the *.csproj
file):
net5.0
Is this a feature request or a bug? bug
- [ ] Feature Request
- [x] Bug
What is the expected behavior? Baggage.Current must be populated with parent context baggage
What do you expect to see? activity created by redis should propagate baggage
What is the actual behavior? Baggage is not propagated in redis activity
What did you see instead? If you are reporting a bug, create a self-contained project using the template of your choice and apply the minimum required code to result in the issue you're observing. We will close this issue if: This can be seen in instrumentation code directly. There is no logic to copy baggage from parent activity to child activity
- The repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
- If we can not reproduce the behavior you're reporting.
Additional Context
The logic can be seen in method ProfilerCommandToActivity at https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.Instrumentation.StackExchangeRedis/Implementation/RedisProfilerEntryToActivityConverter.cs Add any other context about the feature request here.
There is no logic to copy baggage from parent activity to child activity
Baggage is never copied to an activity. Propagation of baggage refers to the means by which baggage is sent between process boundaries. That is, propagation is not a means to add additional attributes to telemetry.
If you want to add values from baggage to an activity you could perform this yourself with a custom activity processor - i.e., read values from baggage and add them to the activity.
@adityaPrakashSai, I am closing the issue based on @alanwest comment.