Automatically recognize SpanStartTimestamp
, ParentSpanId
, and SpanKind
from SerilogTracing
#209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SerilogTracing is a nice low-dependency way to light up Serilog output with timed/hierarchical traces. Its tracing output boils down to three properties, listed in the title.
There's currently a
SerilogTracing.Sinks.Seq
package that maps these three properties into underlying top-level compact JSON fields to send to Seq.Since the whole thing is gated on the existence of
SpanStartTimestamp
, on a log event that is already marked with a trace and span id, adding support directly here seems reasonable: it's unlikely this will break any existing usage, and we'll avoid having to support yet another same-but-not-quite client library for people who want to use Serilog with tracing.SpanStartTimestamp
maps to@st
, which Seq already recognizes, and this is the case forParentSpanId
mapping to@ps
, also.The
@sk
property name is not currently recognized by Seq and will be recorded verbatim; I'm expecting we'll either ignore or ingest this in 2024.2, and we'll have time to validate that decision before this sink reaches 7.0.0.