Skip to content

Commit

Permalink
add cloud providers in spring starter
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Apr 5, 2024
1 parent d4e5f60 commit f2cca85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -58,7 +58,7 @@ private EnabledTestCase(
@TestFactory
Stream<DynamicTest> 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),
Expand Down Expand Up @@ -119,6 +119,10 @@ Stream<DynamicTest> 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()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.opentelemetry.instrumentation.resources.ResourceProviderPropertiesCustomizerTest$Provider

0 comments on commit f2cca85

Please sign in to comment.