Skip to content

[Traceql] Add support for event timestamp - #3908

Merged
ie-pham merged 5 commits into
grafana:mainfrom
ie-pham:jp/eventime
Jul 25, 2024
Merged

[Traceql] Add support for event timestamp #3908
ie-pham merged 5 commits into
grafana:mainfrom
ie-pham:jp/eventime

Conversation

@ie-pham

@ie-pham ie-pham commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

What this PR does: Add Traceql support for event timestamp. User will be able to query for events by how much time as elapsed since span start time to the timestamp of the event using event:timeSinceStart.

Example:
{ event:timeSinceStart > 1m }
This query can help find spans where an event took place at least 1 minute after the span start time.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@ie-pham

ie-pham commented Jul 24, 2024

Copy link
Copy Markdown
Contributor Author

This wasn't part of the traceql addition doc but as I was debugging something, I thought this could be a very useful query.

@joe-elliott joe-elliott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Love this PR.

Can we get a test in ./tempodb/tempodb_search_test.go : TestSearchCompleteBlock ?

@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 some doc :)

@ie-pham
ie-pham requested a review from joe-elliott July 25, 2024 15:10
@ie-pham
ie-pham merged commit d0f0a5f into grafana:main Jul 25, 2024
@knylander-grafana knylander-grafana added the type/docs Improvements or additions to documentation label Aug 30, 2024
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* add event start time

* add event:timeSinceStart

* changelog

* missed one test

* more test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs Improvements or additions to documentation

3 participants