Registry /
observability / otel-exporters-otlp-otlpmetric-otlpmetricgrpc
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.
otlpmetricgrpc
✓ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
Creates an OTLP metric exporter using gRPC and registers it with a MeterProvider.
package main
import (
"context"
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
"go.opentelemetry.io/otel/sdk/metric"
)
func main() {
exp, err := otlpmetricgrpc.New(context.Background())
if err != nil {
panic(err)
}
_ = metric.NewMeterProvider(metric.WithReader(metric.NewPeriodicReader(exp)))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.44.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.