-
Notifications
You must be signed in to change notification settings - Fork 11
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
Collect trace and span id when present #74
Conversation
1.0.0 Release
1.1.0 Release
1.2.0 Release
2.0.0 Release
2.1.0 Release
3.0.0 Release
_messageAttribute = new("@m", new FormattedMessageLayout()), | ||
_messageTemplateAttribute = new("@mt", new SimpleLayout("${onhasproperties:${message:raw=true}}")), | ||
_traceIdAttribute = new("@tr", new TraceIdLayout()), | ||
_spanIdAttribute = new("@sp", new SpanIdLayout()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equivalents of these are available in NLog.DiagnosticSource
, but it seems better to avoid the dependency.
3.1.0 Release
…to collect-trace-id
This will need a squash :-) |
|
||
namespace NLog.Targets.Seq.Layouts | ||
{ | ||
class TraceIdLayout: Layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems rather similar to SpanIdLayout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, could definitely factor this out; I'll take a quick look tomorrow :)
Seq 2023+ includes special handling of trace and span ids. This is a spike showing how the sink could collect them - still needs some tests and cleanup, but otherwise appears to be straightforward.