Skip to content

Commit

Permalink
Move to io.opentelemetry.semconv:opentelemetry-semconv
Browse files Browse the repository at this point in the history
[`io.opentelemetry:opentelemetry-semconv`](https://search.maven.org/artifact/io.opentelemetry/opentelemetry-semconv)
was moved to [`io.opentelemetry.semconv:opentelemetry-semconv`](https://search.maven.org/artifact/io.opentelemetry.semconv/opentelemetry-semconv)
and the former [will be deprecated](open-telemetry/opentelemetry-java#5786).

Signed-off-by: Robert Elliot <rob@lidalia.org.uk>
  • Loading branch information
Mahoney committed Oct 24, 2024
1 parent e7a1802 commit 4e4f1e7
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 4e4f1e7

Please sign in to comment.