Skip to content

fix(js): process spans in isolation to improve accuracy of telemetry #3113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 20, 2025

Conversation

andrewbrook
Copy link
Contributor

Span processing in the google-cloud plugin is currently done in batches, which are chosen by the OTel libraries. We erroneously rely on each batch being a complete representation of a trace, and to contain only spans from a single trace. Since these assumptions are incorrect there are currently subtle bugs where span metrics and logs are being mis-attributed, or dropped. This change removes the need for the above assumptions, by processing each span entirely independently.

We also remove some unused logs/metrics for simplicity, and improve the test coverage around "path" telemetry.

Checklist (if applicable):

Copy link
Contributor

@schnecle schnecle left a comment

Choose a reason for hiding this comment

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

This looks great - the simplification is so good! Thanks Andrew!

@andrewbrook andrewbrook merged commit cde7b8c into main Jun 20, 2025
5 checks passed
@andrewbrook andrewbrook deleted the metrics1 branch June 20, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants