Skip to content

Conversation

@sfleen
Copy link
Contributor

@sfleen sfleen commented Nov 12, 2025

Previously, the tracing integration test only checked for a simple existence of a trace with a service name, while not inspecting the actual values inside the trace.

This makes the test check the tags inside a specific trace, both for a process and a span.

In the future, this can be improved even more to inspect all spans in a trace and ensure the relationships between them are correct, but this will require updates to emojivoto and its propagation to be viable.

@sfleen sfleen requested a review from a team as a code owner November 12, 2025 18:40
Previously, the tracing integration test only checked for a simple existence of a trace with a service name, while not inspecting the actual values inside the trace.

This makes the test check the tags inside a specific trace, both for a process and a span.

In the future, this can be improved even more to inspect all spans in a trace and ensure the relationships between them are correct, but this will require updates to emojivoto and its propagation to be viable.

Signed-off-by: Scott Fleener <[email protected]>
@sfleen sfleen force-pushed the sfleen/trace-test-better branch from ea2bf41 to e5d3a1e Compare November 14, 2025 16:02

func (_ anyMatcher) assertMatches(_ *testing.T, _ string, _ interface{}) {}

func inspectTraces(t *testing.T, traces *traces, expected expectedTrace) error {
Copy link
Member

Choose a reason for hiding this comment

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

personal preference, but I find nested loops that include a mix of breaks and continues to be very hard to follow and reason about. consider splitting this into smaller functions with clear semantics and using return for control flow?

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