* Fix convention violating names for generated collector metrics
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Add new Go collector example
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* WIP partial match
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Cleanup
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Comments
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Tests and comments
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Handle properly deleting multiple metrics, update tests
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Comments
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Try using curry values
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Skip curry value to demo
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Fix curry deletion, remove outdated comment.
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Fix logic for deletion of metrics from prior to currying
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Don't match curried values. Update tests.
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Remove unneccesasry helper and todo comments
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Comment about partial matching curried labels
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Simplify curried value check
Signed-off-by: Zach Stone <zach@giantswarm.io>
* Add timeout parameter for queries
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update api/prometheus/v1/api.go
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update api/prometheus/v1/api.go
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Pass timeout as stringified time.Duration instead of millisecond value
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update QueryRange API to support timeouts
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Add timeout to test request params
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
* Renamed files.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* gocollector: Added options to Go Collector for diffetent collections.
Fixes https://github.com/prometheus/client_golang/issues/983
Also:
* fixed TestMemStatsEquivalence, it was noop before (:
* Removed gc_cpu_fraction metric completely, since it's not working completely for Go1.17+
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* Make Query requests idempotent
Address #1020.
Signed-off-by: Tomáš Dohnálek <dohnto@gmail.com>
* Use empty header
Signed-off-by: Tomáš Dohnálek <dohnto@gmail.com>
* Document issue with original documentation
Signed-off-by: Tomáš Dohnálek <dohnto@gmail.com>
Add PushContext and AddContext to Pusher, which are context-aware
version of Push and Add respectively. They give a caller the ability
to cancel an HTTP request.
Signed-off-by: Tatsuhiro Tsujikawa <ttsujika@zlab.co.jp>
Make apiClientImpl.DoGetFallback more idiomatic and efficient:
* Save result of args.Encode() operation as it might be used 2 times in
the function and due to looping and sorting it might be heavy.
* Follow line-of-sight practise and therefore simplify the code.
Signed-off-by: Tomáš Dohnálek <dohnto@gmail.com>
* Add config to test against go1.18
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Try to fix circleci
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* 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>