File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/core/src/v3/otel Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -301,13 +301,15 @@ export class TracingSDK {
301301 const bufferingExporter = new BufferingMetricExporter ( rawMetricExporter , exportIntervalMs ) ;
302302 const metricExporter = new TaskContextMetricExporter ( bufferingExporter ) ;
303303
304+ const exportTimeoutMillis = parseInt (
305+ getEnvVar ( "TRIGGER_OTEL_METRICS_EXPORT_TIMEOUT_MILLIS" ) ?? "30000"
306+ ) ;
307+
304308 const metricReaders : MetricReader [ ] = [
305309 new PeriodicExportingMetricReader ( {
306310 exporter : metricExporter ,
307- exportIntervalMillis : collectionIntervalMs ,
308- exportTimeoutMillis : parseInt (
309- getEnvVar ( "TRIGGER_OTEL_METRICS_EXPORT_TIMEOUT_MILLIS" ) ?? "30000"
310- ) ,
311+ exportIntervalMillis : Math . max ( collectionIntervalMs , exportTimeoutMillis ) ,
312+ exportTimeoutMillis,
311313 } ) ,
312314 ...( config . metricReaders ?? [ ] ) ,
313315 ] ;
You can’t perform that action at this time.
0 commit comments