Skip to content

chore: Record stable span tree snapshots instead of heavily normalized payloads#2011

Open
Luca Forstner (lforst) wants to merge 3 commits into
mainfrom
lforst/e2e-ascii-span-trees
Open

chore: Record stable span tree snapshots instead of heavily normalized payloads#2011
Luca Forstner (lforst) wants to merge 3 commits into
mainfrom
lforst/e2e-ascii-span-trees

Conversation

@lforst
Copy link
Copy Markdown
Member

Replaces our admittedly random snapshots with received span tree snapshots that should make it better to reason about changes.

Copy link
Copy Markdown
Collaborator

@Qard Stephen Belanger (Qard) left a comment

Choose a reason for hiding this comment

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

Why use this mostly JSON text format rather than just using actual JSON with just a stable structure so we can actually do structural assertions on it? That way when something goes wrong we can better understand why and not just get some indecipherable string match failure. 🤔

@lforst
Copy link
Copy Markdown
Member Author

Why use this mostly JSON text format rather than just using actual JSON with just a stable structure so we can actually do structural assertions on it? That way when something goes wrong we can better understand why and not just get some indecipherable string match failure. 🤔

A big motivation behind this change was to quickly understand what the instrumentation spits out. While a JSON gets us there, I found this format better for mentally parsing things like span type and especially hierarchy/relationships between spans. While getting this PR cleaned up, I haven't found diffs to be too hard to understand, however I see your point.

Want me to change it?

Copy link
Copy Markdown
Collaborator

Can we have that as a debug output or something? I can see some value to that too, but I think for what actually gets asserted against I would slightly prefer something more structural.

@lforst
Copy link
Copy Markdown
Member Author

Luca Forstner (lforst) commented May 19, 2026

Stephen Belanger (@Qard) changed it so we are emitting both.

I think the txt files are great for PR reviews so I still wanted it to be tracked via a file and not just process output.
Additionally, I wanted the json and the txt to always be in sync - which technically means that we also assert on the txt.
I am happy with this, even though it is a bit verbose.

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