Skip to content

Instantly share code, notes, and snippets.

@shalvah
Created July 23, 2020 14:26
Show Gist options
  • Save shalvah/96b583c6439832144603c5cc8bdb0f91 to your computer and use it in GitHub Desktop.
Save shalvah/96b583c6439832144603c5cc8bdb0f91 to your computer and use it in GitHub Desktop.
Examples of System.Diagnostics.Activity structure in .NET

When using legacy (heirarchical) activity IDs:

hierarchichal format

Format is described here: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md#id-format

When using W3C format Activity IDs:

w3c format

Format of an Id is 00-<TraceId>-<SpanId>-00 (format of ParentId is 00-<TraceId>-<ParentSpanId>-00). When there's no SpanId, defaults to 0000000000000000.

Example: 00-a7d13f2fcb994f438ac71ce4bcef1891-0000000000000000-00

(Note: I suspect the final 00 is a serial identifier, but not sure yet.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment