Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants