Skip to content

Commit cf39347

Browse files
Update list of intrinsics returned by search tags endpoint (#5857)
* Update list of intrinsics at /api/v2/search/tags?scope=intrinsic Signed-off-by: Andreas Gerstmayr <[email protected]> * add changelog entry Signed-off-by: Andreas Gerstmayr <[email protected]> * update test Signed-off-by: Andreas Gerstmayr <[email protected]> --------- Signed-off-by: Andreas Gerstmayr <[email protected]>
1 parent 8842bf0 commit cf39347

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* [ENHANCEMENT] Increase weight for heavy TraceQL queries [#5782](https://github.com/grafana/tempo/pull/5782) (@ruslan-mikhailov)
2525
* [ENHANCEMENT] Add TraceQL support for nonexistential attribute queries [#4950](https://github.com/grafana/tempo/pull/4905) (@ie-pham)
2626
* [ENHANCEMENT] Add partition ownership metric to live-store [#5815](https://github.com/grafana/tempo/pull/5815) (@javiermolinar, @mapno)
27+
* [ENHANCEMENT] Update list of intrinsics returned by search tags endpoint [#5857](https://github.com/grafana/tempo/pull/5857) (@andreasgerstmayr)
2728
* [BUGFIX] Fix compactor to properly consider SSE-KMS information during metadata copy [#5774](https://github.com/grafana/tempo/pull/5774) (@steffsas)
2829
* [BUGFIX] Correctly track and reject too large traces in live stores. [#5757](https://github.com/grafana/tempo/pull/5757) (@joe-elliott)
2930
* [BUGFIX] Fix issues related to integer dedicated columns in vParquet5-preview2 [#5716](https://github.com/grafana/tempo/pull/5716) (@stoewer)

modules/frontend/tag_handlers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func TestSearchTagsV2Intrinsics(t *testing.T) {
222222
{
223223
// Only a subset of intrinsic tags will fit
224224
Name: api.ParamScopeIntrinsic,
225-
Tags: search.GetVirtualIntrinsicValues()[0:10],
225+
Tags: search.GetVirtualIntrinsicValues()[0:9],
226226
},
227227
},
228228
},

pkg/search/util.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,27 @@ func GetVirtualTagValuesV2(tagName string) []tempopb.TagValue {
5454
return nil
5555
}
5656

57+
// keep this list in sync with pkg/traceql/enum_attributes.go
5758
func GetVirtualIntrinsicValues() []string {
5859
return []string{
5960
traceql.IntrinsicDuration.String(),
60-
traceql.IntrinsicKind.String(),
6161
traceql.IntrinsicName.String(),
6262
traceql.IntrinsicStatus.String(),
6363
traceql.IntrinsicStatusMessage.String(),
64-
traceql.IntrinsicTraceDuration.String(),
64+
traceql.IntrinsicKind.String(),
6565
traceql.IntrinsicTraceRootService.String(),
6666
traceql.IntrinsicTraceRootSpan.String(),
67+
traceql.IntrinsicTraceDuration.String(),
68+
traceql.IntrinsicEventName.String(),
69+
traceql.IntrinsicEventTimeSinceStart.String(),
70+
traceql.IntrinsicLinkSpanID.String(),
71+
traceql.IntrinsicLinkTraceID.String(),
72+
traceql.IntrinsicInstrumentationName.String(),
73+
traceql.IntrinsicInstrumentationVersion.String(),
74+
75+
traceql.IntrinsicTraceID.String(),
76+
traceql.IntrinsicSpanID.String(),
77+
traceql.IntrinsicParentID.String(),
6778
traceql.ScopedIntrinsicSpanStatus.String(),
6879
traceql.ScopedIntrinsicSpanStatusMessage.String(),
6980
traceql.ScopedIntrinsicSpanDuration.String(),
@@ -72,10 +83,7 @@ func GetVirtualIntrinsicValues() []string {
7283
traceql.ScopedIntrinsicTraceRootName.String(),
7384
traceql.ScopedIntrinsicTraceRootService.String(),
7485
traceql.ScopedIntrinsicTraceDuration.String(),
75-
traceql.IntrinsicEventName.String(),
76-
traceql.IntrinsicEventTimeSinceStart.String(),
77-
traceql.IntrinsicInstrumentationName.String(),
78-
traceql.IntrinsicInstrumentationVersion.String(),
86+
7987
/* these are technically intrinsics that can be requested, but they are not generally of interest to a user
8088
typing a query. for simplicity and clarity we are leaving them out of autocomplete
8189
IntrinsicNestedSetLeft

pkg/traceql/enum_attributes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func AttributeScopeFromString(s string) AttributeScope {
6363

6464
type Intrinsic int8
6565

66+
// keep the intrinsics in sync with GetVirtualIntrinsicValues() in pkg/search/util.go
6667
const (
6768
IntrinsicNone Intrinsic = iota
6869
IntrinsicDuration

0 commit comments

Comments
 (0)