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

Added MustNewMetricWithExemplars that wraps metrics with exemplar #3

Merged
merged 1 commit into from Mar 16, 2022

Conversation

bwplotka
Copy link

Changes:

  • Make sure to not "leak" dto.Metric
  • Reused upper bounds we already have for histogram
  • Common code for all types.

Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com

prometheus/metric.go Outdated Show resolved Hide resolved
prometheus/metric.go Show resolved Hide resolved
Changes:
* Make sure to not "leak" dto.Metric
* Reused upper bounds we already have for histogram
* Common code for all types.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@bwplotka bwplotka marked this pull request as ready for review March 16, 2022 14:59
@bwplotka
Copy link
Author

Fixed all PTAL

@wperron wperron merged commit 3c2e890 into Shopify:feat/exemplar_const_metrics Mar 16, 2022
wperron added a commit that referenced this pull request Mar 17, 2022
…#986)

* Add support for exemplars on constHistogram

Co-authored-by: William Perron <william.perron@shopify.com>
Signed-off-by: William Perron <william.perron@shopify.com>

* remove GetExemplars function

Signed-off-by: William Perron <william.perron@shopify.com>

* fixed linting warnings

reduce repetition in constHistogram w/ exemplar

Signed-off-by: William Perron <william.perron@shopify.com>

* Add values to correct bucket

Signed-off-by: William Perron <william.perron@shopify.com>

* Misc fixes

Co-authored-by: Francis Bogsanyi <francis.bogsanyi@shopify.com>

Signed-off-by: William Perron <william.perron@shopify.com>

* avoid panic when there are fewer buckets than exemplars

Co-authored-by: Arun Mahendra <arun.mahendra@shopify.com>

Signed-off-by: William Perron <william.perron@shopify.com>

* Added MustNewMetricWithExemplars that wraps metrics with exemplar (#3)

Changes:
* Make sure to not "leak" dto.Metric
* Reused upper bounds we already have for histogram
* Common code for all types.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

Co-authored-by: Arun Mahendra <arun.mahendra@shopify.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
@kakkoyun kakkoyun deleted the exemplar branch August 5, 2022 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants