feat(occurrences on eap): Make organization trace item stats API endpoint generic over trace item type#112889
Open
Conversation
shashjar
commented
Apr 14, 2026
| search_resolver: SearchResolver | None = None, | ||
| attributes: list[AttributeKey] | None = None, | ||
| max_buckets: int = 75, | ||
| skip_translate_internal_to_public_alias: bool = False, |
Member
Author
There was a problem hiding this comment.
Diff here because the RPC base class was missing some arguments from its interface
shashjar
commented
Apr 14, 2026
| required=False, | ||
| ) | ||
| spansLimit = serializers.IntegerField(required=False, default=1000, max_value=1000) | ||
| traceItemsLimit = serializers.IntegerField(required=False, default=1000, max_value=1000) |
Member
Author
There was a problem hiding this comment.
I think renaming spansLimit -> traceItemsLimit is safe since the frontend doesn't currently pass the query param at all
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.
Follow-up to #112878. Second of two backend PRs to support attribute breakdowns for occurrences in Explore.
itemTypequery parameter to the/trace-items/stats/endpoint, supporting "spans" (default) and "occurrences"TraceItemStatsConfigdataclass andget_trace_item_stats_config()dispatcher to route queries to the correct RPC class, definitions, alias mappings, excluded attributes, referrer, and ID column based on item typespansLimitquery parameter totraceItemsLimit(safe because frontend is not currently passing this query param)attributes,max_buckets, &skip_translate_internal_to_public_aliastoRPCBase.run_stats_query()base class signature to match the interfaces used in the subclasses (Spans/Occurrences)