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 Metrics] histogram_over_time #3644

Merged
merged 27 commits into from
May 9, 2024

Conversation

mdisibio
Copy link
Contributor

@mdisibio mdisibio commented May 2, 2024

What this PR does:
Adds histogram_over_time, requires merging #3633 first. This function supports the creation of heatmaps. Implementation and data flow is similar to quantiles but we preserve the bucket counts at the end. Internally it's executing a query { } | count_over_time() by (log2(<field>)), but making it a new top-level function is straight-forward and more readable. Maybe long-term we do expand the language to allow grouping by a field expression (func(.foo)) instead of just attributes (.foo)

image

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]

… end. Refactor label handling to be shared. Validate quantiles, support quantile_over_time by any integer attribute
…oss blocks, and across generators. Error handling, move code around
…log2, for several reasons: support non-log2 or native histogram buckets in the future, and where queriers on different versions may have different buckets during rollout
@mdisibio mdisibio changed the title [WIP] Histogram over time [WIP] [TraceQL Metrics] histogram_over_time May 6, 2024
@mdisibio mdisibio marked this pull request as ready for review May 7, 2024 19:23
@mdisibio mdisibio requested a review from joe-elliott as a code owner May 7, 2024 19:23
@mdisibio mdisibio changed the title [WIP] [TraceQL Metrics] histogram_over_time [TraceQL Metrics] histogram_over_time May 7, 2024
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.

Let's go!

Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

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

Nice

@mdisibio mdisibio merged commit 29f4167 into grafana:main May 9, 2024
14 checks passed
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.

3 participants