Skip to content

Commit

Permalink
don't configure metrics export timeout (#9053)
Browse files Browse the repository at this point in the history
1 second is a bit too low, seems like we hit it in some deployment
environments. let's just ride with the default (currently 30s) until
it's proven that we need to set something different.

Signed-off-by: Alex Suraci <[email protected]>
  • Loading branch information
vito authored Nov 26, 2024
1 parent 64850c4 commit de8e3c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions telemetry/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,10 @@ func Init(ctx context.Context, cfg Config) context.Context {
sdkmetric.WithResource(cfg.Resource),
}
const metricsExportInterval = 1 * time.Second
const metricsExportTimeout = 1 * time.Second
for _, exp := range cfg.LiveMetricExporters {
MetricExporters = append(MetricExporters, exp)
reader := sdkmetric.NewPeriodicReader(exp,
sdkmetric.WithInterval(metricsExportInterval),
sdkmetric.WithTimeout(metricsExportTimeout),
)
sdkmetric.WithInterval(metricsExportInterval))
meterOpts = append(meterOpts, sdkmetric.WithReader(reader))
}
ctx = WithMeterProvider(ctx, sdkmetric.NewMeterProvider(meterOpts...))
Expand Down

0 comments on commit de8e3c0

Please sign in to comment.