Skip to content

generator: add validation for histogram buckets - #5991

Merged
carles-grafana merged 2 commits into
grafana:mainfrom
carles-grafana:generator_validation_histogram
Nov 21, 2025
Merged

generator: add validation for histogram buckets#5991
carles-grafana merged 2 commits into
grafana:mainfrom
carles-grafana:generator_validation_histogram

Conversation

@carles-grafana

@carles-grafana carles-grafana commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

What this PR does:

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]
@carles-grafana
carles-grafana force-pushed the generator_validation_histogram branch from ac80b36 to be4a509 Compare November 21, 2025 09:03
return nil
}

func ValidateHistogramBuckets(buckets []float64, field string) error {

@electron0zero electron0zero Nov 21, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: can we add a unit test for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

aren't the tests in cmd/tempo/app/overrides_validation_test.go enough?

@electron0zero electron0zero Nov 21, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah, just a nit. extra test would make it easy to refactor in future.

@carles-grafana
carles-grafana merged commit e5d05ff into grafana:main Nov 21, 2025
36 of 37 checks passed
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* generator: add validation for histogram buckets

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

Labels

None yet

2 participants