Skip to content

Don't truncate traces at span depth 4 - #493

Merged
nblumhardt merged 4 commits into
datalust:devfrom
nblumhardt-ro:trace-depth
Aug 28, 2026
Merged

Don't truncate traces at span depth 4#493
nblumhardt merged 4 commits into
datalust:devfrom
nblumhardt-ro:trace-depth

Conversation

@nblumhardt-ro

Copy link
Copy Markdown

Formatting via the Serilog logger inadvertently truncates traces at the logger's maximum destructuring depth.

We're always dealing with already-serialization-friendly data in this context, so there's not much to lose by relaxing the depth limit.


var writer = new LoggerConfiguration()
.Destructure.With<JsonNetDestructuringPolicy>()
.Destructure.ToMaximumDepth(10000)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody will ever need an object nested to 10,000 levels

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to derive this from the value we use as the span retrieval limit 🤔 ... I'll run through how that looks and include it in my next round 👍

@nblumhardt
nblumhardt merged commit 0ef33d9 into datalust:dev Aug 28, 2026
2 checks passed
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.

3 participants