Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bump to semconv v1.41.0
([#461](https://github.com/open-telemetry/semantic-conventions-java/pull/461))

## Version 1.40.0 (2026-02-19)

* Bump to semconv v1.40.0
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ val snapshot = true
// end

// The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes
var semanticConventionsVersion = "1.40.0"
var semanticConventionsVersion = "1.41.0"
val schemaUrlVersions = listOf(
semanticConventionsVersion,
"1.40.0",
"1.39.0",
"1.38.0",
"1.37.0",
Expand Down
24 changes: 22 additions & 2 deletions docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
Comparing source compatibility of opentelemetry-semconv-1.40.0-SNAPSHOT.jar against opentelemetry-semconv-1.40.0.jar
No changes.
Comparing source compatibility of opentelemetry-semconv-1.41.0-SNAPSHOT.jar against opentelemetry-semconv-1.40.0.jar
+++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.DeploymentAttributes (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> DEPLOYMENT_ENVIRONMENT_NAME
+++ NEW CLASS: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.semconv.DeploymentAttributes$DeploymentEnvironmentNameValues (not serializable)
+++ CLASS FILE FORMAT VERSION: 52.0 <- n.a.
+++ NEW SUPERCLASS: java.lang.Object
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String TEST
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String DEVELOPMENT
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String STAGING
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String PRODUCTION
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.OtelAttributes (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> OTEL_EVENT_NAME
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_41_0
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.TelemetryAttributes (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> TELEMETRY_DISTRO_VERSION
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey<java.lang.String> TELEMETRY_DISTRO_NAME
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public final class AwsIncubatingAttributes {
* href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html">AWS
* Lambda EvenSource Mapping</a>. An event source is mapped to a lambda function. It's contents
* are read by Lambda and used to trigger a function. This isn't available in the lambda execution
* context or the lambda runtime environtment. This is going to be populated by the AWS SDK for
* context or the lambda runtime environment. This is going to be populated by the AWS SDK for
* each language when that UUID is present. Some of these operations are
* Create/Delete/Get/List/Update EventSourceMapping.
*/
Expand Down Expand Up @@ -380,7 +380,7 @@ public final class AwsIncubatingAttributes {
*/
public static final AttributeKey<String> AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id");

/** The ARN of the Secret stored in the Secrets Mangger */
/** The ARN of the Secret stored in the Secrets Manager */
public static final AttributeKey<String> AWS_SECRETSMANAGER_SECRET_ARN =
stringKey("aws.secretsmanager.secret.arn");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ public final class CicdIncubatingAttributes {
public static final AttributeKey<String> CICD_PIPELINE_TASK_NAME =
stringKey("cicd.pipeline.task.name");

/** The unique identifier of a task run within a pipeline. */
/**
* The unique identifier of a task run within a pipeline.
*
* <p>Notes:
*
* <p>For a given pipeline run and task, the {@code cicd.pipeline.task.run.id} MUST be unique
* within that run. For the same task across different runs of the same pipeline, the {@code
* cicd.pipeline.task.run.id} MAY remain the same, enabling correlation of {@code
* cicd.pipeline.task.run.result} values across multiple pipeline runs.
*/
public static final AttributeKey<String> CICD_PIPELINE_TASK_RUN_ID =
stringKey("cicd.pipeline.task.run.id");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public final class ContainerIncubatingAttributes {

/**
* A description about the runtime which could include, for example details about the CRI/API
* version being used or other customisations.
* version being used or other customizations.
*/
public static final AttributeKey<String> CONTAINER_RUNTIME_DESCRIPTION =
stringKey("container.runtime.description");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ public final class DeploymentIncubatingAttributes {
* <li>{@code service.name=frontend}, {@code deployment.environment.name=production}
* <li>{@code service.name=frontend}, {@code deployment.environment.name=staging}.
* </ul>
*
* @deprecated deprecated in favor of stable {@link
* io.opentelemetry.semconv.DeploymentAttributes#DEPLOYMENT_ENVIRONMENT_NAME} attribute.
*/
@Deprecated
public static final AttributeKey<String> DEPLOYMENT_ENVIRONMENT_NAME =
stringKey("deployment.environment.name");

Expand All @@ -52,6 +56,29 @@ public final class DeploymentIncubatingAttributes {

// Enum definitions

/**
* Values for {@link #DEPLOYMENT_ENVIRONMENT_NAME}.
*
* @deprecated deprecated in favor of stable {@link
* io.opentelemetry.semconv.DeploymentAttributes.DeploymentEnvironmentNameValues}.
*/
@Deprecated
public static final class DeploymentEnvironmentNameIncubatingValues {
/** Production environment */
public static final String PRODUCTION = "production";

/** Staging environment */
public static final String STAGING = "staging";

/** Testing environment */
public static final String TEST = "test";

/** Development environment */
public static final String DEVELOPMENT = "development";

private DeploymentEnvironmentNameIncubatingValues() {}
}

/** Values for {@link #DEPLOYMENT_STATUS}. */
public static final class DeploymentStatusIncubatingValues {
/** failed */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public final class ErrorIncubatingAttributes {
* <p>When {@code error.type} is set to a type (e.g., an exception type), its canonical class name
* identifying the type within the artifact SHOULD be used.
*
* <p>If the recorded error type is a wrapper that is not meaningful for failure classification,
* instrumentation MAY use the type of the inner error instead. For example, in Go, errors created
* with {@code fmt.Errorf} using {@code %w} MAY be unwrapped when the wrapper type does not help
* classify the failure.
*
* <p>Instrumentations SHOULD document the list of errors they report.
*
* <p>The cardinality of {@code error.type} within one instrumentation library SHOULD be low.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ public final class ExceptionIncubatingAttributes {
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
* the exception should be preferred over the static type in languages that support it.
*
* <p>Notes:
*
* <p>If the recorded exception type is a wrapper that is not meaningful for failure
* classification, instrumentation MAY use the type of the inner exception instead. For example,
* in Go, errors created with {@code fmt.Errorf} using {@code %w} MAY be unwrapped when the
* wrapper type does not help classify the failure.
*
* @deprecated deprecated in favor of stable {@link
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_TYPE} attribute.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.semconv.incubating;

import static io.opentelemetry.api.common.AttributeKey.booleanKey;
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
import static io.opentelemetry.api.common.AttributeKey.longKey;
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
Expand Down Expand Up @@ -233,6 +234,10 @@ public final class GenAiIncubatingAttributes {
public static final AttributeKey<List<String>> GEN_AI_REQUEST_STOP_SEQUENCES =
stringArrayKey("gen_ai.request.stop_sequences");

/** Indicates whether the GenAI request was made in streaming mode. */
public static final AttributeKey<Boolean> GEN_AI_REQUEST_STREAM =
booleanKey("gen_ai.request.stream");

/** The temperature setting for the GenAI request. */
public static final AttributeKey<Double> GEN_AI_REQUEST_TEMPERATURE =
doubleKey("gen_ai.request.temperature");
Expand All @@ -257,6 +262,14 @@ public final class GenAiIncubatingAttributes {
public static final AttributeKey<String> GEN_AI_RESPONSE_MODEL =
stringKey("gen_ai.response.model");

/**
* Time to first chunk in a streaming response, measured from request issuance, in seconds. The
* value is measured from when the client issues the generation request to when the first chunk is
* received in the response stream.
*/
public static final AttributeKey<Double> GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK =
doubleKey("gen_ai.response.time_to_first_chunk");

/**
* The query text used for retrieval.
*
Expand Down Expand Up @@ -362,6 +375,26 @@ public final class GenAiIncubatingAttributes {
public static final AttributeKey<Long> GEN_AI_USAGE_PROMPT_TOKENS =
longKey("gen_ai.usage.prompt_tokens");

/**
* The number of output tokens used for reasoning (e.g. chain-of-thought, extended thinking).
*
* <p>Notes:
*
* <p>The value SHOULD be included in {@code gen_ai.usage.output_tokens}.
*/
public static final AttributeKey<Long> GEN_AI_USAGE_REASONING_OUTPUT_TOKENS =
longKey("gen_ai.usage.reasoning.output_tokens");

/**
* Human-readable name of the GenAI workflow provided by the application.
*
* <p>Notes:
*
* <p>This attribute can be populated in different frameworks eg: name of the first chain in
* LangChain OR name of the crew in CrewAI.
*/
public static final AttributeKey<String> GEN_AI_WORKFLOW_NAME = stringKey("gen_ai.workflow.name");

// Enum definitions

/**
Expand Down Expand Up @@ -443,6 +476,9 @@ public static final class GenAiOperationNameIncubatingValues {
/** Execute a tool */
public static final String EXECUTE_TOOL = "execute_tool";

/** Invoke GenAI workflow */
public static final String INVOKE_WORKFLOW = "invoke_workflow";

private GenAiOperationNameIncubatingValues() {}
}

Expand Down Expand Up @@ -487,7 +523,8 @@ public static final class GenAiProviderNameIncubatingValues {
public static final String AZURE_AI_INFERENCE = "azure.ai.inference";

/**
* <a href="https://azure.microsoft.com/products/ai-services/openai-service/">Azure OpenAI</a>
* <a href="https://learn.microsoft.com/en-us/azure/ai-services/openai/overview">Azure
* OpenAI</a>
*/
public static final String AZURE_AI_OPENAI = "azure.ai.openai";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,54 @@
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class GoIncubatingAttributes {
/**
* The detailed state of the CPU.
*
* <p>Notes:
*
* <p>Value SHOULD match the specific CPU class reported by the Go runtime under {@code
* /cpu/classes/...}. The list of possible values is subject to change with the Go version used.
*/
public static final AttributeKey<String> GO_CPU_DETAILED_STATE =
stringKey("go.cpu.detailed_state");

/** The state of the CPU. */
public static final AttributeKey<String> GO_CPU_STATE = stringKey("go.cpu.state");

/**
* The detailed type of memory.
*
* <p>Notes:
*
* <p>Value SHOULD match the specific memory class reported by the Go runtime under {@code
* /memory/classes/...}. The list of possible values is subject to change with the Go version
* used.
*/
public static final AttributeKey<String> GO_MEMORY_DETAILED_TYPE =
stringKey("go.memory.detailed_type");

/** The type of memory. */
public static final AttributeKey<String> GO_MEMORY_TYPE = stringKey("go.memory.type");

// Enum definitions

/** Values for {@link #GO_CPU_STATE}. */
public static final class GoCpuStateIncubatingValues {
/** CPU time spent running user Go code. */
public static final String USER = "user";

/** CPU time spent performing garbage collection tasks. */
public static final String GC = "gc";

/** CPU time spent returning unused memory to the underlying platform. */
public static final String SCAVENGE = "scavenge";

/** Available CPU time not spent executing any Go or Go runtime code. */
public static final String IDLE = "idle";

private GoCpuStateIncubatingValues() {}
}

/** Values for {@link #GO_MEMORY_TYPE}. */
public static final class GoMemoryTypeIncubatingValues {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class GraphqlIncubatingAttributes {
*
* <p>Notes:
*
* <p>The value may be sanitized to exclude sensitive information.
* <p>If instrumentation can reliably identify and redact sensitive information it SHOULD do it.
*/
public static final AttributeKey<String> GRAPHQL_DOCUMENT = stringKey("graphql.document");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@SuppressWarnings("unused")
public final class HwIncubatingAttributes {
/** Design capacity in Watts-hours or Amper-hours */
/** Design capacity in Watts-hours or Ampere-hours */
public static final AttributeKey<String> HW_BATTERY_CAPACITY = stringKey("hw.battery.capacity");

/**
Expand Down
Loading
Loading