update the as per the comment

This commit is contained in:
Manendra Pal Singh
2025-12-18 12:30:28 +05:30
parent 17d9ca865d
commit 176b8f3043
14 changed files with 60 additions and 40 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/beckn-one/beckn-onix/pkg/telemetry"
)
// metricsProvider implements the MetricsProvider interface for the otelsetup plugin.
// metricsProvider implements the OtelSetupMetricsProvider interface for the otelsetup plugin.
type metricsProvider struct {
impl otelsetup.Setup
}

View File

@@ -23,7 +23,7 @@ import (
)
// Setup wires the telemetry provider. This is the concrete implementation
// behind the MetricsProvider interface.
// behind the OtelSetupMetricsProvider interface.
type Setup struct{}
// Config represents OpenTelemetry related configuration.
@@ -151,7 +151,8 @@ func (Setup) New(ctx context.Context, cfg *Config) (*telemetry.Provider, error)
}()
return &telemetry.Provider{
MeterProvider: meterProvider,
MeterProvider: meterProvider,
MetricsHandler: metricsHandler,
Shutdown: func(shutdownCtx context.Context) error {
log.Infof(ctx, "Shutting down metrics server...")
// Shutdown the metrics server