Skip to content

TraceQL: Experimental "not structural" operators - #2993

Merged
joe-elliott merged 14 commits into
grafana:mainfrom
joe-elliott:not-structural
Oct 10, 2023
Merged

TraceQL: Experimental "not structural" operators#2993
joe-elliott merged 14 commits into
grafana:mainfrom
joe-elliott:not-structural

Conversation

@joe-elliott

@joe-elliott joe-elliott commented Oct 6, 2023

Copy link
Copy Markdown
Collaborator

What this PR does:

  • Adds five experimental "not structural" operators: !>, !>>, !<, !>>, and !~.
  • Consolidates structural operator code
  • Extends the lexer to be able to handle 2+ combination tokens.

Which issue(s) this PR fixes:
Fixes #1811

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott joe-elliott changed the title TraceQL: Not structural Operators Oct 6, 2023
Comment thread docs/sources/tempo/traceql/_index.md Outdated
{ span.http.url = "/path/of/api" } >> { span.db.name = "db-shard-001" }
```

### Experimental Structural

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the standard wording that we use for an experimental feature or capability. What do you think?

Suggested change
### Experimental Structural
### Experimental structural
{{% admonition type="warning" %}}
These experimental spanset operators is an [experimental feature](/docs/release-life-cycle/). Engineering and on-call support is not available. Documentation is either limited or not provided outside of code comments. No SLA is provided.
{{% /admonition %}}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind adding a warning, but these are OSS docs. I don't think it makes sense to talk about SLAs or support.

Comment thread docs/sources/tempo/traceql/_index.md Outdated
Comment thread docs/sources/tempo/traceql/_index.md Outdated

@knylander-grafana knylander-grafana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding documentation with examples! Awesome.

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

@mdisibio mdisibio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome addition, good cleanup and tests. Left a few small thoughts, but going ahead and approving.

Comment thread pkg/traceql/ast_execute.go Outdated
Comment thread pkg/traceql/lexer.go
Comment thread docs/sources/tempo/traceql/_index.md Outdated
Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott
joe-elliott merged commit 4c08720 into grafana:main Oct 10, 2023
yvrhdn pushed a commit that referenced this pull request Oct 11, 2023
* disable parquet trace index by default (#2990)

* Update parquet-go to include page header caching fix (#2981)

* Tempo: add dedicated columns to block analyze (#2994)

* adde dedicated columns to block analysize

Signed-off-by: Joe Elliott <number101010@gmail.com>

* load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Bump jaeger-query docker image to 1.50 (#2998)

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

* TraceQL: Experimental "not structural" operators (#2993)

* first pass add

Signed-off-by: Joe Elliott <number101010@gmail.com>

* fix and tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed ancestor/descendant due to parsing issues

Signed-off-by: Joe Elliott <number101010@gmail.com>

* added tempodb lvl tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* parse tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* consolidated code

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* not ancestor/descendant

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tempodb tests and docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update dskit (#3002)

* Update dskit

* fmt

* Update prometheus to latest release v2.47.1 (c4d1a8b) (#3001)

* Update prometheus to latest release v2.47.1 (c4d1a8b)

I ran
```
go get github.com/prometheus/prometheus@c4d1a8b
```
And fixed any compilation issues

* Checkin .test files from prometheus

* go mod tidy

* More fixes

* Final set of fixes? 🤞

* Lint

---------

Co-authored-by: Mario <mariorvinas@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Co-authored-by: Martin Disibio <martin.disibio@grafana.com>
Co-authored-by: Mario <mariorvinas@gmail.com>
Co-authored-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Pavol Loffay <p.loffay@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
sonisr pushed a commit to sonisr/tempo that referenced this pull request Oct 11, 2023
* first pass add

Signed-off-by: Joe Elliott <number101010@gmail.com>

* fix and tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed ancestor/descendant due to parsing issues

Signed-off-by: Joe Elliott <number101010@gmail.com>

* added tempodb lvl tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* parse tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* consolidated code

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* not ancestor/descendant

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tempodb tests and docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* first pass add

Signed-off-by: Joe Elliott <number101010@gmail.com>

* fix and tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed ancestor/descendant due to parsing issues

Signed-off-by: Joe Elliott <number101010@gmail.com>

* added tempodb lvl tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* parse tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* consolidated code

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* not ancestor/descendant

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tempodb tests and docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove load

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants