From af258234b2cbbdb9cc008e536d572560977bd114 Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Thu, 12 Oct 2023 10:58:13 -0500 Subject: [PATCH] Stop setting Resource schemaUrl in autoconfigure --- .../opentelemetry/sdk/autoconfigure/ResourceConfiguration.java | 3 +-- .../sdk/autoconfigure/ResourceConfigurationTest.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/ResourceConfiguration.java b/sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/ResourceConfiguration.java index b431ad6c8d7..010d219acba 100644 --- a/sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/ResourceConfiguration.java +++ b/sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/ResourceConfiguration.java @@ -33,7 +33,6 @@ public final class ResourceConfiguration { private static final AttributeKey SERVICE_NAME = AttributeKey.stringKey("service.name"); - private static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.21.0"; // Visible for testing static final String ATTRIBUTE_PROPERTY = "otel.resource.attributes"; @@ -79,7 +78,7 @@ public static Resource createEnvironmentResource(ConfigProperties config) { resourceAttributes.put(SERVICE_NAME, serviceName); } - return Resource.create(resourceAttributes.build(), SCHEMA_URL); + return Resource.create(resourceAttributes.build()); } static Resource configureResource( diff --git a/sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/ResourceConfigurationTest.java b/sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/ResourceConfigurationTest.java index e5f34035c69..33cc9740639 100644 --- a/sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/ResourceConfigurationTest.java +++ b/sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/ResourceConfigurationTest.java @@ -43,7 +43,6 @@ void customConfigResource() { .put(stringKey("service.name"), "test-service") .put("food", "cheesecake") .put("shape", "square") - .setSchemaUrl("https://opentelemetry.io/schemas/1.21.0") .build()); }