Skip to content

[Traceql] Add support for event timestamp #3908

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

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

Conversation

@ie-pham
Copy link
Copy Markdown
Contributor

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

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

ie-pham commented Jul 24, 2024

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

Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

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 ?

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 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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants