Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Traceql] Add support for event timestamp #3908

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Conversation

ie-pham
Copy link
Collaborator

@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
Collaborator 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
Member

@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
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
15 checks passed
@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