Skip to content

Update upstream OpenTelemetry agent dependencies to 2.19.0 #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;

import co.elastic.otel.testing.OtelReflectionUtils;
import io.opentelemetry.common.ComponentLoader;
import io.opentelemetry.javaagent.tooling.EmptyConfigProperties;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
Expand All @@ -39,6 +40,10 @@

class ElasticAutoConfigurationCustomizerProviderTest {

private static final ComponentLoader componentLoader =
ComponentLoader.forClassLoader(
ElasticAutoConfigurationCustomizerProviderTest.class.getClassLoader());

@Test
void defaultConfiguration() {
Map<String, String> config = propertiesCustomizer(EmptyConfigProperties.INSTANCE);
Expand All @@ -58,7 +63,8 @@ void defaultConfiguration() {
void disableCustomResourceProvider() {
Map<String, String> userConfig = new HashMap<>();
userConfig.put("otel.java.disabled.resource.providers", "my.disabled.provider.Provider");
Map<String, String> config = propertiesCustomizer(DefaultConfigProperties.create(userConfig));
Map<String, String> config =
propertiesCustomizer(DefaultConfigProperties.create(userConfig, componentLoader));
String value = config.get("otel.java.disabled.resource.providers");
assertThat(value)
.satisfies(
Expand All @@ -73,15 +79,16 @@ void disableCustomResourceProvider() {
void disableExperimentalRuntimeMetrics() {
Map<String, String> userConfig = new HashMap<>();
userConfig.put("otel.instrumentation.runtime-telemetry.emit-experimental-telemetry", "false");
Map<String, String> config = propertiesCustomizer(DefaultConfigProperties.create(userConfig));
Map<String, String> config =
propertiesCustomizer(DefaultConfigProperties.create(userConfig, componentLoader));
String value = config.get("otel.instrumentation.runtime-telemetry.emit-experimental-telemetry");
assertThat(value).isEqualTo("false");
}

@Test
void ensureDefaultMetricTemporalityIsDelta() {
Map<String, String> config =
propertiesCustomizer(DefaultConfigProperties.create(new HashMap<>()));
propertiesCustomizer(DefaultConfigProperties.create(new HashMap<>(), componentLoader));
String value = config.get("otel.exporter.otlp.metrics.temporality.preference");
assertThat(value).isEqualTo("DELTA");
}
Expand All @@ -90,7 +97,8 @@ void ensureDefaultMetricTemporalityIsDelta() {
void customizeMetricTemporalityPreference() {
Map<String, String> userConfig = new HashMap<>();
userConfig.put("otel.exporter.otlp.metrics.temporality.preference", "LOWMEMORY");
Map<String, String> config = propertiesCustomizer(DefaultConfigProperties.create(userConfig));
Map<String, String> config =
propertiesCustomizer(DefaultConfigProperties.create(userConfig, componentLoader));
String value = config.get("otel.exporter.otlp.metrics.temporality.preference");
assertThat(value).isEqualTo("LOWMEMORY");
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ opentelemetryProto = "1.3.2-alpha"

# otel agent, we rely on the '*-alpha' and get the non-alpha dependencies transitively
# updated from upstream agent with gradle/update-upstream.sh
opentelemetryJavaagentAlpha = "2.17.1-alpha"
opentelemetryJavaagentAlpha = "2.19.0-alpha"

# otel contrib
# updated from upstream agent with gradle/update-upstream.sh
opentelemetryContribAlpha = "1.46.0-alpha"
opentelemetryContribAlpha = "1.48.0-alpha"

# otel semconv
# updated from upstream agent with gradle/update-upstream.sh
Expand Down
Loading