Registry / observability / otel-exporters-metric-prometheus

otel-exporters-metric-prometheus

JSON →
library0.21.0gogounverified

Package prometheus provides an OpenTelemetry metrics exporter for Prometheus, but is deprecated in favor of go.opentelemetry.io/otel/exporters/prometheus.

go get go.opentelemetry.io/otel/exporters/metric/prometheus
INSTALL
IMPORT
SIG · OTEL-EXPORTERS-MET
O
otel-exporters-metric-prometheus
observabilitygov0.21.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.

prometheus
go.opentelemetry.io/otel/exporters/metric/prometheus

Initialize the deprecated Prometheus exporter pipeline

package main import ( "context" "go.opentelemetry.io/otel/exporters/metric/prometheus" ) func main() { exporter, err := prometheus.InstallNewPipeline(prometheus.Config{}) if err != nil { panic(err) } defer exporter.Shutdown(context.Background()) }
Debug
Known issues
breakingThis package is deprecated and frozen; use go.opentelemetry.io/otel/exporters/prometheus instead.
fix
Replace import with go.opentelemetry.io/otel/exporters/prometheus and update API calls accordingly.
affects: >=0.21.0
Upgrade
Version history
0.21.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
OpenAI (training)
1
Resources