Skip to content

Conversation

phacops
Copy link
Contributor

@phacops phacops commented Sep 17, 2025

Some calls to GetTrace returns duplicate data because the trace was ingested twice. Adding FINAL for those queries will force ClickHouse to deduplicate the data and make the query longer.

P90 of the query is well under 1s most of the time, applying FINAL will 2-3x this duration. I think this is a worthwhile trade-off for this particular endpoint since it's meant to return a single trace, the platform shouldn't return duplicated data.

Screenshot 2025-09-17 at 11 30 56 AM

https://sentry.sentry.io/explore/traces/?aggregateField=%7B%22groupBy%22%3A%22%22%7D&aggregateField=%7B%22yAxes%22%3A%5B%22p90%28span.duration%29%22%5D%7D&interval=1h&project=300688&query=span.description%3A%22%2Aeap_items%2Aequals%28trace_id%2A%22%20transaction%3AEndpointGetTrace__v1%20span.duration%3A%3C30s&statsPeriod=14d

@phacops phacops requested review from a team as code owners September 17, 2025 18:31
@phacops phacops merged commit cccea25 into master Sep 18, 2025
34 checks passed
@phacops phacops deleted the pierre/eap-add-final-to-get-trace branch September 18, 2025 20:00
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