remove the `millis` from the BSP config options (#2568)
This commit is contained in:
parent
3acbc5a699
commit
d516879084
|
|
@ -50,7 +50,7 @@ final class TracerProviderConfiguration {
|
||||||
static BatchSpanProcessor configureSpanProcessor(ConfigProperties config, SpanExporter exporter) {
|
static BatchSpanProcessor configureSpanProcessor(ConfigProperties config, SpanExporter exporter) {
|
||||||
BatchSpanProcessorBuilder builder = BatchSpanProcessor.builder(exporter);
|
BatchSpanProcessorBuilder builder = BatchSpanProcessor.builder(exporter);
|
||||||
|
|
||||||
Long scheduleDelayMillis = config.getLong("otel.bsp.schedule.delay.millis");
|
Long scheduleDelayMillis = config.getLong("otel.bsp.schedule.delay");
|
||||||
if (scheduleDelayMillis != null) {
|
if (scheduleDelayMillis != null) {
|
||||||
builder.setScheduleDelay(Duration.ofMillis(scheduleDelayMillis));
|
builder.setScheduleDelay(Duration.ofMillis(scheduleDelayMillis));
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +65,7 @@ final class TracerProviderConfiguration {
|
||||||
builder.setMaxExportBatchSize(maxExportBatch);
|
builder.setMaxExportBatchSize(maxExportBatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer timeout = config.getInt("otel.bsp.export.timeout.millis");
|
Integer timeout = config.getInt("otel.bsp.export.timeout");
|
||||||
if (timeout != null) {
|
if (timeout != null) {
|
||||||
builder.setExporterTimeout(Duration.ofMillis(timeout));
|
builder.setExporterTimeout(Duration.ofMillis(timeout));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class TracerProviderConfigurationTest {
|
||||||
@Test
|
@Test
|
||||||
void configureTracerProvider() {
|
void configureTracerProvider() {
|
||||||
Map<String, String> properties = new HashMap<>();
|
Map<String, String> properties = new HashMap<>();
|
||||||
properties.put("otel.bsp.schedule.delay.millis", "100000");
|
properties.put("otel.bsp.schedule.delay", "100000");
|
||||||
properties.put("otel.trace.sampler", "always_off");
|
properties.put("otel.trace.sampler", "always_off");
|
||||||
|
|
||||||
Resource resource = Resource.create(Attributes.builder().put("cat", "meow").build());
|
Resource resource = Resource.create(Attributes.builder().put("cat", "meow").build());
|
||||||
|
|
@ -97,10 +97,10 @@ class TracerProviderConfigurationTest {
|
||||||
@Test
|
@Test
|
||||||
void configureSpanProcessor_configured() {
|
void configureSpanProcessor_configured() {
|
||||||
Map<String, String> properties = new HashMap<>();
|
Map<String, String> properties = new HashMap<>();
|
||||||
properties.put("otel.bsp.schedule.delay.millis", "100000");
|
properties.put("otel.bsp.schedule.delay", "100000");
|
||||||
properties.put("otel.bsp.max.queue.size", "2");
|
properties.put("otel.bsp.max.queue.size", "2");
|
||||||
properties.put("otel.bsp.max.export.batch.size", "3");
|
properties.put("otel.bsp.max.export.batch.size", "3");
|
||||||
properties.put("otel.bsp.export.timeout.millis", "4");
|
properties.put("otel.bsp.export.timeout", "4");
|
||||||
|
|
||||||
BatchSpanProcessor processor =
|
BatchSpanProcessor processor =
|
||||||
TracerProviderConfiguration.configureSpanProcessor(
|
TracerProviderConfiguration.configureSpanProcessor(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue