Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture Activity trace and span ids when present #56

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

nblumhardt
Copy link
Member

By default, the built-in trace and span ids will be recorded alongside any span-related properties (such as TraceId, SpanId, and ParentId) that may be added by the framework:

image

To remove the redundant properties (if you wish) you can set ActivityTrackingOptions via ILoggingBuilder.Configure():

builder.Logging.Configure(opts => opts.ActivityTrackingOptions = ActivityTrackingOptions.None);

image

The PR draws on the trace and span correlation support I added upstream in Serilog, and I've followed it pretty closely here.

@nblumhardt nblumhardt merged commit 1af6fba into datalust:dev Jan 25, 2024
1 check passed
@nblumhardt nblumhardt mentioned this pull request Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants