From 18d25572c592bf46f4e0856917c667cd661545e2 Mon Sep 17 00:00:00 2001 From: Robert Elliot Date: Thu, 31 Oct 2024 16:38:49 +0000 Subject: [PATCH] fix(deps): move to io.opentelemetry.semconv:opentelemetry-semconv (#1041) Signed-off-by: Robert Elliot --- .sdkmanrc | 1 + hooks/open-telemetry/pom.xml | 6 +++--- .../openfeature/contrib/hooks/otel/OTelCommons.java | 11 +++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 .sdkmanrc diff --git a/.sdkmanrc b/.sdkmanrc new file mode 100644 index 000000000..86eb302e5 --- /dev/null +++ b/.sdkmanrc @@ -0,0 +1 @@ +java=8.0.312-tem diff --git a/hooks/open-telemetry/pom.xml b/hooks/open-telemetry/pom.xml index 2a60363aa..e8e7bb7b8 100644 --- a/hooks/open-telemetry/pom.xml +++ b/hooks/open-telemetry/pom.xml @@ -39,9 +39,9 @@ - io.opentelemetry - opentelemetry-semconv - 1.30.1-alpha + io.opentelemetry.semconv + opentelemetry-semconv-incubating + 1.28.0-alpha diff --git a/hooks/open-telemetry/src/main/java/dev/openfeature/contrib/hooks/otel/OTelCommons.java b/hooks/open-telemetry/src/main/java/dev/openfeature/contrib/hooks/otel/OTelCommons.java index 7e2ad0324..b56d1239a 100644 --- a/hooks/open-telemetry/src/main/java/dev/openfeature/contrib/hooks/otel/OTelCommons.java +++ b/hooks/open-telemetry/src/main/java/dev/openfeature/contrib/hooks/otel/OTelCommons.java @@ -1,16 +1,19 @@ package dev.openfeature.contrib.hooks.otel; import io.opentelemetry.api.common.AttributeKey; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; + +import static io.opentelemetry.semconv.incubating.FeatureFlagIncubatingAttributes.FEATURE_FLAG_KEY; +import static io.opentelemetry.semconv.incubating.FeatureFlagIncubatingAttributes.FEATURE_FLAG_PROVIDER_NAME; +import static io.opentelemetry.semconv.incubating.FeatureFlagIncubatingAttributes.FEATURE_FLAG_VARIANT; class OTelCommons { // Define semantic conventions // Refer - https://opentelemetry.io/docs/specs/otel/logs/semantic_conventions/feature-flags/ static final String EVENT_NAME = "feature_flag"; - static final AttributeKey flagKeyAttributeKey = SemanticAttributes.FEATURE_FLAG_KEY; - static final AttributeKey providerNameAttributeKey = SemanticAttributes.FEATURE_FLAG_PROVIDER_NAME; - static final AttributeKey variantAttributeKey = SemanticAttributes.FEATURE_FLAG_VARIANT; + static final AttributeKey flagKeyAttributeKey = FEATURE_FLAG_KEY; + static final AttributeKey providerNameAttributeKey = FEATURE_FLAG_PROVIDER_NAME; + static final AttributeKey variantAttributeKey = FEATURE_FLAG_VARIANT; // Define non convention attribute keys static final String REASON_KEY = "reason";