diff --git a/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts b/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts index 9c9bd2538301..be032253e623 100644 --- a/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts +++ b/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts @@ -21,12 +21,12 @@ dependencies { api("io.opentelemetry:opentelemetry-sdk") api(project(":instrumentation-annotations")) - implementation("io.opentelemetry.contrib:opentelemetry-aws-resources:1.33.0-alpha") { + implementation("io.opentelemetry.contrib:opentelemetry-aws-resources") { exclude("com.fasterxml.jackson.core", "jackson-core") exclude("com.squareup.okhttp3", "okhttp") } - implementation("io.opentelemetry.contrib:opentelemetry-gcp-resources:1.33.0-alpha") { + implementation("io.opentelemetry.contrib:opentelemetry-gcp-resources") { exclude("com.fasterxml.jackson.core", "jackson-core") } } diff --git a/javaagent-tooling/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider b/javaagent-tooling/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider deleted file mode 100644 index b84338e8b6d5..000000000000 --- a/javaagent-tooling/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider +++ /dev/null @@ -1 +0,0 @@ -io.opentelemetry.javaagent.tooling.config.ResourceProviderPropertiesCustomizerTest$Provider diff --git a/sdk-autoconfigure-support/src/main/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizer.java b/sdk-autoconfigure-support/src/main/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizer.java similarity index 95% rename from sdk-autoconfigure-support/src/main/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizer.java rename to sdk-autoconfigure-support/src/main/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizer.java index d80ddf636780..f82af6886866 100644 --- a/sdk-autoconfigure-support/src/main/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizer.java +++ b/sdk-autoconfigure-support/src/main/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizer.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.autoconfigure; +package io.opentelemetry.instrumentation.resources; import com.google.auto.service.AutoService; import io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizer; @@ -38,7 +38,7 @@ public class ResourceProviderPropertiesCustomizer implements AutoConfigurationCu "io.opentelemetry.contrib.gcp.resource.GCPResourceProvider", "gcp"); // for testing DISABLED_BY_DEFAULT_RESOURCE_PROVIDERS.put( - "io.opentelemetry.javaagent.tooling.config.ResourceProviderPropertiesCustomizerTest$Provider", + "io.opentelemetry.instrumentation.resources.ResourceProviderPropertiesCustomizerTest$Provider", "test"); } diff --git a/sdk-autoconfigure-support/src/test/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizerTest.java b/sdk-autoconfigure-support/src/test/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizerTest.java similarity index 93% rename from sdk-autoconfigure-support/src/test/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizerTest.java rename to sdk-autoconfigure-support/src/test/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizerTest.java index e7dc8a51d95a..18928d915917 100644 --- a/sdk-autoconfigure-support/src/test/java/io/opentelemetry/javaagent/autoconfigure/ResourceProviderPropertiesCustomizerTest.java +++ b/sdk-autoconfigure-support/src/test/java/io/opentelemetry/instrumentation/resources/ResourceProviderPropertiesCustomizerTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.autoconfigure; +package io.opentelemetry.instrumentation.resources; import static org.assertj.core.api.Assertions.assertThat; @@ -58,7 +58,7 @@ private EnabledTestCase( @TestFactory Stream enabledTestCases() { String className = - "io.opentelemetry.javaagent.tooling.config.ResourceProviderPropertiesCustomizerTest$Provider"; + "io.opentelemetry.instrumentation.resources.ResourceProviderPropertiesCustomizerTest$Provider"; return Stream.of( new EnabledTestCase( "explicitEnabled", true, Collections.emptySet(), Collections.emptySet(), true), @@ -119,6 +119,10 @@ Stream enabledTestCases() { Boolean.toString(tc.explicitEnabled)); } + props.put("otel.traces.exporter", "none"); + props.put("otel.metrics.exporter", "none"); + props.put("otel.logs.exporter", "none"); + Attributes attributes = SdkAutoconfigureAccess.getResourceAttributes( AutoConfiguredOpenTelemetrySdk.builder() diff --git a/sdk-autoconfigure-support/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider b/sdk-autoconfigure-support/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider new file mode 100644 index 000000000000..243cb5615b57 --- /dev/null +++ b/sdk-autoconfigure-support/src/test/resources/META-INF/services/io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider @@ -0,0 +1 @@ +io.opentelemetry.instrumentation.resources.ResourceProviderPropertiesCustomizerTest$Provider