chrly/internal/otel/otel.go
2024-03-13 01:29:26 +01:00

18 lines
383 B
Go

package otel
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/trace"
)
const Scope = "ely.by/chrly"
func GetMeter(opts ...metric.MeterOption) metric.Meter {
return otel.GetMeterProvider().Meter(Scope, opts...)
}
func GetTracer(opts ...trace.TracerOption) trace.Tracer {
return otel.GetTracerProvider().Tracer(Scope, opts...)
}