[REVIEW ONLY DO NOT MERGE] Span counting + khan specific change#1
Draft
zaquestion wants to merge 6 commits intomainfrom
Draft
[REVIEW ONLY DO NOT MERGE] Span counting + khan specific change#1zaquestion wants to merge 6 commits intomainfrom
zaquestion wants to merge 6 commits intomainfrom
Conversation
The goal of this feature is to enrich traces leaving refinery with more information about what happened in the trace and ease querying on that information in honeycomb. Scenario: Finding endpoints with lots of database interactions Challenge: In honeycomb (and most trace providers) querying is done on span events themselves, and there's only a single layer of aggregation. You can query for a count of events where db.statement is set and group that by resolver name. You'll end up with the total number of database interactions per endpoint. Useful, but you can't take the avg or 99th% sum of database interactions and see what endpoints are having issues. I'll note that it is possible to create a calculated field to count the interactions, compute a sum of that, and group by `trace.trace_id` to see what endpoints are the worst offenders. If you export this table, you can throw it into a sheet and do a second aggregation to get the avg of those sums. That said, it's really expensive to do these querys and I've found them to be really slow. Thus the goal of these changes is to make it dramatically easier to query and monitor these values in widgets. For example: I might setup a filter for spans with `db.statement` to count the number of database interactions in a trace. Then in honeycomb I can take the avg of a new database_interactions attribute now set on root spans.
Extracts findSuitableRootSpan: prefers the trace's RootSpan, falls back to the first non-annotation span (not a span event or link). Updates computeCustomCounts to use it so custom counts land on the best available span even when no root has arrived before the trace times out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commit descriptions for context, and main review point is 42f0b8b