Repository navigation
Conversation
Durations lex as one Duration token ahead of Float and Integer, and lower through a parseDuration helper copied from Tempo v3.1.0. 1h30m, 1d, 1w, 1y and 1d12h work; planning reuses the parsed value. Invalid literals fail at parse time and name the literal: invalid duration for 1.5d, 1h30 and 1hh, invalid literal for a number directly followed by a letter, such as 1x and 1e3s. Behaviour change: a number, a space and a unit (5 s, .5 s, 5. s) is a syntax error, as in Tempo.
After a dot scope, Label_name mixes bare runes and quoted parts. Parts are unquoted and joined with Tempo's escapes, so the IR holds the plain name. Unclosed quotes, bad escapes and quoted colon intrinsics are rejected at parse time, worded like Tempo.
…ge key by (.foo) read key .foo, which is never stored, so its label was always empty.
…y plan Covers search, the complexity plan, metrics by, compare, tags, values and the unresolved probes, for quotes, a trailing backslash, NUL and newline.
# Conflicts: # reader/tempo/metrics_query.go
This was referenced Nov 9, 2026
This branch has not been deployed
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.
Stacked on #1086; merge that first. The neighbouring literal gaps found while fixing
.95for #1034's review. The rule is to match Tempo v3.1.0 exactly: accept what it accepts and reject what it rejects, at parse time.Summary
Durationtoken beforeFloat/Integer: a number followed by the unitsns us µs ms s m h d w y, repeatable.1h30m,1d,1wand1yparse.1e3s,1.5dand1h30fail at parse time with the literal named. Planning reuses the parsed value."…"parts, with Tempo's escapes (\",\\).."5xx"andspan."http status"read those attributes, and."foo"behaves exactly like.foo, in filters,by(),select(), metrics,compare()and autocomplete. Colon intrinsics can't be quoted, and no new scopes are added. An unclosed quote or a bad escape fails at parse time, worded like Tempo's.compare(), tags, values and the unresolved-trace probe.Breaking changes
Queries that now fail
5 s,.5 sand5. s(a number, a space, a unit) were accepted and are now syntax errors, as in Tempo.1x) is a syntax error.Results that change
by (.foo)labels change: the series were all one group with an empty value, because the pivot read key.foo, and they split by the attribute's values with this PR. Series labels andby()/aggregate result names hold the plain decoded name:by (."http status")labels.http status. This differs from Tempo, which quotes names that need quotes (."http status").Upgrade notes
None. No setting, schema or plugin change.
Evidence
go test ./...passes. The full e2e suite andgrid.traceqlpass on the full stack tip, which includes this branch.Merge Danger
Door: two-way. Parser and plan rendering only.
Blast Radius: TraceQL parsing, and
by()labels for dot-scoped attributes.Known differences, not changed here:
/api/v2/search/tag/."foo"/valueskeeps the quotes and returns no values (Tempo decodes them); duration hint values such aswith(sample=1s)are still rejected; plain integers with a leading zero (09) parse here and not in Tempo;with(foo=1s)is rejected here and accepted by Tempo.