refactor: removed hardcoded metric export interval and use otel default (#1621)
Signed-off-by: Michael Beemer <michael.beemer@dynatrace.com>
This commit is contained in:
parent
e8d6d6d892
commit
81c66ebf2b
|
|
@ -30,7 +30,6 @@ import (
|
|||
|
||||
const (
|
||||
metricsExporterOtel = "otel"
|
||||
exportInterval = 2 * time.Second
|
||||
)
|
||||
|
||||
type CollectorConfig struct {
|
||||
|
|
@ -196,7 +195,7 @@ func buildMetricReader(ctx context.Context, cfg Config) (metric.Reader, error) {
|
|||
return nil, fmt.Errorf("error creating otel metric exporter: %w", err)
|
||||
}
|
||||
|
||||
return metric.NewPeriodicReader(otelExporter, metric.WithInterval(exportInterval)), nil
|
||||
return metric.NewPeriodicReader(otelExporter), nil
|
||||
}
|
||||
|
||||
// buildOtlpExporter is a helper to build grpc backed otlp trace exporter
|
||||
|
|
|
|||
Loading…
Reference in New Issue