Improve Seq.Syntax templating compatibility with trace spans#30
Merged
nblumhardt merged 4 commits intodatalust:devfrom Sep 30, 2025
Merged
Improve Seq.Syntax templating compatibility with trace spans#30nblumhardt merged 4 commits intodatalust:devfrom
Seq.Syntax templating compatibility with trace spans#30nblumhardt merged 4 commits intodatalust:devfrom
Conversation
…nds(), while bringing tracing properties into line with default LogEvent properties. Updates default formatting for bool and DateTime/DateTimeOffset values
|
|
||
| public static LogEventPropertyValue? IsRootSpan(LogEvent logEvent) | ||
| { | ||
| return new ScalarValue(logEvent is { TraceId: not null, SpanId: not null } && |
Member
Author
There was a problem hiding this comment.
Annoyingly, IsSpan() is not a Boolean method, and the return value requires allocation, so probably best like this for now.
liammclennan
approved these changes
Sep 30, 2025
This was referenced Oct 1, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See: datalust/seq-tickets#2486
IsSpan(),IsRootSpan(),FromUnixEpoch(), andTotalMilliseconds()@SpanKind/@sksupport@Start/@stto internally useDateTimeOffsetrepresentation, so that operations on it are identical to the matching@Timestamp/@tpropertyWe hadn't done anything to nail down
ToString()representations for datetime types, so I've switched them to ISO-8601 since the default .NET formatting is nondeterministic. Format string placeholders can be used to override this.Booleans now render as
trueandfalserather thanTrueandFalse.I don't think these changes warrant a major version bump, so I've gone with a minor.