From 691bd2576204669182347264381faf1b48778dc9 Mon Sep 17 00:00:00 2001 From: Cyrille Le Clerc Date: Tue, 14 Jan 2025 10:32:36 +0100 Subject: [PATCH] Use `otel.metric.export.interval` instead of the no longer used `otel.imr.export.interval` + replace static config entries by the usage of the generic properties text field --- ...nkinsOpenTelemetryPluginConfiguration.java | 35 ++++++++++++++++--- .../OpenTelemetryConfiguration.java | 30 +++------------- .../OtelEnvironmentContributorService.java | 2 +- .../semconv/ConfigurationKey.java | 9 ++++- .../config.jelly | 20 ++++------- .../help-configurationProperties.html | 4 +-- .../help-disabledResourceProviders.html | 2 +- .../help-exportIntervalMillis.html | 3 -- .../help-exporterIntervalMillis.html | 3 -- .../help-exporterTimeoutMillis.html | 3 -- .../jcasc/ConfigurationAsCodeDefaultTest.java | 3 -- ...AsCodeElasticLogsBackendExclusiveTest.java | 3 -- ...igurationAsCodeElasticLogsBackendTest.java | 3 -- .../jcasc/ConfigurationAsCodeElasticTest.java | 3 -- .../jcasc/ConfigurationAsCodeJaegerTest.java | 3 -- .../jcasc/ConfigurationAsCodeTest.java | 3 -- .../jcasc/ConfigurationAsCodeZipkinTest.java | 3 -- 17 files changed, 54 insertions(+), 78 deletions(-) delete mode 100644 src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exportIntervalMillis.html delete mode 100644 src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterIntervalMillis.html delete mode 100644 src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterTimeoutMillis.html diff --git a/src/main/java/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration.java b/src/main/java/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration.java index 73701928d..f9a58c701 100644 --- a/src/main/java/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration.java +++ b/src/main/java/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration.java @@ -81,7 +81,7 @@ import static io.jenkins.plugins.opentelemetry.OtelUtils.UNKNOWN; import static io.jenkins.plugins.opentelemetry.backend.ObservabilityBackend.ICONS_PREFIX; -@Extension(ordinal = Integer.MAX_VALUE-1 /* initialize OTel ASAP, just after loading JenkinsControllerOpenTelemetry as GlobalOpenTelemetry */) +@Extension(ordinal = Integer.MAX_VALUE - 1 /* initialize OTel ASAP, just after loading JenkinsControllerOpenTelemetry as GlobalOpenTelemetry */) @Symbol("openTelemetry") public class JenkinsOpenTelemetryPluginConfiguration extends GlobalConfiguration { private final static Logger LOGGER = Logger.getLogger(JenkinsOpenTelemetryPluginConfiguration.class.getName()); @@ -121,8 +121,10 @@ public class JenkinsOpenTelemetryPluginConfiguration extends GlobalConfiguration private List observabilityBackends = new ArrayList<>(); + @Deprecated private Integer exporterTimeoutMillis = null; + @Deprecated private Integer exporterIntervalMillis = null; private String ignoredSteps = "dir,echo,isUnix,pwd,properties"; @@ -188,8 +190,33 @@ public boolean configure(StaplerRequest2 req, JSONObject json) throws FormExcept protected Object readResolve() { LOGGER.log(Level.FINE, "readResolve()"); + boolean configModified = false; if (this.disabledResourceProviders == null) { this.disabledResourceProviders = JenkinsControllerOpenTelemetry.DEFAULT_OTEL_JAVA_DISABLED_RESOURCE_PROVIDERS; + LOGGER.log(Level.INFO, "Migration of the 'disabledResourceProviders' config param"); + configModified = true; + } + if (this.exporterTimeoutMillis != null) { + this.configurationProperties = + this.configurationProperties + "\n" + + "# Migration of the 'exporterTimeoutMillis' config param to 'otel.exporter.otlp.timeout' property\n" + + OTEL_EXPORTER_OTLP_TIMEOUT.asProperty() + "=" + this.exporterTimeoutMillis; + this.exporterTimeoutMillis = null; + LOGGER.log(Level.INFO, "Migration of the 'exporterTimeoutMillis' config param to 'otel.exporter.otlp.timeout' property"); + configModified = true; + } + if (this.exporterIntervalMillis != null) { + this.configurationProperties = + this.configurationProperties + "\n" + + "# Migration of the 'exporterIntervalMillis' config param to 'otel.metric.export.interval' property\n" + + OTEL_METRIC_EXPORT_INTERVAL.asProperty() + "=" + this.exporterIntervalMillis; + this.exporterIntervalMillis = null; + LOGGER.log(Level.INFO, "Migration of the 'exporterIntervalMillis' config param to 'otel.metric.export.interval' property"); + configModified = true; + } + + if (configModified) { + save(); } return this; } @@ -218,8 +245,6 @@ public OpenTelemetryConfiguration toOpenTelemetryConfiguration() { Optional.ofNullable(this.getEndpoint()), Optional.ofNullable(this.getTrustedCertificatesPem()), Optional.of(this.getAuthentication()), - Optional.ofNullable(this.getExporterTimeoutMillis()), - Optional.ofNullable(this.getExporterIntervalMillis()), Optional.ofNullable(this.getServiceName()), Optional.ofNullable(this.getServiceNamespace()), Optional.ofNullable(this.getDisabledResourceProviders()), @@ -318,16 +343,19 @@ public List getObservabilityBackends() { return observabilityBackends; } + @Deprecated public Integer getExporterTimeoutMillis() { return exporterTimeoutMillis; } + @Deprecated @DataBoundSetter public void setExporterTimeoutMillis(Integer exporterTimeoutMillis) { this.exporterTimeoutMillis = exporterTimeoutMillis; } + @Deprecated public Integer getExporterIntervalMillis() { return exporterIntervalMillis; } @@ -335,7 +363,6 @@ public Integer getExporterIntervalMillis() { @DataBoundSetter public void setExporterIntervalMillis(Integer exporterIntervalMillis) { this.exporterIntervalMillis = exporterIntervalMillis; - } public String getIgnoredSteps() { diff --git a/src/main/java/io/jenkins/plugins/opentelemetry/OpenTelemetryConfiguration.java b/src/main/java/io/jenkins/plugins/opentelemetry/OpenTelemetryConfiguration.java index 9e544c7b9..1e06a84b7 100644 --- a/src/main/java/io/jenkins/plugins/opentelemetry/OpenTelemetryConfiguration.java +++ b/src/main/java/io/jenkins/plugins/opentelemetry/OpenTelemetryConfiguration.java @@ -34,21 +34,16 @@ public class OpenTelemetryConfiguration { private final Optional endpoint; private final Optional trustedCertificatesPem; private final Optional authentication; - private final Optional exporterTimeoutMillis; - private final Optional exporterIntervalMillis; private final Optional serviceName; private final Optional serviceNamespace; private final Optional disabledResourceProviders; private final Map configurationProperties; public OpenTelemetryConfiguration(Optional endpoint, Optional trustedCertificatesPem, Optional authentication, - Optional exporterTimeoutMillis, Optional exporterIntervalMillis, Optional serviceName, Optional serviceNamespace, Optional disabledResourceProviders, Map configurationProperties) { this.endpoint = endpoint.filter(StringUtils::isNotBlank); this.trustedCertificatesPem = trustedCertificatesPem.filter(StringUtils::isNotBlank); this.authentication = authentication; - this.exporterTimeoutMillis = exporterTimeoutMillis; - this.exporterIntervalMillis = exporterIntervalMillis; this.serviceName = serviceName.filter(StringUtils::isNotBlank); this.serviceNamespace = serviceNamespace.filter(StringUtils::isNotBlank); this.disabledResourceProviders = disabledResourceProviders.filter(StringUtils::isNotBlank); @@ -81,14 +76,6 @@ public Optional getTrustedCertificatesPem() { return trustedCertificatesPem; } - public Optional getExporterTimeoutMillis() { - return exporterTimeoutMillis; - } - - public Optional getExporterIntervalMillis() { - return exporterIntervalMillis; - } - public Optional getDisabledResourceProviders() { return disabledResourceProviders; } @@ -102,7 +89,7 @@ public Map toOpenTelemetryProperties() { if (TESTING_INMEMORY_MODE) { properties.put(OTEL_TRACES_EXPORTER.asProperty(), "testing"); properties.put(OTEL_METRICS_EXPORTER.asProperty(), "testing"); - properties.put(OTEL_IMR_EXPORT_INTERVAL.asProperty(), "10ms"); + properties.put(OTEL_METRIC_EXPORT_INTERVAL.asProperty(), "10ms"); } else if (this.getEndpoint().isPresent()) { this.getEndpoint().ifPresent(endpoint -> { // prepare of Optional.ifPResentOrElse() properties.compute(OTEL_TRACES_EXPORTER.asProperty(), (key, oldValue) -> { @@ -142,14 +129,8 @@ public Map toOpenTelemetryProperties() { this.getAuthentication().ifPresent(authentication -> authentication.enrichOpenTelemetryAutoConfigureConfigProperties(properties)); - this.getExporterTimeoutMillis().map(Object::toString).ifPresent(exporterTimeoutMillis -> - properties.put(OTEL_EXPORTER_OTLP_TIMEOUT.asProperty(), exporterTimeoutMillis)); - - this.getExporterIntervalMillis().map(Object::toString).ifPresent(exporterIntervalMillis -> - properties.put(OTEL_IMR_EXPORT_INTERVAL.asProperty(), exporterIntervalMillis)); - this.getDisabledResourceProviders().ifPresent(disabledResourceProviders -> - properties.put("otel.java.disabled.resource.providers", disabledResourceProviders)); + properties.put(OTEL_JAVA_DISABLED_RESOURCE_PROVIDERS.asProperty(), disabledResourceProviders)); return properties; } @@ -193,8 +174,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; OpenTelemetryConfiguration that = (OpenTelemetryConfiguration) o; return Objects.equals(endpoint, that.endpoint) && Objects.equals(authentication, that.authentication) && - Objects.equals(trustedCertificatesPem, that.trustedCertificatesPem) && Objects.equals(exporterTimeoutMillis, that.exporterTimeoutMillis) && - Objects.equals(exporterIntervalMillis, that.exporterIntervalMillis) && + Objects.equals(trustedCertificatesPem, that.trustedCertificatesPem) && Objects.equals(serviceName, that.serviceName) && Objects.equals(serviceNamespace, that.serviceNamespace) && Objects.equals(disabledResourceProviders, that.disabledResourceProviders) && Objects.equals(configurationProperties, that.configurationProperties); @@ -202,7 +182,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(endpoint, authentication, trustedCertificatesPem, exporterTimeoutMillis, exporterIntervalMillis, serviceName, serviceNamespace, disabledResourceProviders, configurationProperties); + return Objects.hash(endpoint, authentication, trustedCertificatesPem, serviceName, serviceNamespace, disabledResourceProviders, configurationProperties); } @Override @@ -211,8 +191,6 @@ public String toString() { "endpoint='" + endpoint + '\'' + ", trustedCertificatesPem.defined=" + trustedCertificatesPem.isPresent() + ", authentication=" + authentication + - ", exporterTimeoutMillis=" + exporterTimeoutMillis + - ", exporterIntervalMillis=" + exporterIntervalMillis + ", serviceName=" + serviceName + ", serviceNamespace=" + serviceNamespace + ", disabledResourceProviders=" + disabledResourceProviders + diff --git a/src/main/java/io/jenkins/plugins/opentelemetry/job/OtelEnvironmentContributorService.java b/src/main/java/io/jenkins/plugins/opentelemetry/job/OtelEnvironmentContributorService.java index 1b37d76d6..1703804f2 100644 --- a/src/main/java/io/jenkins/plugins/opentelemetry/job/OtelEnvironmentContributorService.java +++ b/src/main/java/io/jenkins/plugins/opentelemetry/job/OtelEnvironmentContributorService.java @@ -41,7 +41,7 @@ public class OtelEnvironmentContributorService { OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_TIMEOUT, - OTEL_IMR_EXPORT_INTERVAL, + OTEL_METRIC_EXPORT_INTERVAL, OTEL_LOGS_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_TRACES_EXPORTER diff --git a/src/main/java/io/jenkins/plugins/opentelemetry/semconv/ConfigurationKey.java b/src/main/java/io/jenkins/plugins/opentelemetry/semconv/ConfigurationKey.java index 647452b4d..bb7961853 100644 --- a/src/main/java/io/jenkins/plugins/opentelemetry/semconv/ConfigurationKey.java +++ b/src/main/java/io/jenkins/plugins/opentelemetry/semconv/ConfigurationKey.java @@ -17,12 +17,19 @@ public final class ConfigurationKey { public static final ConfigurationKey OTEL_EXPORTER_OTLP_TIMEOUT = new ConfigurationKey("otel.exporter.otlp.timeout"); public static final ConfigurationKey OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = new ConfigurationKey("otel.exporter.otlp.traces.endpoint"); public static final ConfigurationKey OTEL_EXPORTER_PROMETHEUS_PORT = new ConfigurationKey("otel.exporter.prometheus.port"); - public static final ConfigurationKey OTEL_IMR_EXPORT_INTERVAL = new ConfigurationKey("otel.imr.export.interval"); + + public static final ConfigurationKey OTEL_JAVA_DISABLED_RESOURCE_PROVIDERS = new ConfigurationKey("otel.java.disabled.resource.providers"); + public static final ConfigurationKey OTEL_LOGS_EXPORTER = new ConfigurationKey("otel.logs.exporter"); public static final ConfigurationKey OTEL_LOGS_MIRROR_TO_DISK = new ConfigurationKey("otel.logs.mirror_to_disk"); + + public static final ConfigurationKey OTEL_METRIC_EXPORT_INTERVAL = new ConfigurationKey("otel.metric.export.interval"); public static final ConfigurationKey OTEL_METRICS_EXPORTER = new ConfigurationKey("otel.metrics.exporter"); + public static final ConfigurationKey OTEL_RESOURCE_ATTRIBUTES = new ConfigurationKey("otel.resource.attributes"); + public static final ConfigurationKey OTEL_SERVICE_NAME = new ConfigurationKey("otel.service.name"); + public static final ConfigurationKey OTEL_TRACES_EXPORTER = new ConfigurationKey("otel.traces.exporter"); public static final ConfigurationKey OTEL_INSTRUMENTATION_JENKINS_WEB_ENABLED = new ConfigurationKey("otel.instrumentation.jenkins.web.enabled"); diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly index 028f60fd8..77bfc2711 100644 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly +++ b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/config.jelly @@ -1,5 +1,5 @@ - + @@ -27,7 +27,10 @@ /> - + + + + @@ -39,16 +42,7 @@ - - - - - - - - - - + @@ -57,7 +51,7 @@ - + diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-configurationProperties.html b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-configurationProperties.html index e3a3bed81..23aa8781a 100644 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-configurationProperties.html +++ b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-configurationProperties.html @@ -39,7 +39,7 @@

The configuration properties of the OpenTelemetry SDK are also supported. See: - OpenTelemetry SDK Autoconfigure + href="https://opentelemetry.io/docs/languages/java/configuration/"> + OpenTelemetry Docs / Java / Configure the SDK

\ No newline at end of file diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-disabledResourceProviders.html b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-disabledResourceProviders.html index 6b1117c76..3a1578e8a 100644 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-disabledResourceProviders.html +++ b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-disabledResourceProviders.html @@ -4,7 +4,7 @@

See - OpenTelemetry SDK Autoconfigure / OpenTelemetry Resource / Disabling Automatic ResourceProviders + OpenTelemetry SDK Autoconfigure / OpenTelemetry Resource / Disabling Automatic ResourceProviders otel.java.disabled.resource.providers

diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exportIntervalMillis.html b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exportIntervalMillis.html deleted file mode 100644 index 65436200a..000000000 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exportIntervalMillis.html +++ /dev/null @@ -1,3 +0,0 @@ -
- Sets the maximum time to wait for the collector to process an exported batch of metrics. Default: 60000 milliseconds -
diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterIntervalMillis.html b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterIntervalMillis.html deleted file mode 100644 index 501206442..000000000 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterIntervalMillis.html +++ /dev/null @@ -1,3 +0,0 @@ -
- Sets the export interval. Default: 60000 milliseconds -
diff --git a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterTimeoutMillis.html b/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterTimeoutMillis.html deleted file mode 100644 index 7fcd7ed00..000000000 --- a/src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exporterTimeoutMillis.html +++ /dev/null @@ -1,3 +0,0 @@ -
- Sets the maximum time to wait for the collector to process an exported batch of spans or metrics in milliseconds. Default: 30000 milliseconds -
diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeDefaultTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeDefaultTest.java index aa80ca7e5..ddc61b0e6 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeDefaultTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeDefaultTest.java @@ -48,9 +48,6 @@ public void should_support_configuration_as_code() { OtlpAuthentication authentication = configuration.getAuthentication(); MatcherAssert.assertThat(authentication, CoreMatchers.is(instanceOf(NoAuthentication.class))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getIgnoredSteps(), CoreMatchers.is("dir,echo,isUnix,pwd,properties")); MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("jenkins")); diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendExclusiveTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendExclusiveTest.java index 8299bc607..ef167048e 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendExclusiveTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendExclusiveTest.java @@ -51,9 +51,6 @@ public void should_support_configuration_as_code() { OtlpAuthentication authentication = configuration.getAuthentication(); MatcherAssert.assertThat(authentication, CoreMatchers.is(instanceOf(NoAuthentication.class))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getIgnoredSteps(), CoreMatchers.is("dir,echo,isUnix,pwd,properties")); MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("jenkins")); diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendTest.java index 9399cef78..d6f2b807c 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticLogsBackendTest.java @@ -52,9 +52,6 @@ public void should_support_configuration_as_code() { OtlpAuthentication authentication = configuration.getAuthentication(); MatcherAssert.assertThat(authentication, CoreMatchers.is(instanceOf(NoAuthentication.class))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.nullValue()); - MatcherAssert.assertThat(configuration.getIgnoredSteps(), CoreMatchers.is("dir,echo,isUnix,pwd,properties")); MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("jenkins")); diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticTest.java index 9f7a2cd35..fecbf8962 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeElasticTest.java @@ -45,9 +45,6 @@ public void should_support_configuration_as_code() { MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("my-jenkins")); MatcherAssert.assertThat(configuration.getServiceNamespace(), CoreMatchers.is("ci")); - - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.is(Integer.valueOf(60_000))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.is(Integer.valueOf(30_000))); } @Test diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeJaegerTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeJaegerTest.java index 2fa444ef0..8be08ca6c 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeJaegerTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeJaegerTest.java @@ -47,9 +47,6 @@ public void should_support_configuration_as_code() { MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("my-jenkins")); MatcherAssert.assertThat(configuration.getServiceNamespace(), CoreMatchers.is("ci")); - - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.is(Integer.valueOf(60_000))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.is(Integer.valueOf(30_000))); } @Test diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeTest.java index e4bf84035..f21771785 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeTest.java @@ -63,9 +63,6 @@ public void should_support_configuration_as_code() { MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("my-jenkins")); MatcherAssert.assertThat(configuration.getServiceNamespace(), CoreMatchers.is("ci")); - - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.is(Integer.valueOf(60_000))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.is(Integer.valueOf(30_000))); } @Test diff --git a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeZipkinTest.java b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeZipkinTest.java index 7b0149972..e3255ade2 100644 --- a/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeZipkinTest.java +++ b/src/test/java/io/jenkins/plugins/opentelemetry/jcasc/ConfigurationAsCodeZipkinTest.java @@ -47,9 +47,6 @@ public void should_support_configuration_as_code() { MatcherAssert.assertThat(configuration.getServiceName(), CoreMatchers.is("my-jenkins")); MatcherAssert.assertThat(configuration.getServiceNamespace(), CoreMatchers.is("ci")); - - MatcherAssert.assertThat(configuration.getExporterIntervalMillis(), CoreMatchers.is(Integer.valueOf(60_000))); - MatcherAssert.assertThat(configuration.getExporterTimeoutMillis(), CoreMatchers.is(Integer.valueOf(30_000))); } @Test