mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
20 lines
409 B
Go
20 lines
409 B
Go
package otlpmetrics
|
|
|
|
import (
|
|
"go.opentelemetry.io/otel/exporters/stdout/stdoutmetric"
|
|
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
func LoadStdoutMetricsProvider() (sdkmetric.Exporter, error) {
|
|
return stdoutmetric.New()
|
|
}
|
|
|
|
func StdoutMetricsModule() fx.Option {
|
|
return fx.Options(
|
|
fx.Provide(
|
|
fx.Annotate(LoadStdoutMetricsProvider, fx.As(new(sdkmetric.Exporter))),
|
|
),
|
|
)
|
|
}
|