diff --git a/CHANGELOG.md b/CHANGELOG.md index e11d6d6..47eacc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Bump to semconv v1.41.0 + ([#465](https://github.com/open-telemetry/semantic-conventions-java/pull/465)) + ## Version 1.40.0 (2026-02-19) * Bump to semconv v1.40.0 diff --git a/build.gradle.kts b/build.gradle.kts index 5c204f6..68c7e3f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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", diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt index 7de73f6..45e991c 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt @@ -1,2 +1,22 @@ -Comparing source compatibility of opentelemetry-semconv-1.40.0-SNAPSHOT.jar against opentelemetry-semconv-1.40.0.jar -No changes. \ No newline at end of file +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 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 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 TELEMETRY_DISTRO_VERSION + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.api.common.AttributeKey TELEMETRY_DISTRO_NAME diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java index 32c7700..7e81c6f 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java @@ -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. 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. */ @@ -380,7 +380,7 @@ public final class AwsIncubatingAttributes { */ public static final AttributeKey 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 AWS_SECRETSMANAGER_SECRET_ARN = stringKey("aws.secretsmanager.secret.arn"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java index 3c645e0..18f7439 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java @@ -45,7 +45,16 @@ public final class CicdIncubatingAttributes { public static final AttributeKey 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. + * + *

Notes: + * + *

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 CICD_PIPELINE_TASK_RUN_ID = stringKey("cicd.pipeline.task.run.id"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java index d5c108f..3951268 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java @@ -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 CONTAINER_RUNTIME_DESCRIPTION = stringKey("container.runtime.description"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java index 7a85a4c..7d65863 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java @@ -37,7 +37,11 @@ public final class DeploymentIncubatingAttributes { *

  • {@code service.name=frontend}, {@code deployment.environment.name=production} *
  • {@code service.name=frontend}, {@code deployment.environment.name=staging}. * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DeploymentAttributes#DEPLOYMENT_ENVIRONMENT_NAME} attribute. */ + @Deprecated public static final AttributeKey DEPLOYMENT_ENVIRONMENT_NAME = stringKey("deployment.environment.name"); @@ -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 */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java index fcd907e..0a76a05 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ErrorIncubatingAttributes.java @@ -40,6 +40,11 @@ public final class ErrorIncubatingAttributes { *

    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. * + *

    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. + * *

    Instrumentations SHOULD document the list of errors they report. * *

    The cardinality of {@code error.type} within one instrumentation library SHOULD be low. diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java index 2432810..85e5821 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java @@ -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. * + *

    Notes: + * + *

    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. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java index 9b942bc..8ae45e9 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java @@ -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; @@ -233,6 +234,10 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey> 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 GEN_AI_REQUEST_STREAM = + booleanKey("gen_ai.request.stream"); + /** The temperature setting for the GenAI request. */ public static final AttributeKey GEN_AI_REQUEST_TEMPERATURE = doubleKey("gen_ai.request.temperature"); @@ -257,6 +262,14 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey 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 GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = + doubleKey("gen_ai.response.time_to_first_chunk"); + /** * The query text used for retrieval. * @@ -362,6 +375,26 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey 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). + * + *

    Notes: + * + *

    The value SHOULD be included in {@code gen_ai.usage.output_tokens}. + */ + public static final AttributeKey GEN_AI_USAGE_REASONING_OUTPUT_TOKENS = + longKey("gen_ai.usage.reasoning.output_tokens"); + + /** + * Human-readable name of the GenAI workflow provided by the application. + * + *

    Notes: + * + *

    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 GEN_AI_WORKFLOW_NAME = stringKey("gen_ai.workflow.name"); + // Enum definitions /** @@ -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() {} } @@ -487,7 +523,8 @@ public static final class GenAiProviderNameIncubatingValues { public static final String AZURE_AI_INFERENCE = "azure.ai.inference"; /** - * Azure OpenAI + * Azure + * OpenAI */ public static final String AZURE_AI_OPENAI = "azure.ai.openai"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GoIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GoIncubatingAttributes.java index 1d52c20..164e079 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GoIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GoIncubatingAttributes.java @@ -13,11 +13,54 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class GoIncubatingAttributes { + /** + * The detailed state of the CPU. + * + *

    Notes: + * + *

    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 GO_CPU_DETAILED_STATE = + stringKey("go.cpu.detailed_state"); + + /** The state of the CPU. */ + public static final AttributeKey GO_CPU_STATE = stringKey("go.cpu.state"); + + /** + * The detailed type of memory. + * + *

    Notes: + * + *

    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 GO_MEMORY_DETAILED_TYPE = + stringKey("go.memory.detailed_type"); + /** The type of memory. */ public static final AttributeKey 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 { /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java index dcb0980..e58f2d8 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java @@ -18,7 +18,7 @@ public final class GraphqlIncubatingAttributes { * *

    Notes: * - *

    The value may be sanitized to exclude sensitive information. + *

    If instrumentation can reliably identify and redact sensitive information it SHOULD do it. */ public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HwIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HwIncubatingAttributes.java index e056c70..04ac6df 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HwIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HwIncubatingAttributes.java @@ -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 HW_BATTERY_CAPACITY = stringKey("hw.battery.capacity"); /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java index 9b5d83d..b9ec83f 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java @@ -421,9 +421,141 @@ public final class K8sIncubatingAttributes { /** The name of the Node. */ public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); + /** The name of the system container running on the K8s Node. */ + public static final AttributeKey K8S_NODE_SYSTEM_CONTAINER_NAME = + stringKey("k8s.node.system_container.name"); + /** The UID of the Node. */ public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); + /** + * The annotation placed on the PersistentVolume, the {@code } being the annotation name, the + * value being the annotation value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • An annotation {@code pv.kubernetes.io/provisioned-by} with value {@code + * kubernetes.io/aws-ebs} SHOULD be recorded as the {@code + * k8s.persistentvolume.annotation.pv.kubernetes.io/provisioned-by} attribute with value + * {@code "kubernetes.io/aws-ebs"}. + *
    • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.persistentvolume.annotation.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_PERSISTENTVOLUME_ANNOTATION = + stringKeyTemplate("k8s.persistentvolume.annotation"); + + /** + * The label placed on the PersistentVolume, the {@code } being the label name, the value + * being the label value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • A label {@code type} with value {@code ssd} SHOULD be recorded as the {@code + * k8s.persistentvolume.label.type} attribute with value {@code "ssd"}. + *
    • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.persistentvolume.label.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_PERSISTENTVOLUME_LABEL = + stringKeyTemplate("k8s.persistentvolume.label"); + + /** The name of the PersistentVolume. */ + public static final AttributeKey K8S_PERSISTENTVOLUME_NAME = + stringKey("k8s.persistentvolume.name"); + + /** + * The reclaim policy of the PersistentVolume. + * + *

    Notes: + * + *

    This attribute aligns with the {@code persistentVolumeReclaimPolicy} field of the K8s + * PersistentVolumeSpec. + */ + public static final AttributeKey K8S_PERSISTENTVOLUME_RECLAIM_POLICY = + stringKey("k8s.persistentvolume.reclaim_policy"); + + /** + * The phase of the PersistentVolume. + * + *

    Notes: + * + *

    This attribute aligns with the {@code phase} field of the K8s + * PersistentVolumeStatus. + */ + public static final AttributeKey K8S_PERSISTENTVOLUME_STATUS_PHASE = + stringKey("k8s.persistentvolume.status.phase"); + + /** The UID of the PersistentVolume. */ + public static final AttributeKey K8S_PERSISTENTVOLUME_UID = + stringKey("k8s.persistentvolume.uid"); + + /** + * The annotation placed on the PersistentVolumeClaim, the {@code } being the annotation + * name, the value being the annotation value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • An annotation {@code volume.beta.kubernetes.io/storage-provisioner} with value {@code + * kubernetes.io/aws-ebs} SHOULD be recorded as the {@code + * k8s.persistentvolumeclaim.annotation.volume.beta.kubernetes.io/storage-provisioner} + * attribute with value {@code "kubernetes.io/aws-ebs"}. + *
    • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.persistentvolumeclaim.annotation.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_PERSISTENTVOLUMECLAIM_ANNOTATION = + stringKeyTemplate("k8s.persistentvolumeclaim.annotation"); + + /** + * The label placed on the PersistentVolumeClaim, the {@code } being the label name, the + * value being the label value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • A label {@code app} with value {@code my-app} SHOULD be recorded as the {@code + * k8s.persistentvolumeclaim.label.app} attribute with value {@code "my-app"}. + *
    • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.persistentvolumeclaim.label.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_PERSISTENTVOLUMECLAIM_LABEL = + stringKeyTemplate("k8s.persistentvolumeclaim.label"); + + /** The name of the PersistentVolumeClaim. */ + public static final AttributeKey K8S_PERSISTENTVOLUMECLAIM_NAME = + stringKey("k8s.persistentvolumeclaim.name"); + + /** + * The phase of the PersistentVolumeClaim. + * + *

    Notes: + * + *

    This attribute aligns with the {@code phase} field of the K8s + * PersistentVolumeClaimStatus. + */ + public static final AttributeKey K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE = + stringKey("k8s.persistentvolumeclaim.status.phase"); + + /** The UID of the PersistentVolumeClaim. */ + public static final AttributeKey K8S_PERSISTENTVOLUMECLAIM_UID = + stringKey("k8s.persistentvolumeclaim.uid"); + /** * The annotation placed on the Pod, the {@code } being the annotation name, the value being * the annotation value. @@ -918,6 +1050,54 @@ public static final class K8sNodeConditionTypeIncubatingValues { private K8sNodeConditionTypeIncubatingValues() {} } + /** Values for {@link #K8S_PERSISTENTVOLUME_RECLAIM_POLICY}. */ + public static final class K8sPersistentvolumeReclaimPolicyIncubatingValues { + /** The volume will be deleted when released from its claim. */ + public static final String DELETE = "Delete"; + + /** The volume will be recycled (basic scrub) when released from its claim. */ + public static final String RECYCLE = "Recycle"; + + /** The volume will be retained when released from its claim. */ + public static final String RETAIN = "Retain"; + + private K8sPersistentvolumeReclaimPolicyIncubatingValues() {} + } + + /** Values for {@link #K8S_PERSISTENTVOLUME_STATUS_PHASE}. */ + public static final class K8sPersistentvolumeStatusPhaseIncubatingValues { + /** The volume is available and not yet bound to a claim. */ + public static final String AVAILABLE = "Available"; + + /** The volume is bound to a claim. */ + public static final String BOUND = "Bound"; + + /** The volume has failed its automatic reclamation. */ + public static final String FAILED = "Failed"; + + /** The volume is being provisioned. */ + public static final String PENDING = "Pending"; + + /** The claim has been deleted but the volume is not yet available. */ + public static final String RELEASED = "Released"; + + private K8sPersistentvolumeStatusPhaseIncubatingValues() {} + } + + /** Values for {@link #K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE}. */ + public static final class K8sPersistentvolumeclaimStatusPhaseIncubatingValues { + /** The claim is bound to a volume. */ + public static final String BOUND = "Bound"; + + /** The claim has lost its underlying volume (the volume does not exist anymore). */ + public static final String LOST = "Lost"; + + /** The claim has not yet been bound to a volume. */ + public static final String PENDING = "Pending"; + + private K8sPersistentvolumeclaimStatusPhaseIncubatingValues() {} + } + /** Values for {@link #K8S_POD_STATUS_PHASE}. */ public static final class K8sPodStatusPhaseIncubatingValues { /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java index 8d5f0cf..d747969 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java @@ -59,7 +59,11 @@ public final class OtelIncubatingAttributes { * EventName} or equivalent field. This attribute MAY be used by applications using existing * logging libraries so that it can be used to set the {@code EventName} field by Collector or SDK * components. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.OtelAttributes#OTEL_EVENT_NAME} attribute. */ + @Deprecated public static final AttributeKey OTEL_EVENT_NAME = stringKey("otel.event.name"); /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java index 3d84449..704966c 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java @@ -98,8 +98,19 @@ public final class ProcessIncubatingAttributes { stringKey("process.executable.build_id.go"); /** - * Profiling specific build ID for executables. See the OTel specification for Profiles for more - * information. + * Deterministic build ID for executables. + * + *

    Notes: + * + *

    GNU and Go build IDs may be stripped or unavailable in some environments (e.g., Alpine + * Linux, Docker images). This attribute provides a deterministic build ID computed by hashing the + * first and last 4096 bytes of the file along with its length: + * + *

    {@code Input   ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File)))
    +   * Digest  ← SHA256(Input)
    +   * BuildID ← Digest[:16]}
    + * + * The result is the first 16 bytes (128 bits) of the SHA256 digest, represented as a hex string. */ public static final AttributeKey PROCESS_EXECUTABLE_BUILD_ID_HTLHASH = stringKey("process.executable.build_id.htlhash"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java index f772ffe..bf1f131 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java @@ -71,10 +71,11 @@ public final class ServiceIncubatingAttributes { *

    Notes: * *

    MUST be the same for all instances of horizontally scaled services. If the value was not - * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code unknown_service:bash}. If - * {@code process.executable.name} is not available, the value MUST be set to {@code - * unknown_service}. + * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with the process + * executable name, e.g. {@code unknown_service:bash}. If the process executable name is not + * available, the value MUST be set to {@code unknown_service}. The process executable name is the + * name of the process executable, the same value as described by the {@code + * process.executable.name} resource attribute. * * @deprecated deprecated in favor of stable {@link * io.opentelemetry.semconv.ServiceAttributes#SERVICE_NAME} attribute. diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java index 4cdb3e1..6c324b6 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java @@ -50,6 +50,10 @@ public final class SystemIncubatingAttributes { public static final AttributeKey SYSTEM_FILESYSTEM_TYPE = stringKey("system.filesystem.type"); + /** The Linux HugePages memory state */ + public static final AttributeKey SYSTEM_MEMORY_LINUX_HUGEPAGES_STATE = + stringKey("system.memory.linux.hugepages.state"); + /** The Linux Slab memory state */ public static final AttributeKey SYSTEM_MEMORY_LINUX_SLAB_STATE = stringKey("system.memory.linux.slab.state"); @@ -172,6 +176,17 @@ public static final class SystemFilesystemTypeIncubatingValues { private SystemFilesystemTypeIncubatingValues() {} } + /** Values for {@link #SYSTEM_MEMORY_LINUX_HUGEPAGES_STATE}. */ + public static final class SystemMemoryLinuxHugepagesStateIncubatingValues { + /** free. */ + public static final String FREE = "free"; + + /** used. */ + public static final String USED = "used"; + + private SystemMemoryLinuxHugepagesStateIncubatingValues() {} + } + /** Values for {@link #SYSTEM_MEMORY_LINUX_SLAB_STATE}. */ public static final class SystemMemoryLinuxSlabStateIncubatingValues { /** reclaimable. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java index 756a756..9983aa9 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java @@ -21,11 +21,21 @@ public final class TelemetryIncubatingAttributes { *

    Official auto instrumentation agents and distributions SHOULD set the {@code * telemetry.distro.name} attribute to a string starting with {@code opentelemetry-}, e.g. {@code * opentelemetry-java-instrumentation}. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.TelemetryAttributes#TELEMETRY_DISTRO_NAME} attribute. */ + @Deprecated public static final AttributeKey TELEMETRY_DISTRO_NAME = stringKey("telemetry.distro.name"); - /** The version string of the auto instrumentation agent or distribution, if used. */ + /** + * The version string of the auto instrumentation agent or distribution, if used. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.TelemetryAttributes#TELEMETRY_DISTRO_VERSION} attribute. + */ + @Deprecated public static final AttributeKey TELEMETRY_DISTRO_VERSION = stringKey("telemetry.distro.version"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/V8jsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/V8jsIncubatingAttributes.java index edcab12..d02ec69 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/V8jsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/V8jsIncubatingAttributes.java @@ -27,6 +27,9 @@ public final class V8jsIncubatingAttributes { */ public static final AttributeKey V8JS_HEAP_SPACE_NAME = stringKey("v8js.heap.space.name"); + /** The type of resource keeping the event loop active. */ + public static final AttributeKey V8JS_RESOURCE_TYPE = stringKey("v8js.resource.type"); + // Enum definitions /** Values for {@link #V8JS_GC_TYPE}. */ @@ -66,5 +69,25 @@ public static final class V8jsHeapSpaceNameIncubatingValues { private V8jsHeapSpaceNameIncubatingValues() {} } + /** Values for {@link #V8JS_RESOURCE_TYPE}. */ + public static final class V8jsResourceTypeIncubatingValues { + /** Active {@code setImmediate} callbacks. */ + public static final String IMMEDIATE = "Immediate"; + + /** Active TCP Servers. */ + public static final String TCPSERVERWRAP = "TCPServerWrap"; + + /** Active TCP connections. */ + public static final String TCPWRAP = "TCPWrap"; + + /** Active {@code setTimeout} or {@code setInterval} timers. */ + public static final String TIMEOUT = "Timeout"; + + /** Active Terminal I/O (stdin/stdout). */ + public static final String TTYWRAP = "TTYWrap"; + + private V8jsResourceTypeIncubatingValues() {} + } + private V8jsIncubatingAttributes() {} } diff --git a/semconv/src/main/java/io/opentelemetry/semconv/DeploymentAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/DeploymentAttributes.java new file mode 100644 index 0000000..6cacbb4 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/DeploymentAttributes.java @@ -0,0 +1,54 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/registry/java/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class DeploymentAttributes { + /** + * Name of the deployment + * environment (aka deployment tier). + * + *

    Notes: + * + *

    {@code deployment.environment.name} does not affect the uniqueness constraints defined + * through the {@code service.namespace}, {@code service.name} and {@code service.instance.id} + * resource attributes. This implies that resources carrying the following attribute combinations + * MUST be considered to be identifying the same service: + * + *

      + *
    • {@code service.name=frontend}, {@code deployment.environment.name=production} + *
    • {@code service.name=frontend}, {@code deployment.environment.name=staging}. + *
    + */ + public static final AttributeKey DEPLOYMENT_ENVIRONMENT_NAME = + stringKey("deployment.environment.name"); + + // Enum definition + /** Values for {@link #DEPLOYMENT_ENVIRONMENT_NAME}. */ + public static final class DeploymentEnvironmentNameValues { + /** 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 DeploymentEnvironmentNameValues() {} + } + + private DeploymentAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java index 80b4cae..934e7aa 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java @@ -23,6 +23,11 @@ public final class ErrorAttributes { *

    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. * + *

    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. + * *

    Instrumentations SHOULD document the list of errors they report. * *

    The cardinality of {@code error.type} within one instrumentation library SHOULD be low. diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java index 03e8b9c..2f612ba 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/ExceptionAttributes.java @@ -37,6 +37,13 @@ public final class ExceptionAttributes { /** * 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. + * + *

    Notes: + * + *

    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. */ public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/OtelAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/OtelAttributes.java index 01283e0..99fa96c 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/OtelAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/OtelAttributes.java @@ -13,6 +13,18 @@ // buildscripts/templates/registry/java/SemanticAttributes.java.j2 @SuppressWarnings("unused") public final class OtelAttributes { + /** + * Identifies the class / type of event. + * + *

    Notes: + * + *

    This attribute SHOULD be used by non-OTLP exporters when destination does not support {@code + * EventName} or equivalent field. This attribute MAY be used by applications using existing + * logging libraries so that it can be used to set the {@code EventName} field by Collector or SDK + * components. + */ + public static final AttributeKey OTEL_EVENT_NAME = stringKey("otel.event.name"); + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index 2765a65..9e28884 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -6,6 +6,7 @@ package io.opentelemetry.semconv; public final class SchemaUrls { + public static final String V1_41_0 = "https://opentelemetry.io/schemas/1.41.0"; public static final String V1_40_0 = "https://opentelemetry.io/schemas/1.40.0"; public static final String V1_39_0 = "https://opentelemetry.io/schemas/1.39.0"; public static final String V1_38_0 = "https://opentelemetry.io/schemas/1.38.0"; diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java index 2fde592..c924020 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/ServiceAttributes.java @@ -56,10 +56,11 @@ public final class ServiceAttributes { *

    Notes: * *

    MUST be the same for all instances of horizontally scaled services. If the value was not - * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code unknown_service:bash}. If - * {@code process.executable.name} is not available, the value MUST be set to {@code - * unknown_service}. + * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with the process + * executable name, e.g. {@code unknown_service:bash}. If the process executable name is not + * available, the value MUST be set to {@code unknown_service}. The process executable name is the + * name of the process executable, the same value as described by the {@code + * process.executable.name} resource attribute. */ public static final AttributeKey SERVICE_NAME = stringKey("service.name"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/TelemetryAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/TelemetryAttributes.java index b09e106..5e3f614 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/TelemetryAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/TelemetryAttributes.java @@ -13,6 +13,22 @@ // buildscripts/templates/registry/java/SemanticAttributes.java.j2 @SuppressWarnings("unused") public final class TelemetryAttributes { + /** + * The name of the auto instrumentation agent or distribution, if used. + * + *

    Notes: + * + *

    Official auto instrumentation agents and distributions SHOULD set the {@code + * telemetry.distro.name} attribute to a string starting with {@code opentelemetry-}, e.g. {@code + * opentelemetry-java-instrumentation}. + */ + public static final AttributeKey TELEMETRY_DISTRO_NAME = + stringKey("telemetry.distro.name"); + + /** The version string of the auto instrumentation agent or distribution, if used. */ + public static final AttributeKey TELEMETRY_DISTRO_VERSION = + stringKey("telemetry.distro.version"); + /** The language of the telemetry SDK. */ public static final AttributeKey TELEMETRY_SDK_LANGUAGE = stringKey("telemetry.sdk.language");