C
C#4mo ago
nate12o6

OpenTelemetry not including SpanId with ActivityEvent.

I am banging my head against the wall trying to figure out why my ActivityEvent does not have any reference to my Activity in application insights.. Resulting in me not seeing the events inside the transaction waterfall.. I am creating my activity with the following lines of code:
using var activity = DiagnosticConfigs.Source.StartActivity(DiagnosticNames.RegisterUser);
using var activity = DiagnosticConfigs.Source.StartActivity(DiagnosticNames.RegisterUser);
a few lines down I am creating the ActivityEvent:
activity?.AddEvent(new ActivityEvent(nameof(IValidatedUserService.RegisterAccessToken)));
activity?.AddEvent(new ActivityEvent(nameof(IValidatedUserService.RegisterAccessToken)));
The event does successfully show up in Application Insights in the trace logs but with NO SPANID. Causing it to also not show up in my transaction waterfall.
Is there something that I need to do in order to make this work? This seems like it should be default behavior and I have not seen any example online where someone comments that something extra needs to be done.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server