Repository navigation
lib/traceql: support span:* and trace:* Tempo intrinsic filters - #333
Closed
aloneangel45 wants to merge 2 commits into
Closed
aloneangel45 wants to merge 2 commits into
aloneangel45 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Author
|
Thanks for the review! Addressed all four
Re-ran |
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.
Describe Your Changes
Supports Tempo TraceQL intrinsic filters that previously produced unmapped field names and returned empty trace sets:
TraceQLFieldToVTFieldinlib/traceql/filter_general.go):span:name->name,span:status->status_code(preservingok/error/unsetenum rewrites),span:kind->kind(preserving enum rewrites),span:duration->duration,span:id->span_id,span:parentID->parent_span_id, andspan:statusMessage/statusMessage->status_message.app/vtselect/traces/tempo/metrics_query.goso aggregations overspan:durationalso scale nanoseconds to seconds likeduration.trace:duration):isTraceDurationFieldbetweenfilterCommon.String()andGetTraceDurationFilters()so{ trace:duration ... }uses thetrace_id_idx_streamjoin identically to{ traceDuration ... }.trace:rootService,rootServiceName,rootName,trace:rootName):parent_span_id:="") viatrace_id:in({resource_attr:service.name!=""} AND parent_span_id:="" AND <root-predicate> | fields trace_id), enabling both standalone root queries and cross-span conjunctions/disjunctions (e.g. matching a child span whose trace has a given root service).by(...)/avg_over_time(span:duration), and real in-processlogstorage.Storageintegration tests (TestTempoIntrinsicFilters,TestTempoIntrinsicFiltersAgainstStorage) inlib/traceql/parser_test.go,lib/traceql/pipe_metrics_test.go, andapp/vtselect/traces/tempo/metrics_query_test.go.Closes #325
Checklist
go vet ./lib/traceql/... ./app/vtselect/...andgo test -count=1 -race ./lib/traceql/... ./app/vtselect/...