Skip to content

Conversation

@krajorama
Copy link
Contributor

@krajorama krajorama commented Nov 11, 2025

What this PR does

Some native histograms don't have max bucket and reset duration set. This means they could grow very big and reduce resolution without a chance to reset. Use the recommended defaults.

See https://grafana.com/docs/mimir/latest/send/native-histograms/_exponential_buckets/#limit-the-number-of-buckets-in-application-instrumentation

Which issue(s) this PR fixes or relates to

Related to #7154

Checklist

  • [N/A] Tests updated.
  • [N/A] Documentation added.
  • [N/A] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • [N/A] about-versioning.md updated with experimental features.

Note

Add default NativeHistogramMaxBucketNumber=100 and NativeHistogramMinResetDuration=1h to multiple Prometheus histograms; minor import alias fix for BoomFilters.

  • Instrumentation (native histograms):
    • Set NativeHistogramMaxBucketNumber=100 and NativeHistogramMinResetDuration=1h (keeping NativeHistogramBucketFactor) for:
      • pkg/blockbuilder: consume_job_duration_seconds, TSDB compact/upload duration; scheduler schedule_update_seconds.
      • pkg/ingester: queried_series, discarded_series_ratio.
      • pkg/storage/ingest: pusher processing_time_seconds, pusher_* histograms; reader estimated_bytes_per_record, records_batch_*, records_batch_process_duration_seconds; strong consistency wait duration; commit request latency.
      • pkg/streamingpromql: engine estimated_query_peak_memory_consumption; planner plan_stage_latency_seconds.
      • pkg/usagetracker/usagetrackerclient: client request_duration_seconds.
      • tools/querytee: relative and proportional backend response duration histograms.
  • Misc:
    • Import time where needed.
    • Use aliased import boom "github.com/tylertreat/BoomFilters" in lookupplan/stats.go.

Written by Cursor Bugbot for commit 11275f6. This will update automatically on new commits. Configure here.

Some native histograms don't have max bucket and reset duration set.
This means they could grow very big and reduce resolution without a
chance to reset. Use the recommended defaults.

Signed-off-by: György Krajcsovits <[email protected]>
@krajorama krajorama added the changelog-not-needed PRs that don't need a CHANGELOG.md entry label Nov 11, 2025
@krajorama krajorama marked this pull request as ready for review November 12, 2025 07:53
@krajorama krajorama requested a review from a team as a code owner November 12, 2025 07:53
Copy link
Contributor

@narqo narqo left a comment

Choose a reason for hiding this comment

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

Native histograms are tricky to hold right, it seems 😞 But the changes overall work for me

"github.com/prometheus/prometheus/tsdb"
"github.com/prometheus/prometheus/tsdb/index"
"github.com/tylertreat/BoomFilters"
boom "github.com/tylertreat/BoomFilters"
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you change this on purpose? It seems a noop for the rest of the file, and looks unrelated 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, make format did it, I'll change it back

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

Labels

changelog-not-needed PRs that don't need a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants