client_golang/prometheus/internal
Arianna Vespri 3ad272204b
Add default Go runtime metrics for /gc/gogc:percent, /gc/gomemlimit:bytes, /sched/gomaxprocs:threads (#1559)
* Add go_gomaxprocs, go_gogc_percent and go_gomemlimit to the default Go runtime metrics

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Move newly added metrics out of base metrics and into goCollector

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Rethink struct for newly added metrics, adapt and add tests

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Simplify new metrics reading

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Correct loop, add debugging lines

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Make goRuntimeEnvVarsMetrics function Go version dependent

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Fix go mod

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Remove debuggin line

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Move default runtime metrics into the runtime metrics flow, change tests accordingly

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* Go version expected default runtime metrics map for tests

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

* 1.21 update.

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

* Addressed comments on Arianna's PR.

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

* Use default GoCollector func in test

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>

---------

Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
Signed-off-by: bwplotka <bwplotka@gmail.com>
Co-authored-by: bwplotka <bwplotka@gmail.com>
2024-08-09 20:27:25 +01:00
..
almost_equal.go Fix float64 comparison test failure on archs using FMA (#1133) 2022-11-07 19:20:43 +01:00
difflib.go Fix typos in comments, tests, and errors (#1346) 2023-09-21 12:31:08 +01:00
difflib_test.go fix assorted oddities found by golangci-lint (#1040) 2022-08-03 06:30:51 +02:00
go_collector_options.go Add default Go runtime metrics for /gc/gogc:percent, /gc/gomemlimit:bytes, /sched/gomaxprocs:threads (#1559) 2024-08-09 20:27:25 +01:00
go_runtime_metrics.go fix assorted oddities found by golangci-lint (#1040) 2022-08-03 06:30:51 +02:00
go_runtime_metrics_test.go Use the runtime/metrics package for the Go collector for 1.17+ (#955) 2022-01-16 16:41:56 +00:00
metric.go Added Transactional Gatherer allowed cached solutions (#989) 2022-02-23 11:22:52 +00:00