Registry / serialization / prometheus-prom2json

prometheus-prom2json

JSON →
library1.5.0gogounverified

Converts Prometheus exposition format to JSON.

go get github.com/prometheus/prom2json
INSTALL
IMPORT
SIG · PROMETHEUS-PROM2JS
P
prometheus-prom2json
serializationgov1.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prom2json
✓ github.com/prometheus/prom2json

Parses Prometheus metrics text and returns JSON.

package main import ( "fmt" "github.com/prometheus/prom2json" ) func main() { // Example usage: parse a Prometheus metrics string metrics := "# HELP go_gc_duration_seconds A summary of the GC invocation durations.\n# TYPE go_gc_duration_seconds summary\ngo_gc_duration_seconds{quantile=\"0\"} 0.0001\n" result, _ := prom2json.Parse(metrics) fmt.Println(result) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.5.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
2
Resources
prometheus-prom2json — go get prometheus-prom2json · libregistry