Skip to content

TraceQL: Experimental "not structural" operators#2993

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

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

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

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

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 TraceQL: Experimental "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
Copy link
Copy Markdown
Contributor

@knylander-grafana knylander-grafana left a comment

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>
Copy link
Copy Markdown
Contributor

@mdisibio mdisibio left a comment

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negated structural query operators for TraceQL

3 participants