Skip to content

Commit

Permalink
fix(deps): move to io.opentelemetry.semconv:opentelemetry-semconv (#1041
Browse files Browse the repository at this point in the history
)

Signed-off-by: Robert Elliot <rob@lidalia.org.uk>
  • Loading branch information
Mahoney authored Oct 31, 2024
1 parent 4b8aa85 commit 18d2557
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java=8.0.312-tem
6 changes: 3 additions & 3 deletions hooks/open-telemetry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-semconv</artifactId>
<version>1.30.1-alpha</version>
<groupId>io.opentelemetry.semconv</groupId>
<artifactId>opentelemetry-semconv-incubating</artifactId>
<version>1.28.0-alpha</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> flagKeyAttributeKey = SemanticAttributes.FEATURE_FLAG_KEY;
static final AttributeKey<String> providerNameAttributeKey = SemanticAttributes.FEATURE_FLAG_PROVIDER_NAME;
static final AttributeKey<String> variantAttributeKey = SemanticAttributes.FEATURE_FLAG_VARIANT;
static final AttributeKey<String> flagKeyAttributeKey = FEATURE_FLAG_KEY;
static final AttributeKey<String> providerNameAttributeKey = FEATURE_FLAG_PROVIDER_NAME;
static final AttributeKey<String> variantAttributeKey = FEATURE_FLAG_VARIANT;

// Define non convention attribute keys
static final String REASON_KEY = "reason";
Expand Down

0 comments on commit 18d2557

Please sign in to comment.