File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
disk-buffering/src/main/java/io/opentelemetry/contrib/disk/buffering/exporters Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1919public final class LogRecordToDiskExporter implements LogRecordExporter {
2020 private final SignalStorageExporter <LogRecordData > storageExporter ;
2121 private final ExporterCallback <LogRecordData > callback ;
22+ private static final Duration DEFAULT_EXPORT_TIMEOUT = Duration .ofSeconds (10 );
2223
2324 private LogRecordToDiskExporter (
2425 SignalStorageExporter <LogRecordData > storageExporter ,
@@ -50,7 +51,7 @@ public CompletableResultCode shutdown() {
5051 public static final class Builder {
5152 private final SignalStorage .LogRecord storage ;
5253 private ExporterCallback <LogRecordData > callback = ExporterCallback .noop ();
53- private Duration writeTimeout = Duration . ofSeconds ( 10 ) ;
54+ private Duration writeTimeout = DEFAULT_EXPORT_TIMEOUT ;
5455
5556 @ CanIgnoreReturnValue
5657 public Builder setExporterCallback (ExporterCallback <LogRecordData > value ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public final class MetricToDiskExporter implements MetricExporter {
2323 private final SignalStorageExporter <MetricData > storageExporter ;
2424 private final AggregationTemporalitySelector aggregationTemporalitySelector ;
2525 private final ExporterCallback <MetricData > callback ;
26+ private static final Duration DEFAULT_EXPORT_TIMEOUT = Duration .ofSeconds (10 );
2627
2728 private MetricToDiskExporter (
2829 SignalStorageExporter <MetricData > storageExporter ,
@@ -63,7 +64,7 @@ public static final class Builder {
6364 private AggregationTemporalitySelector aggregationTemporalitySelector =
6465 AggregationTemporalitySelector .alwaysCumulative ();
6566 private ExporterCallback <MetricData > callback = ExporterCallback .noop ();
66- private Duration writeTimeout = Duration . ofSeconds ( 10 ) ;
67+ private Duration writeTimeout = DEFAULT_EXPORT_TIMEOUT ;
6768
6869 @ CanIgnoreReturnValue
6970 public Builder setExporterCallback (ExporterCallback <MetricData > value ) {
Original file line number Diff line number Diff line change 1717
1818/** Exporter that stores spans into disk. */
1919public final class SpanToDiskExporter implements SpanExporter {
20-
2120 private final SignalStorageExporter <SpanData > storageExporter ;
2221 private final ExporterCallback <SpanData > callback ;
22+ private static final Duration DEFAULT_EXPORT_TIMEOUT = Duration .ofSeconds (10 );
2323
2424 private SpanToDiskExporter (
2525 SignalStorageExporter <SpanData > storageExporter , ExporterCallback <SpanData > callback ) {
@@ -50,7 +50,7 @@ public CompletableResultCode shutdown() {
5050 public static final class Builder {
5151 private final SignalStorage .Span storage ;
5252 private ExporterCallback <SpanData > callback = ExporterCallback .noop ();
53- private Duration writeTimeout = Duration . ofSeconds ( 10 ) ;
53+ private Duration writeTimeout = DEFAULT_EXPORT_TIMEOUT ;
5454
5555 private Builder (SignalStorage .Span storage ) {
5656 this .storage = storage ;
You can’t perform that action at this time.
0 commit comments