Skip to content

Commit

Permalink
chore: update otlp metrics interval to 5s
Browse files Browse the repository at this point in the history
  • Loading branch information
murakamikaze committed Nov 9, 2024
1 parent d8aed05 commit f75672f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/metrics/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func InitProvider(ctx context.Context, cfg MetricsConfig) error {

reader := sdkmetric.NewPeriodicReader(
otlpExporter,
sdkmetric.WithInterval(15*time.Second),
sdkmetric.WithInterval(5*time.Second),
)
opts = append(opts, sdkmetric.WithReader(reader))
}
Expand Down
2 changes: 1 addition & 1 deletion internal/metrics/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func setupOTLPExporter(ctx context.Context, endpoint string) error {
return fmt.Errorf("failed to create OTLP exporter: %w", err)
}

reader := metric.NewPeriodicReader(exporter, metric.WithInterval(15*time.Second))
reader := metric.NewPeriodicReader(exporter, metric.WithInterval(5*time.Second))
opts := []metric.Option{metric.WithReader(reader)}

provider := metric.NewMeterProvider(opts...)
Expand Down

0 comments on commit f75672f

Please sign in to comment.