© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y 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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

CopyToOutputDirectory is not including directories
C#CC# / help
13mo ago
OpenTelemetry Metrics
C#CC# / help
5mo ago
❔ Including wwwroot folder
C#CC# / help
4y ago
OpenTelemetry and Method Boundaries
C#CC# / help
10mo ago