diff --git a/build.gradle.kts b/build.gradle.kts index 3bd14799..961250e9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,9 +11,11 @@ val snapshot = true // end // The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes -var semanticConventionsVersion = "1.32.0" +var semanticConventionsVersion = "1.34.0" val schemaUrlVersions = listOf( semanticConventionsVersion, + "1.33.0", + "1.32.0", "1.31.0", "1.30.0", "1.29.0", @@ -110,7 +112,7 @@ fun generateTask(taskName: String, incubating: Boolean) { "--mount", "type=bind,source=${modelPath},target=/home/weaver/source,readonly", "--mount", "type=bind,source=$projectDir/buildscripts/templates,target=/home/weaver/templates,readonly", "--mount", "type=bind,source=$projectDir/$outputDir,target=/home/weaver/target", - "otel/weaver:v0.15.0", + "otel/weaver:v0.15.1", "registry", "generate", "--registry=/home/weaver/source", "--templates=/home/weaver/templates", diff --git a/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts index 5cf28e07..1856983b 100644 --- a/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts @@ -76,7 +76,9 @@ tasks { breakIterator(true) addBooleanOption("html5", true) - addBooleanOption("Xdoclint:all,-missing", true) + // TODO (trask) remove "-html" after next semconv release + // (see https://github.com/open-telemetry/semantic-conventions/pull/2304) + addBooleanOption("Xdoclint:all,-missing,-html", true) // non-standard option to fail on warnings, see https://bugs.openjdk.java.net/browse/JDK-8200363 addStringOption("Xwerror", "-quiet") } diff --git a/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 b/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 index 76260caf..22668d24 100644 --- a/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 +++ b/buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @@ -36,7 +36,7 @@ import java.util.List; // DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class {{ my_class_name }} { - {% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) %}{% if attribute is experimental %} + {% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) | rejectattr("type", "eq", "any") %}{% if attribute is experimental %} {%- if attribute is deprecated %}{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%} {%- else -%}{%- set deprecated_javadoc = "" -%} {%- endif -%} @@ -49,8 +49,19 @@ public final class {{ my_class_name }} { {% endif %} {% endfor %} // Enum definitions - {% for attribute in ctx.attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) %} - {%- if attribute is stable -%} + {% for attribute in ctx.attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) %} + {% set enum_deprecated_in_favor_of_stable = namespace(value=false) %} + {% if attribute is stable %} + {%- set enum_deprecated_in_favor_of_stable.value = true -%} + {%- endif -%} + {%- for member in attribute.type.members %} + {% if member is experimental %} + {% if not member is deprecated %} + {%- set enum_deprecated_in_favor_of_stable.value = false -%} + {%- endif -%} + {%- endif -%} + {%- endfor %} + {%- if enum_deprecated_in_favor_of_stable.value -%} {%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "." ~ (attribute.name | pascal_case) ~ "Values" -%} /** * Values for {@link #{{ attribute.name | screaming_snake_case }}}. @@ -62,11 +73,16 @@ public final class {{ my_class_name }} { {%- else -%} /** Values for {@link #{{ attribute.name | screaming_snake_case }}}. */ {%- endif -%} - {% if attribute is stable or attribute is deprecated %}@Deprecated{% endif %} + {% if enum_deprecated_in_favor_of_stable.value or attribute is deprecated %}@Deprecated{% endif %} public static final class {{ attribute.name | pascal_case }}IncubatingValues { {%- for member in attribute.type.members %} - {{ [member.brief or (member.id ~ '.')] | comment(indent=4) }} - public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }}; + {% if member is experimental or enum_deprecated_in_favor_of_stable.value %}{{ [member.brief or (member.id ~ '.')] | comment(indent=4) }} + {% if member is deprecated %}@Deprecated{% endif %} public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }}; + {% elif member is stable %} + {%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "." ~ (attribute.name | pascal_case) ~ "Values#" ~ (member.id | screaming_snake_case) -%} + {{ [member.brief or (member.id ~ '.'), "@deprecated deprecated in favor of stable {@link " ~ stable_class_link ~ "} value."] | comment(indent=4) }} + @Deprecated public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }}; + {%- endif -%} {%- endfor %} private {{ attribute.name | pascal_case }}IncubatingValues() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java index 65815c3c..fa214baa 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java @@ -32,19 +32,14 @@ public final class AndroidIncubatingAttributes { public static final AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); /** - * Deprecated. Use {@code android.app.state} instead. + * Deprecated. Use {@code android.app.state} body field instead. * - *

Notes: - * - *

The Android lifecycle states are defined in Activity - * lifecycle callbacks, and from which the {@code OS identifiers} are derived. - * - * @deprecated Renamed to {@code android.app.state} + * @deprecated Use {@code android.app.state} body field instead. */ @Deprecated public static final AttributeKey ANDROID_STATE = stringKey("android.state"); // Enum definitions + /** Values for {@link #ANDROID_APP_STATE}. */ public static final class AndroidAppStateIncubatingValues { /** @@ -71,7 +66,7 @@ private AndroidAppStateIncubatingValues() {} /** * Values for {@link #ANDROID_STATE} * - * @deprecated Renamed to {@code android.app.state} + * @deprecated Use {@code android.app.state} body field instead. */ @Deprecated public static final class AndroidStateIncubatingValues { diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java index b6a74fe1..b8e4a411 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java @@ -5,6 +5,7 @@ package io.opentelemetry.semconv.incubating; +import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import io.opentelemetry.api.common.AttributeKey; @@ -48,6 +49,33 @@ public final class AppIncubatingAttributes { */ public static final AttributeKey APP_INSTALLATION_ID = stringKey("app.installation.id"); + /** The x (horizontal) coordinate of a screen coordinate, in screen pixels. */ + public static final AttributeKey APP_SCREEN_COORDINATE_X = + longKey("app.screen.coordinate.x"); + + /** The y (vertical) component of a screen coordinate, in screen pixels. */ + public static final AttributeKey APP_SCREEN_COORDINATE_Y = + longKey("app.screen.coordinate.y"); + + /** + * An identifier that uniquely differentiates this widget from other widgets in the same + * application. + * + *

Notes: + * + *

A widget is an application component, typically an on-screen visual GUI element. + */ + public static final AttributeKey APP_WIDGET_ID = stringKey("app.widget.id"); + + /** + * The name of an application widget. + * + *

Notes: + * + *

A widget is an application component, typically an on-screen visual GUI element. + */ + public static final AttributeKey APP_WIDGET_NAME = stringKey("app.widget.name"); + // Enum definitions private AppIncubatingAttributes() {} 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 8cf1f002..89006a52 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 @@ -18,6 +18,23 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class AwsIncubatingAttributes { + /** + * The unique identifier of the AWS Bedrock Guardrail. A guardrail helps + * safeguard and prevent unwanted behavior from model responses or user messages. + */ + public static final AttributeKey AWS_BEDROCK_GUARDRAIL_ID = + stringKey("aws.bedrock.guardrail.id"); + + /** + * The unique identifier of the AWS Bedrock Knowledge base. A knowledge + * base is a bank of information that can be queried by models to generate more relevant + * responses and augment prompts. + */ + public static final AttributeKey AWS_BEDROCK_KNOWLEDGE_BASE_ID = + stringKey("aws.bedrock.knowledge_base.id"); + /** The JSON-serialized value of each item in the {@code AttributeDefinitions} request field. */ public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = stringArrayKey("aws.dynamodb.attribute_definitions"); @@ -155,6 +172,16 @@ public final class AwsIncubatingAttributes { public static final AttributeKey AWS_EXTENDED_REQUEST_ID = stringKey("aws.extended_request_id"); + /** + * The name of the AWS Kinesis stream the request + * refers to. Corresponds to the {@code --stream-name} parameter of the Kinesis describe-stream + * operation. + */ + public static final AttributeKey AWS_KINESIS_STREAM_NAME = + stringKey("aws.kinesis.stream_name"); + /** * The full invoked ARN as provided on the {@code Context} passed to the function ({@code * Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next} @@ -167,6 +194,18 @@ public final class AwsIncubatingAttributes { public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = stringKey("aws.lambda.invoked_arn"); + /** + * The UUID of the 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 + * each language when that UUID is present. Some of these operations are + * Create/Delete/Get/List/Update EventSourceMapping. + */ + public static final AttributeKey AWS_LAMBDA_RESOURCE_MAPPING_ID = + stringKey("aws.lambda.resource_mapping.id"); + /** * The Amazon Resource Name(s) (ARN) of the AWS log group(s). * @@ -341,7 +380,33 @@ 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 */ + public static final AttributeKey AWS_SECRETSMANAGER_SECRET_ARN = + stringKey("aws.secretsmanager.secret.arn"); + + /** + * The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical + * access point that acts as a communication channel. + */ + public static final AttributeKey AWS_SNS_TOPIC_ARN = stringKey("aws.sns.topic.arn"); + + /** + * The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue + * Service (SQS) and is used to access the queue and perform actions on it. + */ + public static final AttributeKey AWS_SQS_QUEUE_URL = stringKey("aws.sqs.queue.url"); + + /** The ARN of the AWS Step Functions Activity. */ + public static final AttributeKey AWS_STEP_FUNCTIONS_ACTIVITY_ARN = + stringKey("aws.step_functions.activity.arn"); + + /** The ARN of the AWS Step Functions State Machine. */ + public static final AttributeKey AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN = + stringKey("aws.step_functions.state_machine.arn"); + // Enum definitions + /** Values for {@link #AWS_ECS_LAUNCHTYPE}. */ public static final class AwsEcsLaunchtypeIncubatingValues { /** ec2. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java index d4388a2a..d3ce8f85 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java @@ -58,6 +58,7 @@ public final class AzureIncubatingAttributes { longKey("azure.cosmosdb.response.sub_status_code"); // Enum definitions + /** Values for {@link #AZURE_COSMOSDB_CONNECTION_MODE}. */ public static final class AzureCosmosdbConnectionModeIncubatingValues { /** Gateway (HTTP) connection. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CassandraIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CassandraIncubatingAttributes.java index bd36f9d1..0811dce5 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CassandraIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CassandraIncubatingAttributes.java @@ -45,6 +45,7 @@ public final class CassandraIncubatingAttributes { longKey("cassandra.speculative_execution.count"); // Enum definitions + /** Values for {@link #CASSANDRA_CONSISTENCY_LEVEL}. */ public static final class CassandraConsistencyLevelIncubatingValues { /** all. */ 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 588c562f..3c645e0a 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 @@ -13,6 +13,10 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class CicdIncubatingAttributes { + /** The kind of action a pipeline run is performing. */ + public static final AttributeKey CICD_PIPELINE_ACTION_NAME = + stringKey("cicd.pipeline.action.name"); + /** The human readable name of the pipeline within a CI/CD system. */ public static final AttributeKey CICD_PIPELINE_NAME = stringKey("cicd.pipeline.name"); @@ -45,6 +49,10 @@ public final class CicdIncubatingAttributes { public static final AttributeKey CICD_PIPELINE_TASK_RUN_ID = stringKey("cicd.pipeline.task.run.id"); + /** The result of a task run. */ + public static final AttributeKey CICD_PIPELINE_TASK_RUN_RESULT = + stringKey("cicd.pipeline.task.run.result"); + /** * The URL of the pipeline task run, providing the * complete address in order to locate and identify the pipeline task run. @@ -60,10 +68,37 @@ public final class CicdIncubatingAttributes { public static final AttributeKey CICD_SYSTEM_COMPONENT = stringKey("cicd.system.component"); + /** The unique identifier of a worker within a CICD system. */ + public static final AttributeKey CICD_WORKER_ID = stringKey("cicd.worker.id"); + + /** The name of a worker within a CICD system. */ + public static final AttributeKey CICD_WORKER_NAME = stringKey("cicd.worker.name"); + /** The state of a CICD worker / agent. */ public static final AttributeKey CICD_WORKER_STATE = stringKey("cicd.worker.state"); + /** + * The URL of the worker, providing the complete + * address in order to locate and identify the worker. + */ + public static final AttributeKey CICD_WORKER_URL_FULL = stringKey("cicd.worker.url.full"); + // Enum definitions + + /** Values for {@link #CICD_PIPELINE_ACTION_NAME}. */ + public static final class CicdPipelineActionNameIncubatingValues { + /** The pipeline run is executing a build. */ + public static final String BUILD = "BUILD"; + + /** The pipeline run is executing. */ + public static final String RUN = "RUN"; + + /** The pipeline run is executing a sync. */ + public static final String SYNC = "SYNC"; + + private CicdPipelineActionNameIncubatingValues() {} + } + /** Values for {@link #CICD_PIPELINE_RESULT}. */ public static final class CicdPipelineResultIncubatingValues { /** The pipeline run finished successfully. */ @@ -114,6 +149,34 @@ public static final class CicdPipelineRunStateIncubatingValues { private CicdPipelineRunStateIncubatingValues() {} } + /** Values for {@link #CICD_PIPELINE_TASK_RUN_RESULT}. */ + public static final class CicdPipelineTaskRunResultIncubatingValues { + /** The task run finished successfully. */ + public static final String SUCCESS = "success"; + + /** + * The task run did not finish successfully, eg. due to a compile error or a failing test. Such + * failures are usually detected by non-zero exit codes of the tools executed in the task run. + */ + public static final String FAILURE = "failure"; + + /** + * The task run failed due to an error in the CICD system, eg. due to the worker being killed. + */ + public static final String ERROR = "error"; + + /** A timeout caused the task run to be interrupted. */ + public static final String TIMEOUT = "timeout"; + + /** The task run was cancelled, eg. by a user manually cancelling the task run. */ + public static final String CANCELLATION = "cancellation"; + + /** The task run was skipped, eg. due to a precondition not being met. */ + public static final String SKIP = "skip"; + + private CicdPipelineTaskRunResultIncubatingValues() {} + } + /** Values for {@link #CICD_PIPELINE_TASK_TYPE}. */ public static final class CicdPipelineTaskTypeIncubatingValues { /** build */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java index 2a7e1ef1..1eb0f8ee 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java @@ -40,7 +40,10 @@ public final class CloudIncubatingAttributes { public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); /** - * The geographical region the resource is running. + * The geographical region within a cloud provider. When associated with a resource, this + * attribute specifies the region where the resource operates. When calling services or APIs + * deployed on a cloud, this attribute identifies the region where the called destination is + * deployed. * *

Notes: * @@ -89,6 +92,7 @@ public final class CloudIncubatingAttributes { public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); // Enum definitions + /** Values for {@link #CLOUD_PLATFORM}. */ public static final class CloudPlatformIncubatingValues { /** Alibaba Cloud Elastic Compute Service */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java index 27fd7897..27e53d29 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java @@ -17,40 +17,54 @@ public final class CodeIncubatingAttributes { /** * Deprecated, use {@code code.column.number} * - * @deprecated Replaced by {@code code.column.number} + * @deprecated Replaced by {@code code.column.number}. */ @Deprecated public static final AttributeKey CODE_COLUMN = longKey("code.column"); /** * The column number in {@code code.file.path} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function.name}. + * within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on + * the Profile signal since the data is already captured in 'message Line'. This constraint is + * imposed to prevent redundancy and maintain data integrity. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.CodeAttributes#CODE_COLUMN_NUMBER} attribute. */ + @Deprecated public static final AttributeKey CODE_COLUMN_NUMBER = longKey("code.column.number"); /** * The source code file name that identifies the code unit as uniquely as possible (preferably an - * absolute file path). + * absolute file path). This attribute MUST NOT be used on the Profile signal since the data is + * already captured in 'message Function'. This constraint is imposed to prevent redundancy and + * maintain data integrity. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.CodeAttributes#CODE_FILE_PATH} attribute. */ - public static final AttributeKey CODE_FILE_PATH = stringKey("code.file.path"); + @Deprecated public static final AttributeKey CODE_FILE_PATH = stringKey("code.file.path"); /** * Deprecated, use {@code code.file.path} instead * - * @deprecated Replaced by {@code code.file.path} + * @deprecated Replaced by {@code code.file.path}. */ @Deprecated public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); /** * Deprecated, use {@code code.function.name} instead * - * @deprecated Replaced by {@code code.function.name} + * @deprecated Value should be included in {@code code.function.name} which is expected to be a + * fully-qualified name. */ @Deprecated public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); /** * The method or function fully-qualified name without arguments. The value should fit the natural * representation of the language runtime, which is also likely the same used within {@code - * code.stacktrace} attribute value. + * code.stacktrace} attribute value. This attribute MUST NOT be used on the Profile signal since + * the data is already captured in 'message Function'. This constraint is imposed to prevent + * redundancy and maintain data integrity. * *

Notes: * @@ -72,19 +86,28 @@ public final class CodeIncubatingAttributes { *

  • Rust: {@code playground::my_module::my_cool_func} *
  • C function: {@code fopen} * + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.CodeAttributes#CODE_FUNCTION_NAME} attribute. */ + @Deprecated public static final AttributeKey CODE_FUNCTION_NAME = stringKey("code.function.name"); /** * The line number in {@code code.file.path} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function.name}. + * within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on + * the Profile signal since the data is already captured in 'message Line'. This constraint is + * imposed to prevent redundancy and maintain data integrity. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.CodeAttributes#CODE_LINE_NUMBER} attribute. */ - public static final AttributeKey CODE_LINE_NUMBER = longKey("code.line.number"); + @Deprecated public static final AttributeKey CODE_LINE_NUMBER = longKey("code.line.number"); /** * Deprecated, use {@code code.line.number} instead * - * @deprecated Replaced by {@code code.line.number} + * @deprecated Replaced by {@code code.line.number}. */ @Deprecated public static final AttributeKey CODE_LINENO = longKey("code.lineno"); @@ -100,8 +123,14 @@ public final class CodeIncubatingAttributes { * A stacktrace as a string in the natural representation for the language runtime. The * representation is identical to {@code - * exception.stacktrace}. + * exception.stacktrace}. This attribute MUST NOT be used on the Profile signal since the data + * is already captured in 'message Location'. This constraint is imposed to prevent redundancy and + * maintain data integrity. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.CodeAttributes#CODE_STACKTRACE} attribute. */ + @Deprecated public static final AttributeKey CODE_STACKTRACE = stringKey("code.stacktrace"); // Enum definitions 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 e834329a..1a616ce4 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 @@ -38,7 +38,7 @@ public final class ContainerIncubatingAttributes { /** * Deprecated, use {@code cpu.mode} instead. * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final AttributeKey CONTAINER_CPU_STATE = stringKey("container.cpu.state"); @@ -118,7 +118,14 @@ public final class ContainerIncubatingAttributes { public static final AttributeKey> CONTAINER_IMAGE_TAGS = stringArrayKey("container.image.tags"); - /** Container labels, {@code } being the label name, the value being the label value. */ + /** + * Container labels, {@code } being the label name, the value being the label value. + * + *

    Notes: + * + *

    For example, a docker container label {@code app} with value {@code nginx} SHOULD be + * recorded as the {@code container.label.app} attribute with value {@code "nginx"}. + */ public static final AttributeKeyTemplate CONTAINER_LABEL = stringKeyTemplate("container.label"); @@ -138,10 +145,11 @@ public final class ContainerIncubatingAttributes { public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); // Enum definitions + /** * Values for {@link #CONTAINER_CPU_STATE} * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final class ContainerCpuStateIncubatingValues { diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java index 834f27eb..738f92d4 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java @@ -21,6 +21,7 @@ public final class CpuIncubatingAttributes { public static final AttributeKey CPU_MODE = stringKey("cpu.mode"); // Enum definitions + /** Values for {@link #CPU_MODE}. */ public static final class CpuModeIncubatingValues { /** user. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpythonIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpythonIncubatingAttributes.java index d0c9e4d3..8a6dc22e 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpythonIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpythonIncubatingAttributes.java @@ -17,6 +17,7 @@ public final class CpythonIncubatingAttributes { public static final AttributeKey CPYTHON_GC_GENERATION = longKey("cpython.gc.generation"); // Enum definitions + /** Values for {@link #CPYTHON_GC_GENERATION}. */ public static final class CpythonGcGenerationIncubatingValues { /** Generation 0 */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java index e2dd03fc..47295955 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java @@ -123,11 +123,15 @@ public final class DbIncubatingAttributes { * do any case normalization. * *

    The collection name SHOULD NOT be extracted from {@code db.query.text}, when the database - * system supports cross-table queries in non-batch operations. + * system supports query text with multiple collections in non-batch operations. * *

    For batch operations, if the individual operations are known to have the same collection * name then that collection name SHOULD be used. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_COLLECTION_NAME} attribute. */ + @Deprecated public static final AttributeKey DB_COLLECTION_NAME = stringKey("db.collection.name"); /** @@ -177,7 +181,7 @@ public final class DbIncubatingAttributes { /** * Deprecated, no replacement at this time. * - * @deprecated No replacement at this time. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = @@ -259,7 +263,7 @@ public final class DbIncubatingAttributes { * Deprecated, no general replacement at this time. For Elasticsearch, use {@code * db.elasticsearch.node.name} instead. * - * @deprecated Deprecated, no general replacement at this time. For Elasticsearch, use {@code + * @deprecated Removed, no general replacement at this time. For Elasticsearch, use {@code * db.elasticsearch.node.name} instead. */ @Deprecated public static final AttributeKey DB_INSTANCE_ID = stringKey("db.instance.id"); @@ -267,7 +271,7 @@ public final class DbIncubatingAttributes { /** * Removed, no replacement at this time. * - * @deprecated Removed as not used. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = @@ -285,7 +289,7 @@ public final class DbIncubatingAttributes { /** * Deprecated, SQL Server instance is now populated as a part of {@code db.namespace} attribute. * - * @deprecated Deprecated, no replacement at this time. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final AttributeKey DB_MSSQL_INSTANCE_NAME = @@ -303,15 +307,17 @@ public final class DbIncubatingAttributes { * *

    Notes: * - *

    If a database system has multiple namespace components, they SHOULD be concatenated - * (potentially using database system specific conventions) from most general to most specific - * namespace component, and more specific namespaces SHOULD NOT be captured without the more - * general namespaces, to ensure that "startswith" queries for the more general namespaces will be - * valid. Semantic conventions for individual database systems SHOULD document what {@code - * db.namespace} means in the context of that system. It is RECOMMENDED to capture the value as - * provided by the application without attempting to do any case normalization. + *

    If a database system has multiple namespace components, they SHOULD be concatenated from the + * most general to the most specific namespace component, using {@code |} as a separator between + * the components. Any missing components (and their associated separators) SHOULD be omitted. + * Semantic conventions for individual database systems SHOULD document what {@code db.namespace} + * means in the context of that system. It is RECOMMENDED to capture the value as provided by the + * application without attempting to do any case normalization. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_NAMESPACE} attribute. */ - public static final AttributeKey DB_NAMESPACE = stringKey("db.namespace"); + @Deprecated public static final AttributeKey DB_NAMESPACE = stringKey("db.namespace"); /** * Deprecated, use {@code db.operation.name} instead. @@ -327,7 +333,11 @@ public final class DbIncubatingAttributes { * *

    Operations are only considered batches when they contain two or more operations, and so * {@code db.operation.batch.size} SHOULD never be {@code 1}. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_OPERATION_BATCH_SIZE} attribute. */ + @Deprecated public static final AttributeKey DB_OPERATION_BATCH_SIZE = longKey("db.operation.batch.size"); @@ -340,7 +350,7 @@ public final class DbIncubatingAttributes { * do any case normalization. * *

    The operation name SHOULD NOT be extracted from {@code db.query.text}, when the database - * system supports cross-table queries in non-batch operations. + * system supports query text with multiple operations in non-batch operations. * *

    If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized * to a single space. @@ -349,7 +359,11 @@ public final class DbIncubatingAttributes { * then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code * db.operation.name} SHOULD be {@code BATCH} or some other database system specific term if more * applicable. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_OPERATION_NAME} attribute. */ + @Deprecated public static final AttributeKey DB_OPERATION_NAME = stringKey("db.operation.name"); /** @@ -358,38 +372,60 @@ public final class DbIncubatingAttributes { * *

    Notes: * - *

    If a parameter has no name and instead is referenced only by index, then {@code } - * SHOULD be the 0-based index. If {@code db.query.text} is also captured, then {@code - * db.operation.parameter.} SHOULD match up with the parameterized placeholders present in - * {@code db.query.text}. {@code db.operation.parameter.} SHOULD NOT be captured on batch - * operations. + *

    For example, a client-side maximum number of rows to read from the database MAY be recorded + * as the {@code db.operation.parameter.max_rows} attribute. + * + *

    {@code db.query.text} parameters SHOULD be captured using {@code db.query.parameter.} + * instead of {@code db.operation.parameter.}. */ public static final AttributeKeyTemplate DB_OPERATION_PARAMETER = stringKeyTemplate("db.operation.parameter"); /** - * A query parameter used in {@code db.query.text}, with {@code } being the parameter name, - * and the attribute value being a string representation of the parameter value. + * A database query parameter, with {@code } being the parameter name, and the attribute + * value being a string representation of the parameter value. * - * @deprecated Replaced by {@code db.operation.parameter}. + *

    Notes: + * + *

    If a query parameter has no name and instead is referenced only by index, then {@code } + * SHOULD be the 0-based index. + * + *

    {@code db.query.parameter.} SHOULD match up with the parameterized placeholders present + * in {@code db.query.text}. + * + *

    {@code db.query.parameter.} SHOULD NOT be captured on batch operations. + * + *

    Examples: + * + *

      + *
    • For a query {@code SELECT * FROM users where username = %s} with the parameter {@code + * "jdoe"}, the attribute {@code db.query.parameter.0} SHOULD be set to {@code "jdoe"}. + *
    • For a query {@code "SELECT * FROM users WHERE username = %(username)s;} with parameter + * {@code username = "jdoe"}, the attribute {@code db.query.parameter.username} SHOULD be + * set to {@code "jdoe"}. + *
    */ - @Deprecated public static final AttributeKeyTemplate DB_QUERY_PARAMETER = stringKeyTemplate("db.query.parameter"); /** - * Low cardinality representation of a database query text. + * Low cardinality summary of a database query. * *

    Notes: * - *

    {@code db.query.summary} provides static summary of the query text. It describes a class of - * database queries and is useful as a grouping key, especially when analyzing telemetry for - * database calls involving complex queries. Summary may be available to the instrumentation - * through instrumentation hooks or other means. If it is not available, instrumentations that - * support query parsing SHOULD generate a summary following Generating query + *

    The query summary describes a class of database queries and is useful as a grouping key, + * especially when analyzing telemetry for database calls involving complex queries. + * + *

    Summary may be available to the instrumentation through instrumentation hooks or other + * means. If it is not available, instrumentations that support query parsing SHOULD generate a + * summary following Generating query * summary section. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_QUERY_SUMMARY} attribute. */ + @Deprecated public static final AttributeKey DB_QUERY_SUMMARY = stringKey("db.query.summary"); /** @@ -398,16 +434,20 @@ public final class DbIncubatingAttributes { *

    Notes: * *

    For sanitization see Sanitization of {@code + * href="/docs/database/database-spans.md#sanitization-of-dbquerytext">Sanitization of {@code * db.query.text}. For batch operations, if the individual operations are known to have the * same query text then that query text SHOULD be used, otherwise all of the individual query * texts SHOULD be concatenated with separator {@code ; } or some other database system specific - * separator if more applicable. Even though parameterized query text can potentially have - * sensitive data, by using a parameterized query the user is giving a strong signal that any - * sensitive data will be passed as parameter values, and the benefit to observability of - * capturing the static part of the query text by default outweighs the risk. + * separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even though + * parameterized query text can potentially have sensitive data, by using a parameterized query + * the user is giving a strong signal that any sensitive data will be passed as parameter values, + * and the benefit to observability of capturing the static part of the query text by default + * outweighs the risk. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_QUERY_TEXT} attribute. */ - public static final AttributeKey DB_QUERY_TEXT = stringKey("db.query.text"); + @Deprecated public static final AttributeKey DB_QUERY_TEXT = stringKey("db.query.text"); /** * Deprecated, use {@code db.namespace} instead. @@ -431,13 +471,16 @@ public final class DbIncubatingAttributes { * represent partial success, warning, or differentiate between various types of successful * outcomes. Semantic conventions for individual database systems SHOULD document what {@code * db.response.status_code} means in the context of that system. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_RESPONSE_STATUS_CODE} attribute. */ + @Deprecated public static final AttributeKey DB_RESPONSE_STATUS_CODE = stringKey("db.response.status_code"); /** - * Deprecated, use {@code db.collection.name} instead, but only if not extracting the value from - * {@code db.query.text}. + * Deprecated, use {@code db.collection.name} instead. * * @deprecated Replaced by {@code db.collection.name}, but only if not extracting the value from * {@code db.query.text}. @@ -461,7 +504,11 @@ public final class DbIncubatingAttributes { * *

    For batch operations, if the individual operations are known to have the same stored * procedure name then that stored procedure name SHOULD be used. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_STORED_PROCEDURE_NAME} attribute. */ + @Deprecated public static final AttributeKey DB_STORED_PROCEDURE_NAME = stringKey("db.stored_procedure.name"); @@ -480,17 +527,21 @@ public final class DbIncubatingAttributes { *

    The actual DBMS may differ from the one identified by the client. For example, when using * PostgreSQL client libraries to connect to a CockroachDB, the {@code db.system.name} is set to * {@code postgresql} based on the instrumentation's best knowledge. + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes#DB_SYSTEM_NAME} attribute. */ - public static final AttributeKey DB_SYSTEM_NAME = stringKey("db.system.name"); + @Deprecated public static final AttributeKey DB_SYSTEM_NAME = stringKey("db.system.name"); /** * Deprecated, no replacement at this time. * - * @deprecated No replacement at this time. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final AttributeKey DB_USER = stringKey("db.user"); // Enum definitions + /** * Values for {@link #DB_CASSANDRA_CONSISTENCY_LEVEL} * @@ -605,7 +656,7 @@ private DbCosmosdbConsistencyLevelIncubatingValues() {} /** * Values for {@link #DB_COSMOSDB_OPERATION_TYPE} * - * @deprecated No replacement at this time. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final class DbCosmosdbOperationTypeIncubatingValues { @@ -757,7 +808,7 @@ public static final class DbSystemIncubatingValues { /** InterBase */ public static final String INTERBASE = "interbase"; - /** MariaDB (This value has stability level RELEASE CANDIDATE) */ + /** MariaDB */ public static final String MARIADB = "mariadb"; /** SAP MaxDB */ @@ -769,13 +820,13 @@ public static final class DbSystemIncubatingValues { /** MongoDB */ public static final String MONGODB = "mongodb"; - /** Microsoft SQL Server (This value has stability level RELEASE CANDIDATE) */ + /** Microsoft SQL Server */ public static final String MSSQL = "mssql"; /** Deprecated, Microsoft SQL Server Compact is discontinued. */ public static final String MSSQLCOMPACT = "mssqlcompact"; - /** MySQL (This value has stability level RELEASE CANDIDATE) */ + /** MySQL */ public static final String MYSQL = "mysql"; /** Neo4j */ @@ -796,7 +847,7 @@ public static final class DbSystemIncubatingValues { /** PointBase */ public static final String POINTBASE = "pointbase"; - /** PostgreSQL (This value has stability level RELEASE CANDIDATE) */ + /** PostgreSQL */ public static final String POSTGRESQL = "postgresql"; /** Progress Database */ @@ -912,8 +963,13 @@ public static final class DbSystemNameIncubatingValues { /** Instant */ public static final String INSTANTDB = "instantdb"; - /** MariaDB */ - public static final String MARIADB = "mariadb"; + /** + * MariaDB + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes.DbSystemNameValues#MARIADB} value. + */ + @Deprecated public static final String MARIADB = "mariadb"; /** Memcached */ public static final String MEMCACHED = "memcached"; @@ -921,11 +977,21 @@ public static final class DbSystemNameIncubatingValues { /** MongoDB */ public static final String MONGODB = "mongodb"; - /** Microsoft SQL Server */ - public static final String MICROSOFT_SQL_SERVER = "microsoft.sql_server"; + /** + * Microsoft SQL Server + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes.DbSystemNameValues#MICROSOFT_SQL_SERVER} value. + */ + @Deprecated public static final String MICROSOFT_SQL_SERVER = "microsoft.sql_server"; - /** MySQL */ - public static final String MYSQL = "mysql"; + /** + * MySQL + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes.DbSystemNameValues#MYSQL} value. + */ + @Deprecated public static final String MYSQL = "mysql"; /** Neo4j */ public static final String NEO4J = "neo4j"; @@ -936,8 +1002,13 @@ public static final class DbSystemNameIncubatingValues { /** Oracle Database */ public static final String ORACLE_DB = "oracle.db"; - /** PostgreSQL */ - public static final String POSTGRESQL = "postgresql"; + /** + * PostgreSQL + * + * @deprecated deprecated in favor of stable {@link + * io.opentelemetry.semconv.DbAttributes.DbSystemNameValues#POSTGRESQL} value. + */ + @Deprecated public static final String POSTGRESQL = "postgresql"; /** Redis */ public static final String REDIS = "redis"; 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 4be8f6e1..69e476d4 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 @@ -16,7 +16,7 @@ public final class DeploymentIncubatingAttributes { /** * 'Deprecated, use {@code deployment.environment.name} instead.' * - * @deprecated Deprecated, use {@code deployment.environment.name} instead. + * @deprecated Replaced by {@code deployment.environment.name}. */ @Deprecated public static final AttributeKey DEPLOYMENT_ENVIRONMENT = @@ -51,6 +51,7 @@ public final class DeploymentIncubatingAttributes { public static final AttributeKey DEPLOYMENT_STATUS = stringKey("deployment.status"); // Enum definitions + /** Values for {@link #DEPLOYMENT_STATUS}. */ public static final class DeploymentStatusIncubatingValues { /** failed */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java index 00c1942e..6aaab438 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java @@ -40,7 +40,7 @@ public final class DeviceIncubatingAttributes { * appropriate compliance clearance. Any instrumentation providing this identifier MUST implement * it as an opt-in feature. * - *

    See {@code + *

    See {@code * app.installation.id} for a more privacy-preserving alternative. * * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DiskIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DiskIncubatingAttributes.java index c95cbd8a..deddb14c 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DiskIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DiskIncubatingAttributes.java @@ -17,6 +17,7 @@ public final class DiskIncubatingAttributes { public static final AttributeKey DISK_IO_DIRECTION = stringKey("disk.io.direction"); // Enum definitions + /** Values for {@link #DISK_IO_DIRECTION}. */ public static final class DiskIoDirectionIncubatingValues { /** read. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java index 704dcc11..f4120178 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java @@ -48,14 +48,14 @@ public final class EnduserIncubatingAttributes { /** * Deprecated, use {@code user.roles} instead. * - * @deprecated Replaced by {@code user.roles} attribute. + * @deprecated Use {@code user.roles} attribute instead. */ @Deprecated public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); /** * Deprecated, no replacement at this time. * - * @deprecated Removed. + * @deprecated Removed, no replacement at this time. */ @Deprecated public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); 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 7eaf0089..a9fc9ad2 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 @@ -62,6 +62,7 @@ public final class ErrorIncubatingAttributes { @Deprecated public static final AttributeKey ERROR_TYPE = stringKey("error.type"); // Enum definitions + /** * Values for {@link #ERROR_TYPE}. * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java index 1609ac42..c48a0163 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java @@ -16,7 +16,7 @@ public final class EventIncubatingAttributes { /** * Identifies the class / type of event. * - * @deprecated Replaced by EventName top-level field on the LogRecord + * @deprecated Replaced by EventName top-level field on the LogRecord. */ @Deprecated public static final AttributeKey EVENT_NAME = stringKey("event.name"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java index e27f0540..f8f637a3 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java @@ -164,6 +164,7 @@ public final class FaasIncubatingAttributes { public static final AttributeKey FAAS_VERSION = stringKey("faas.version"); // Enum definitions + /** Values for {@link #FAAS_DOCUMENT_OPERATION}. */ public static final class FaasDocumentOperationIncubatingValues { /** When a new object is created. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java index ef393636..5da26f75 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java @@ -17,7 +17,12 @@ public final class FeatureFlagIncubatingAttributes { public static final AttributeKey FEATURE_FLAG_CONTEXT_ID = stringKey("feature_flag.context.id"); - /** A message explaining the nature of an error occurring during flag evaluation. */ + /** + * Deprecated, use {@code error.message} instead. + * + * @deprecated Replaced by {@code error.message}. + */ + @Deprecated public static final AttributeKey FEATURE_FLAG_EVALUATION_ERROR_MESSAGE = stringKey("feature_flag.evaluation.error.message"); @@ -35,7 +40,7 @@ public final class FeatureFlagIncubatingAttributes { /** Identifies the feature flag provider. */ public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = - stringKey("feature_flag.provider_name"); + stringKey("feature_flag.provider.name"); /** The reason code which shows how a feature flag value was determined. */ public static final AttributeKey FEATURE_FLAG_RESULT_REASON = @@ -75,6 +80,7 @@ public final class FeatureFlagIncubatingAttributes { public static final AttributeKey FEATURE_FLAG_VERSION = stringKey("feature_flag.version"); // Enum definitions + /** * Values for {@link #FEATURE_FLAG_EVALUATION_REASON} * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java index 1af7cc45..b328e255 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java @@ -125,6 +125,7 @@ public final class GcpIncubatingAttributes { stringKey("gcp.gce.instance.name"); // Enum definitions + /** Values for {@link #GCP_APPHUB_SERVICE_CRITICALITY_TYPE}. */ public static final class GcpApphubServiceCriticalityTypeIncubatingValues { /** Mission critical service. */ 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 682a1ae7..c20fd7a8 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 @@ -35,6 +35,29 @@ public final class GenAiIncubatingAttributes { @Deprecated public static final AttributeKey GEN_AI_COMPLETION = stringKey("gen_ai.completion"); + /** + * The unique identifier for a conversation (session, thread), used to store and correlate + * messages within this conversation. + */ + public static final AttributeKey GEN_AI_CONVERSATION_ID = + stringKey("gen_ai.conversation.id"); + + /** + * The data source identifier. + * + *

    Notes: + * + *

    Data sources are used by AI agents and RAG applications to store grounding data. A data + * source may be an external database, object store, document collection, website, or any other + * storage system used by the GenAI agent or application. The {@code gen_ai.data_source.id} SHOULD + * match the identifier used by the GenAI system rather than a name specific to the external + * storage, such as a database or object store. Semantic conventions referencing {@code + * gen_ai.data_source.id} MAY also leverage additional attributes, such as {@code db.*}, to + * further identify and describe the data source. + */ + public static final AttributeKey GEN_AI_DATA_SOURCE_ID = + stringKey("gen_ai.data_source.id"); + /** * Deprecated, use {@code gen_ai.output.type}. * @@ -47,7 +70,7 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code gen_ai.request.seed}. * - * @deprecated Replaced by {@code gen_ai.request.seed} attribute. + * @deprecated Replaced by {@code gen_ai.request.seed}. */ @Deprecated public static final AttributeKey GEN_AI_OPENAI_REQUEST_SEED = @@ -184,6 +207,10 @@ public final class GenAiIncubatingAttributes { /** The tool call identifier. */ public static final AttributeKey GEN_AI_TOOL_CALL_ID = stringKey("gen_ai.tool.call.id"); + /** The tool description. */ + public static final AttributeKey GEN_AI_TOOL_DESCRIPTION = + stringKey("gen_ai.tool.description"); + /** Name of the tool utilized by the agent. */ public static final AttributeKey GEN_AI_TOOL_NAME = stringKey("gen_ai.tool.name"); @@ -206,7 +233,7 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code gen_ai.usage.output_tokens} instead. * - * @deprecated Replaced by {@code gen_ai.usage.output_tokens} attribute. + * @deprecated Replaced by {@code gen_ai.usage.output_tokens}. */ @Deprecated public static final AttributeKey GEN_AI_USAGE_COMPLETION_TOKENS = @@ -223,13 +250,14 @@ public final class GenAiIncubatingAttributes { /** * Deprecated, use {@code gen_ai.usage.input_tokens} instead. * - * @deprecated Replaced by {@code gen_ai.usage.input_tokens} attribute. + * @deprecated Replaced by {@code gen_ai.usage.input_tokens}. */ @Deprecated public static final AttributeKey GEN_AI_USAGE_PROMPT_TOKENS = longKey("gen_ai.usage.prompt_tokens"); // Enum definitions + /** * Values for {@link #GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT} * @@ -268,6 +296,12 @@ public static final class GenAiOperationNameIncubatingValues { */ public static final String CHAT = "chat"; + /** + * Multimodal content generation operation such as Gemini Generate Content + */ + public static final String GENERATE_CONTENT = "generate_content"; + /** * Text completions operation such as OpenAI Completions API @@ -285,6 +319,9 @@ public static final class GenAiOperationNameIncubatingValues { /** Create GenAI agent */ public static final String CREATE_AGENT = "create_agent"; + /** Invoke GenAI agent */ + public static final String INVOKE_AGENT = "invoke_agent"; + /** Execute a tool */ public static final String EXECUTE_TOOL = "execute_tool"; @@ -313,6 +350,15 @@ public static final class GenAiSystemIncubatingValues { /** OpenAI */ public static final String OPENAI = "openai"; + /** Any Google generative AI endpoint */ + public static final String GCP_GEN_AI = "gcp.gen_ai"; + + /** Vertex AI */ + public static final String GCP_VERTEX_AI = "gcp.vertex_ai"; + + /** Gemini */ + public static final String GCP_GEMINI = "gcp.gemini"; + /** Vertex AI */ public static final String VERTEX_AI = "vertex_ai"; diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GeoIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GeoIncubatingAttributes.java index 0488161c..1cf155bc 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GeoIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GeoIncubatingAttributes.java @@ -48,6 +48,7 @@ public final class GeoIncubatingAttributes { public static final AttributeKey GEO_REGION_ISO_CODE = stringKey("geo.region.iso_code"); // Enum definitions + /** Values for {@link #GEO_CONTINENT_CODE}. */ public static final class GeoContinentCodeIncubatingValues { /** Africa */ 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 0fd7938b..1d52c200 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 @@ -17,6 +17,7 @@ public final class GoIncubatingAttributes { public static final AttributeKey GO_MEMORY_TYPE = stringKey("go.memory.type"); // Enum definitions + /** 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 42df322c..dcb09809 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 @@ -31,6 +31,7 @@ public final class GraphqlIncubatingAttributes { stringKey("graphql.operation.type"); // Enum definitions + /** Values for {@link #GRAPHQL_OPERATION_TYPE}. */ public static final class GraphqlOperationTypeIncubatingValues { /** GraphQL query */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java index 41cb606c..c0bb0045 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java @@ -99,6 +99,7 @@ public final class HostIncubatingAttributes { public static final AttributeKey HOST_TYPE = stringKey("host.type"); // Enum definitions + /** Values for {@link #HOST_ARCH}. */ public static final class HostArchIncubatingValues { /** AMD64 */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java index 120143d4..2bc6216b 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java @@ -67,11 +67,25 @@ public final class HttpIncubatingAttributes { * *

    Instrumentations SHOULD require an explicit configuration of which headers are to be * captured. Including all request headers can be a security risk - explicit configuration helps - * avoid leaking sensitive information. The {@code User-Agent} header is already captured in the - * {@code user_agent.original} attribute. Users MAY explicitly configure instrumentations to - * capture them even though it is not recommended. The attribute value MUST consist of either - * multiple header values as an array of strings or a single-item array containing a possibly - * comma-concatenated string, depending on the way the HTTP library provides access to headers. + * avoid leaking sensitive information. + * + *

    The {@code User-Agent} header is already captured in the {@code user_agent.original} + * attribute. Users MAY explicitly configure instrumentations to capture them even though it is + * not recommended. + * + *

    The attribute value MUST consist of either multiple header values as an array of strings or + * a single-item array containing a possibly comma-concatenated string, depending on the way the + * HTTP library provides access to headers. + * + *

    Examples: + * + *

    * * @deprecated deprecated in favor of stable {@link * io.opentelemetry.semconv.HttpAttributes#HTTP_REQUEST_HEADER} attribute. @@ -146,9 +160,9 @@ public final class HttpIncubatingAttributes { public static final AttributeKey HTTP_REQUEST_SIZE = longKey("http.request.size"); /** - * Deprecated, use {@code http.request.header.} instead. + * Deprecated, use {@code http.request.header.content-length} instead. * - * @deprecated Replaced by {@code http.request.header.}. + * @deprecated Replaced by {@code http.request.header.content-length}. */ @Deprecated public static final AttributeKey HTTP_REQUEST_CONTENT_LENGTH = @@ -180,10 +194,24 @@ public final class HttpIncubatingAttributes { * *

    Instrumentations SHOULD require an explicit configuration of which headers are to be * captured. Including all response headers can be a security risk - explicit configuration helps - * avoid leaking sensitive information. Users MAY explicitly configure instrumentations to capture - * them even though it is not recommended. The attribute value MUST consist of either multiple - * header values as an array of strings or a single-item array containing a possibly - * comma-concatenated string, depending on the way the HTTP library provides access to headers. + * avoid leaking sensitive information. + * + *

    Users MAY explicitly configure instrumentations to capture them even though it is not + * recommended. + * + *

    The attribute value MUST consist of either multiple header values as an array of strings or + * a single-item array containing a possibly comma-concatenated string, depending on the way the + * HTTP library provides access to headers. + * + *

    Examples: + * + *

      + *
    • A header {@code Content-Type: application/json} header SHOULD be recorded as the {@code + * http.request.response.content-type} attribute with value {@code ["application/json"]}. + *
    • A header {@code My-custom-header: abc, def} header SHOULD be recorded as the {@code + * http.response.header.my-custom-header} attribute with value {@code ["abc", "def"]} or + * {@code ["abc, def"]} depending on the HTTP library. + *
    * * @deprecated deprecated in favor of stable {@link * io.opentelemetry.semconv.HttpAttributes#HTTP_RESPONSE_HEADER} attribute. @@ -210,9 +238,9 @@ public final class HttpIncubatingAttributes { longKey("http.response.status_code"); /** - * Deprecated, use {@code http.response.header.} instead. + * Deprecated, use {@code http.response.header.content-length} instead. * - * @deprecated Replaced by {@code http.response.header.}. + * @deprecated hp.response.header.content-length */ @Deprecated public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH = @@ -221,7 +249,7 @@ public final class HttpIncubatingAttributes { /** * Deprecated, use {@code http.response.body.size} instead. * - * @deprecated Replace by {@code http.response.body.size}. + * @deprecated Replaced by {@code http.response.body.size}. */ @Deprecated public static final AttributeKey HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = @@ -246,7 +274,7 @@ public final class HttpIncubatingAttributes { /** * Deprecated, use {@code url.scheme} instead. * - * @deprecated Replaced by {@code url.scheme} instead. + * @deprecated Replaced by {@code url.scheme}. */ @Deprecated public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); @@ -268,7 +296,7 @@ public final class HttpIncubatingAttributes { /** * Deprecated, use {@code url.path} and {@code url.query} instead. * - * @deprecated Split to {@code url.path} and `url.query. + * @deprecated Split to {@code url.path} and {@code url.query}. */ @Deprecated public static final AttributeKey HTTP_TARGET = stringKey("http.target"); @@ -288,6 +316,7 @@ public final class HttpIncubatingAttributes { public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); // Enum definitions + /** Values for {@link #HTTP_CONNECTION_STATE}. */ public static final class HttpConnectionStateIncubatingValues { /** active state. */ 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 7ee33ad6..3f087ed3 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 @@ -40,6 +40,7 @@ public final class HwIncubatingAttributes { public static final AttributeKey HW_TYPE = stringKey("hw.type"); // Enum definitions + /** Values for {@link #HW_STATE}. */ public static final class HwStateIncubatingValues { /** Ok */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java index 0680fdb1..d36f3df4 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java @@ -37,6 +37,16 @@ public final class JvmIncubatingAttributes { */ @Deprecated public static final AttributeKey JVM_GC_ACTION = stringKey("jvm.gc.action"); + /** + * Name of the garbage collector cause. + * + *

    Notes: + * + *

    Garbage collector cause is generally obtained via GarbageCollectionNotificationInfo#getGcCause(). + */ + public static final AttributeKey JVM_GC_CAUSE = stringKey("jvm.gc.cause"); + /** * Name of the garbage collector. * @@ -92,6 +102,7 @@ public final class JvmIncubatingAttributes { public static final AttributeKey JVM_THREAD_STATE = stringKey("jvm.thread.state"); // Enum definitions + /** * Values for {@link #JVM_MEMORY_TYPE}. * 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 874356f6..c73527a1 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 @@ -65,18 +65,98 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON = stringKey("k8s.container.status.last_terminated_reason"); + /** + * The cronjob annotation placed on the CronJob, the {@code } being the annotation name, the + * value being the annotation value. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • An annotation {@code retries} with value {@code 4} SHOULD be recorded as the {@code + * k8s.cronjob.annotation.retries} attribute with value {@code "4"}. + *
    • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.cronjob.annotation.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_CRONJOB_ANNOTATION = + stringKeyTemplate("k8s.cronjob.annotation"); + + /** + * The label placed on the CronJob, the {@code } being the label name, the value being the + * label value. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • A label {@code type} with value {@code weekly} SHOULD be recorded as the {@code + * k8s.cronjob.label.type} attribute with value {@code "weekly"}. + *
    • A label {@code automated} with empty string value SHOULD be recorded as the {@code + * k8s.cronjob.label.automated} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_CRONJOB_LABEL = + stringKeyTemplate("k8s.cronjob.label"); + /** The name of the CronJob. */ public static final AttributeKey K8S_CRONJOB_NAME = stringKey("k8s.cronjob.name"); /** The UID of the CronJob. */ public static final AttributeKey K8S_CRONJOB_UID = stringKey("k8s.cronjob.uid"); + /** + * The annotation key-value pairs placed on the DaemonSet. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_DAEMONSET_ANNOTATION = + stringKeyTemplate("k8s.daemonset.annotation"); + + /** + * The label key-value pairs placed on the DaemonSet. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_DAEMONSET_LABEL = + stringKeyTemplate("k8s.daemonset.label"); + /** The name of the DaemonSet. */ public static final AttributeKey K8S_DAEMONSET_NAME = stringKey("k8s.daemonset.name"); /** The UID of the DaemonSet. */ public static final AttributeKey K8S_DAEMONSET_UID = stringKey("k8s.daemonset.uid"); + /** + * The annotation key-value pairs placed on the Deployment. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_DEPLOYMENT_ANNOTATION = + stringKeyTemplate("k8s.deployment.annotation"); + + /** + * The label key-value pairs placed on the Deployment. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_DEPLOYMENT_LABEL = + stringKeyTemplate("k8s.deployment.label"); + /** The name of the Deployment. */ public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); @@ -89,12 +169,56 @@ public final class K8sIncubatingAttributes { /** The UID of the horizontal pod autoscaler. */ public static final AttributeKey K8S_HPA_UID = stringKey("k8s.hpa.uid"); + /** + * The annotation key-value pairs placed on the Job. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_JOB_ANNOTATION = + stringKeyTemplate("k8s.job.annotation"); + + /** + * The label key-value pairs placed on the Job. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_JOB_LABEL = + stringKeyTemplate("k8s.job.label"); + /** The name of the Job. */ public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); /** The UID of the Job. */ public static final AttributeKey K8S_JOB_UID = stringKey("k8s.job.uid"); + /** + * The annotation key-value pairs placed on the Namespace. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_NAMESPACE_ANNOTATION = + stringKeyTemplate("k8s.namespace.annotation"); + + /** + * The label key-value pairs placed on the Namespace. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_NAMESPACE_LABEL = + stringKeyTemplate("k8s.namespace.label"); + /** The name of the namespace that the pod is running in. */ public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); @@ -109,6 +233,43 @@ public final class K8sIncubatingAttributes { */ public static final AttributeKey K8S_NAMESPACE_PHASE = stringKey("k8s.namespace.phase"); + /** + * The annotation placed on the Node, the {@code } being the annotation name, the value being + * the annotation value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • An annotation {@code node.alpha.kubernetes.io/ttl} with value {@code 0} SHOULD be + * recorded as the {@code k8s.node.annotation.node.alpha.kubernetes.io/ttl} attribute with + * value {@code "0"}. + *
    • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.node.annotation.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_NODE_ANNOTATION = + stringKeyTemplate("k8s.node.annotation"); + + /** + * The label placed on the Node, the {@code } being the label name, the value being the label + * value, even if the value is empty. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • A label {@code kubernetes.io/arch} with value {@code arm64} SHOULD be recorded as the + * {@code k8s.node.label.kubernetes.io/arch} attribute with value {@code "arm64"}. + *
    • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.node.label.data} attribute with value {@code ""}. + *
    + */ + public static final AttributeKeyTemplate K8S_NODE_LABEL = + stringKeyTemplate("k8s.node.label"); + /** The name of the Node. */ public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); @@ -116,15 +277,43 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); /** - * The annotation key-value pairs placed on the Pod, the {@code } being the annotation name, - * the value being the annotation value. + * The annotation placed on the Pod, the {@code } being the annotation name, the value being + * the annotation value. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • An annotation {@code kubernetes.io/enforce-mountable-secrets} with value {@code true} + * SHOULD be recorded as the {@code + * k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets} attribute with value {@code + * "true"}. + *
    • An annotation {@code mycompany.io/arch} with value {@code x64} SHOULD be recorded as the + * {@code k8s.pod.annotation.mycompany.io/arch} attribute with value {@code "x64"}. + *
    • An annotation {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.pod.annotation.data} attribute with value {@code ""}. + *
    */ public static final AttributeKeyTemplate K8S_POD_ANNOTATION = stringKeyTemplate("k8s.pod.annotation"); /** - * The label key-value pairs placed on the Pod, the {@code } being the label name, the value - * being the label value. + * The label placed on the Pod, the {@code } being the label name, the value being the label + * value. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • A label {@code app} with value {@code my-app} SHOULD be recorded as the {@code + * k8s.pod.label.app} attribute with value {@code "my-app"}. + *
    • A label {@code mycompany.io/arch} with value {@code x64} SHOULD be recorded as the {@code + * k8s.pod.label.mycompany.io/arch} attribute with value {@code "x64"}. + *
    • A label {@code data} with empty string value SHOULD be recorded as the {@code + * k8s.pod.label.data} attribute with value {@code ""}. + *
    */ public static final AttributeKeyTemplate K8S_POD_LABEL = stringKeyTemplate("k8s.pod.label"); @@ -144,6 +333,28 @@ public final class K8sIncubatingAttributes { /** The UID of the Pod. */ public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); + /** + * The annotation key-value pairs placed on the ReplicaSet. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_REPLICASET_ANNOTATION = + stringKeyTemplate("k8s.replicaset.annotation"); + + /** + * The label key-value pairs placed on the ReplicaSet. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_REPLICASET_LABEL = + stringKeyTemplate("k8s.replicaset.label"); + /** The name of the ReplicaSet. */ public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); @@ -166,6 +377,28 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_RESOURCEQUOTA_UID = stringKey("k8s.resourcequota.uid"); + /** + * The annotation key-value pairs placed on the StatefulSet. + * + *

    Notes: + * + *

    The {@code } being the annotation name, the value being the annotation value, even if + * the value is empty. + */ + public static final AttributeKeyTemplate K8S_STATEFULSET_ANNOTATION = + stringKeyTemplate("k8s.statefulset.annotation"); + + /** + * The label key-value pairs placed on the StatefulSet. + * + *

    Notes: + * + *

    The {@code } being the label name, the value being the label value, even if the value + * is empty. + */ + public static final AttributeKeyTemplate K8S_STATEFULSET_LABEL = + stringKeyTemplate("k8s.statefulset.label"); + /** The name of the StatefulSet. */ public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); @@ -179,6 +412,7 @@ public final class K8sIncubatingAttributes { public static final AttributeKey K8S_VOLUME_TYPE = stringKey("k8s.volume.type"); // Enum definitions + /** Values for {@link #K8S_NAMESPACE_PHASE}. */ public static final class K8sNamespacePhaseIncubatingValues { /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LinuxIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LinuxIncubatingAttributes.java index 8cbd88d0..9db8b3f9 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LinuxIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LinuxIncubatingAttributes.java @@ -18,6 +18,7 @@ public final class LinuxIncubatingAttributes { stringKey("linux.memory.slab.state"); // Enum definitions + /** Values for {@link #LINUX_MEMORY_SLAB_STATE}. */ public static final class LinuxMemorySlabStateIncubatingValues { /** reclaimable. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java index bd79984a..6ce00115 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java @@ -55,6 +55,7 @@ public final class LogIncubatingAttributes { public static final AttributeKey LOG_RECORD_UID = stringKey("log.record.uid"); // Enum definitions + /** Values for {@link #LOG_IOSTREAM}. */ public static final class LogIostreamIncubatingValues { /** Logs from stdout stream */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java index 07a7b525..80a5872f 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java @@ -47,6 +47,7 @@ public final class MessageIncubatingAttributes { longKey("message.uncompressed_size"); // Enum definitions + /** * Values for {@link #MESSAGE_TYPE} * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java index b8f4cdc8..78c6bdc0 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java @@ -105,7 +105,7 @@ public final class MessagingIncubatingAttributes { /** * Deprecated, no replacement at this time. * - * @deprecated No replacement at this time. + * @deprecated Removed. No replacement at this time. */ @Deprecated public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = @@ -114,7 +114,7 @@ public final class MessagingIncubatingAttributes { /** * Deprecated, no replacement at this time. * - * @deprecated No replacement at this time. + * @deprecated Removed. No replacement at this time. */ @Deprecated public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_NAME = @@ -347,6 +347,7 @@ public final class MessagingIncubatingAttributes { public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); // Enum definitions + /** Values for {@link #MESSAGING_OPERATION_TYPE}. */ public static final class MessagingOperationTypeIncubatingValues { /** diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetIncubatingAttributes.java index fe01d687..0ffb53ee 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetIncubatingAttributes.java @@ -110,7 +110,7 @@ public final class NetIncubatingAttributes { /** * Deprecated, no replacement at this time. * - * @deprecated Removed. + * @deprecated Removed. No replacement at this time. */ @Deprecated public static final AttributeKey NET_SOCK_PEER_NAME = stringKey("net.sock.peer.name"); @@ -131,6 +131,7 @@ public final class NetIncubatingAttributes { @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); // Enum definitions + /** * Values for {@link #NET_SOCK_FAMILY} * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java index c2b4e457..ad45735a 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java @@ -156,6 +156,7 @@ public final class NetworkIncubatingAttributes { @Deprecated public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); // Enum definitions + /** Values for {@link #NETWORK_CONNECTION_STATE}. */ public static final class NetworkConnectionStateIncubatingValues { /** closed. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NodejsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NodejsIncubatingAttributes.java index 026c7467..341f0367 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NodejsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NodejsIncubatingAttributes.java @@ -18,6 +18,7 @@ public final class NodejsIncubatingAttributes { stringKey("nodejs.eventloop.state"); // Enum definitions + /** Values for {@link #NODEJS_EVENTLOOP_STATE}. */ public static final class NodejsEventloopStateIncubatingValues { /** Active time. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java index f80542e1..c5df4db1 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java @@ -23,6 +23,7 @@ public final class OpentracingIncubatingAttributes { public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); // Enum definitions + /** Values for {@link #OPENTRACING_REF_TYPE}. */ public static final class OpentracingRefTypeIncubatingValues { /** The parent Span depends on the child Span in some capacity */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java index 0c887e93..0e2018a6 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java @@ -35,6 +35,7 @@ public final class OsIncubatingAttributes { public static final AttributeKey OS_VERSION = stringKey("os.version"); // Enum definitions + /** Values for {@link #OS_TYPE}. */ public static final class OsTypeIncubatingValues { /** Microsoft Windows */ 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 99b50910..016730e8 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 @@ -53,7 +53,7 @@ public final class OtelIncubatingAttributes { /** * Deprecated. Use the {@code otel.scope.name} attribute * - * @deprecated Use the {@code otel.scope.name} attribute. + * @deprecated Replaced by {@code otel.scope.name}. */ @Deprecated public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); @@ -61,7 +61,7 @@ public final class OtelIncubatingAttributes { /** * Deprecated. Use the {@code otel.scope.version} attribute. * - * @deprecated Use the {@code otel.scope.version} attribute. + * @deprecated Replaced by {@code otel.scope.version}. */ @Deprecated public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); @@ -108,18 +108,19 @@ public final class OtelIncubatingAttributes { stringKey("otel.status_description"); // Enum definitions + /** Values for {@link #OTEL_COMPONENT_TYPE}. */ public static final class OtelComponentTypeIncubatingValues { - /** The builtin SDK Batching Span Processor */ + /** The builtin SDK batching span processor */ public static final String BATCHING_SPAN_PROCESSOR = "batching_span_processor"; - /** The builtin SDK Simple Span Processor */ + /** The builtin SDK simple span processor */ public static final String SIMPLE_SPAN_PROCESSOR = "simple_span_processor"; - /** The builtin SDK Batching LogRecord Processor */ + /** The builtin SDK batching log record processor */ public static final String BATCHING_LOG_PROCESSOR = "batching_log_processor"; - /** The builtin SDK Simple LogRecord Processor */ + /** The builtin SDK simple log record processor */ public static final String SIMPLE_LOG_PROCESSOR = "simple_log_processor"; /** OTLP span exporter over gRPC with protobuf serialization */ @@ -131,15 +132,27 @@ public static final class OtelComponentTypeIncubatingValues { /** OTLP span exporter over HTTP with JSON serialization */ public static final String OTLP_HTTP_JSON_SPAN_EXPORTER = "otlp_http_json_span_exporter"; - /** OTLP LogRecord exporter over gRPC with protobuf serialization */ + /** OTLP log record exporter over gRPC with protobuf serialization */ public static final String OTLP_GRPC_LOG_EXPORTER = "otlp_grpc_log_exporter"; - /** OTLP LogRecord exporter over HTTP with protobuf serialization */ + /** OTLP log record exporter over HTTP with protobuf serialization */ public static final String OTLP_HTTP_LOG_EXPORTER = "otlp_http_log_exporter"; - /** OTLP LogRecord exporter over HTTP with JSON serialization */ + /** OTLP log record exporter over HTTP with JSON serialization */ public static final String OTLP_HTTP_JSON_LOG_EXPORTER = "otlp_http_json_log_exporter"; + /** The builtin SDK periodically exporting metric reader */ + public static final String PERIODIC_METRIC_READER = "periodic_metric_reader"; + + /** OTLP metric exporter over gRPC with protobuf serialization */ + public static final String OTLP_GRPC_METRIC_EXPORTER = "otlp_grpc_metric_exporter"; + + /** OTLP metric exporter over HTTP with protobuf serialization */ + public static final String OTLP_HTTP_METRIC_EXPORTER = "otlp_http_metric_exporter"; + + /** OTLP metric exporter over HTTP with JSON serialization */ + public static final String OTLP_HTTP_JSON_METRIC_EXPORTER = "otlp_http_json_metric_exporter"; + private OtelComponentTypeIncubatingValues() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java index 80e7019f..dc69238e 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java @@ -21,6 +21,7 @@ public final class OtherIncubatingAttributes { @Deprecated public static final AttributeKey STATE = stringKey("state"); // Enum definitions + /** * Values for {@link #STATE} * 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 d7eb82b6..7d4f45e1 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 @@ -9,8 +9,10 @@ import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.semconv.AttributeKeyTemplate; import java.util.List; // DO NOT EDIT, this is an Auto-generated file from @@ -38,7 +40,8 @@ public final class ProcessIncubatingAttributes { * All the command arguments (including the command/executable itself) as received by the process. * On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according * to the list of null-delimited strings extracted from {@code proc/[pid]/cmdline}. For libc-based - * executables, this would be the full argv vector passed to {@code main}. + * executables, this would be the full argv vector passed to {@code main}. SHOULD NOT be collected + * by default unless there is sanitization that excludes sensitive data. */ public static final AttributeKey> PROCESS_COMMAND_ARGS = stringArrayKey("process.command_args"); @@ -46,7 +49,8 @@ public final class ProcessIncubatingAttributes { /** * The full command used to launch the process as a single string representing the full command. * On Windows, can be set to the result of {@code GetCommandLineW}. Do not set this if you have to - * assemble it just for monitoring; use {@code process.command_args} instead. + * assemble it just for monitoring; use {@code process.command_args} instead. SHOULD NOT be + * collected by default unless there is sanitization that excludes sensitive data. */ public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); @@ -57,7 +61,7 @@ public final class ProcessIncubatingAttributes { /** * Deprecated, use {@code cpu.mode} instead. * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final AttributeKey PROCESS_CPU_STATE = stringKey("process.cpu.state"); @@ -66,6 +70,25 @@ public final class ProcessIncubatingAttributes { public static final AttributeKey PROCESS_CREATION_TIME = stringKey("process.creation.time"); + /** + * Process environment variables, being the environment variable name, the value being the + * environment variable value. + * + *

    Notes: + * + *

    Examples: + * + *

      + *
    • an environment variable {@code USER} with value {@code "ubuntu"} SHOULD be recorded as + * the {@code process.environment_variable.USER} attribute with value {@code "ubuntu"}. + *
    • an environment variable {@code PATH} with value {@code "/usr/local/bin:/usr/bin"} SHOULD + * be recorded as the {@code process.environment_variable.PATH} attribute with value {@code + * "/usr/local/bin:/usr/bin"}. + *
    + */ + public static final AttributeKeyTemplate PROCESS_ENVIRONMENT_VARIABLE = + stringKeyTemplate("process.environment_variable"); + /** The GNU build ID as found in the {@code .note.gnu.build-id} ELF section (hex string). */ public static final AttributeKey PROCESS_EXECUTABLE_BUILD_ID_GNU = stringKey("process.executable.build_id.gnu"); @@ -84,7 +107,7 @@ public final class ProcessIncubatingAttributes { /** * "Deprecated, use {@code process.executable.build_id.htlhash} instead." * - * @deprecated Replaced by {@code process.executable.build_id.htlhash} + * @deprecated Replaced by {@code process.executable.build_id.htlhash}. */ @Deprecated public static final AttributeKey PROCESS_EXECUTABLE_BUILD_ID_PROFILING = @@ -215,6 +238,7 @@ public final class ProcessIncubatingAttributes { stringKey("process.working_directory"); // Enum definitions + /** Values for {@link #PROCESS_CONTEXT_SWITCH_TYPE}. */ public static final class ProcessContextSwitchTypeIncubatingValues { /** voluntary. */ @@ -229,7 +253,7 @@ private ProcessContextSwitchTypeIncubatingValues() {} /** * Values for {@link #PROCESS_CPU_STATE} * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final class ProcessCpuStateIncubatingValues { diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java index 1ea03015..196ce13e 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProfileIncubatingAttributes.java @@ -17,6 +17,7 @@ public final class ProfileIncubatingAttributes { public static final AttributeKey PROFILE_FRAME_TYPE = stringKey("profile.frame.type"); // Enum definitions + /** Values for {@link #PROFILE_FRAME_TYPE}. */ public static final class ProfileFrameTypeIncubatingValues { /** .NET */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java index 56ecc1b4..9e166fa8 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java @@ -33,6 +33,10 @@ public final class RpcIncubatingAttributes { *

    Instrumentations SHOULD require an explicit configuration of which metadata values are to be * captured. Including all request metadata values can be a security risk - explicit configuration * helps avoid leaking sensitive information. + * + *

    For example, a property {@code my-custom-key} with value {@code ["1.2.3.4", "1.2.3.5"]} + * SHOULD be recorded as the {@code rpc.connect_rpc.request.metadata.my-custom-key} attribute with + * value {@code ["1.2.3.4", "1.2.3.5"]} */ public static final AttributeKeyTemplate> RPC_CONNECT_RPC_REQUEST_METADATA = stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); @@ -46,6 +50,10 @@ public final class RpcIncubatingAttributes { *

    Instrumentations SHOULD require an explicit configuration of which metadata values are to be * captured. Including all response metadata values can be a security risk - explicit * configuration helps avoid leaking sensitive information. + * + *

    For example, a property {@code my-custom-key} with value {@code "attribute_value"} SHOULD be + * recorded as the {@code rpc.connect_rpc.response.metadata.my-custom-key} attribute with value + * {@code ["attribute_value"]} */ public static final AttributeKeyTemplate> RPC_CONNECT_RPC_RESPONSE_METADATA = stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); @@ -59,6 +67,10 @@ public final class RpcIncubatingAttributes { *

    Instrumentations SHOULD require an explicit configuration of which metadata values are to be * captured. Including all request metadata values can be a security risk - explicit configuration * helps avoid leaking sensitive information. + * + *

    For example, a property {@code my-custom-key} with value {@code ["1.2.3.4", "1.2.3.5"]} + * SHOULD be recorded as {@code rpc.grpc.request.metadata.my-custom-key} attribute with value + * {@code ["1.2.3.4", "1.2.3.5"]} */ public static final AttributeKeyTemplate> RPC_GRPC_REQUEST_METADATA = stringArrayKeyTemplate("rpc.grpc.request.metadata"); @@ -72,6 +84,10 @@ public final class RpcIncubatingAttributes { *

    Instrumentations SHOULD require an explicit configuration of which metadata values are to be * captured. Including all response metadata values can be a security risk - explicit * configuration helps avoid leaking sensitive information. + * + *

    For example, a property {@code my-custom-key} with value {@code ["attribute_value"]} SHOULD + * be recorded as the {@code rpc.grpc.response.metadata.my-custom-key} attribute with value {@code + * ["attribute_value"]} */ public static final AttributeKeyTemplate> RPC_GRPC_RESPONSE_METADATA = stringArrayKeyTemplate("rpc.grpc.response.metadata"); @@ -154,6 +170,7 @@ public final class RpcIncubatingAttributes { public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); // Enum definitions + /** Values for {@link #RPC_CONNECT_RPC_ERROR_CODE}. */ public static final class RpcConnectRpcErrorCodeIncubatingValues { /** cancelled. */ 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 91084343..567050aa 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 @@ -21,7 +21,7 @@ public final class SystemIncubatingAttributes { /** * Deprecated, use {@code cpu.mode} instead. * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final AttributeKey SYSTEM_CPU_STATE = stringKey("system.cpu.state"); @@ -51,8 +51,7 @@ public final class SystemIncubatingAttributes { /** * Deprecated, use {@code network.connection.state} instead. * - * @deprecated Removed, report network connection state with {@code network.connection.state} - * attribute + * @deprecated Replaced by {@code network.connection.state}. */ @Deprecated public static final AttributeKey SYSTEM_NETWORK_STATE = stringKey("system.network.state"); @@ -85,10 +84,11 @@ public final class SystemIncubatingAttributes { stringKey("system.processes.status"); // Enum definitions + /** * Values for {@link #SYSTEM_CPU_STATE} * - * @deprecated Replaced by {@code cpu.mode} + * @deprecated Replaced by {@code cpu.mode}. */ @Deprecated public static final class SystemCpuStateIncubatingValues { @@ -176,8 +176,7 @@ private SystemMemoryStateIncubatingValues() {} /** * Values for {@link #SYSTEM_NETWORK_STATE} * - * @deprecated Removed, report network connection state with {@code network.connection.state} - * attribute + * @deprecated Replaced by {@code network.connection.state}. */ @Deprecated public static final class SystemNetworkStateIncubatingValues { 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 bda48a1d..756a7569 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 @@ -68,6 +68,7 @@ public final class TelemetryIncubatingAttributes { stringKey("telemetry.sdk.version"); // Enum definitions + /** * Values for {@link #TELEMETRY_SDK_LANGUAGE}. * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TestIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TestIncubatingAttributes.java index 7aee5745..1410f567 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TestIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TestIncubatingAttributes.java @@ -33,6 +33,7 @@ public final class TestIncubatingAttributes { stringKey("test.suite.run.status"); // Enum definitions + /** Values for {@link #TEST_CASE_RESULT_STATUS}. */ public static final class TestCaseResultStatusIncubatingValues { /** pass */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java index b66f4d21..e6f9ef19 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java @@ -192,6 +192,7 @@ public final class TlsIncubatingAttributes { public static final AttributeKey TLS_SERVER_SUBJECT = stringKey("tls.server.subject"); // Enum definitions + /** Values for {@link #TLS_PROTOCOL_NAME}. */ public static final class TlsProtocolNameIncubatingValues { /** ssl. */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java index 37fda492..aa21c7cd 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java @@ -86,6 +86,7 @@ public final class UserAgentIncubatingAttributes { public static final AttributeKey USER_AGENT_VERSION = stringKey("user_agent.version"); // Enum definitions + /** Values for {@link #USER_AGENT_SYNTHETIC_TYPE}. */ public static final class UserAgentSyntheticTypeIncubatingValues { /** Bot source. */ 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 d94f4102..edcab126 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 @@ -28,6 +28,7 @@ public final class V8jsIncubatingAttributes { public static final AttributeKey V8JS_HEAP_SPACE_NAME = stringKey("v8js.heap.space.name"); // Enum definitions + /** Values for {@link #V8JS_GC_TYPE}. */ public static final class V8jsGcTypeIncubatingValues { /** Major (Mark Sweep Compact). */ diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/VcsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/VcsIncubatingAttributes.java index 2bb73f1f..176ad4c4 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/VcsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/VcsIncubatingAttributes.java @@ -133,7 +133,7 @@ public final class VcsIncubatingAttributes { /** * Deprecated, use {@code vcs.change.id} instead. * - * @deprecated Deprecated, use {@code vcs.change.id} instead. + * @deprecated Replaced by {@code vcs.change.id}. */ @Deprecated public static final AttributeKey VCS_REPOSITORY_CHANGE_ID = @@ -142,7 +142,7 @@ public final class VcsIncubatingAttributes { /** * Deprecated, use {@code vcs.change.title} instead. * - * @deprecated Deprecated, use {@code vcs.change.title} instead. + * @deprecated Replaced by {@code vcs.change.title}. */ @Deprecated public static final AttributeKey VCS_REPOSITORY_CHANGE_TITLE = @@ -162,7 +162,7 @@ public final class VcsIncubatingAttributes { /** * Deprecated, use {@code vcs.ref.head.name} instead. * - * @deprecated Deprecated, use {@code vcs.ref.head.name} instead. + * @deprecated Replaced by {@code vcs.ref.head.name}. */ @Deprecated public static final AttributeKey VCS_REPOSITORY_REF_NAME = @@ -171,7 +171,7 @@ public final class VcsIncubatingAttributes { /** * Deprecated, use {@code vcs.ref.head.revision} instead. * - * @deprecated Deprecated, use {@code vcs.ref.head.revision} instead. + * @deprecated Replaced by {@code vcs.ref.head.revision}. */ @Deprecated public static final AttributeKey VCS_REPOSITORY_REF_REVISION = @@ -180,7 +180,7 @@ public final class VcsIncubatingAttributes { /** * Deprecated, use {@code vcs.ref.head.type} instead. * - * @deprecated Deprecated, use {@code vcs.ref.head.type} instead. + * @deprecated Replaced by {@code vcs.ref.head.type}. */ @Deprecated public static final AttributeKey VCS_REPOSITORY_REF_TYPE = @@ -205,6 +205,7 @@ public final class VcsIncubatingAttributes { stringKey("vcs.revision_delta.direction"); // Enum definitions + /** Values for {@link #VCS_CHANGE_STATE}. */ public static final class VcsChangeStateIncubatingValues { /** @@ -253,9 +254,12 @@ public static final class VcsProviderNameIncubatingValues { /** GitLab */ public static final String GITLAB = "gitlab"; - /** Gitea */ + /** Deprecated, use {@code gitea} instead. */ public static final String GITTEA = "gittea"; + /** Gitea */ + public static final String GITEA = "gitea"; + /** Bitbucket */ public static final String BITBUCKET = "bitbucket"; @@ -316,7 +320,7 @@ private VcsRefTypeIncubatingValues() {} /** * Values for {@link #VCS_REPOSITORY_REF_TYPE} * - * @deprecated Deprecated, use {@code vcs.ref.head.type} instead. + * @deprecated Replaced by {@code vcs.ref.head.type}. */ @Deprecated public static final class VcsRepositoryRefTypeIncubatingValues { diff --git a/semconv/src/main/java/io/opentelemetry/semconv/CodeAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/CodeAttributes.java new file mode 100644 index 00000000..d32b7177 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/CodeAttributes.java @@ -0,0 +1,82 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.longKey; +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 CodeAttributes { + /** + * The column number in {@code code.file.path} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on + * the Profile signal since the data is already captured in 'message Line'. This constraint is + * imposed to prevent redundancy and maintain data integrity. + */ + public static final AttributeKey CODE_COLUMN_NUMBER = longKey("code.column.number"); + + /** + * The source code file name that identifies the code unit as uniquely as possible (preferably an + * absolute file path). This attribute MUST NOT be used on the Profile signal since the data is + * already captured in 'message Function'. This constraint is imposed to prevent redundancy and + * maintain data integrity. + */ + public static final AttributeKey CODE_FILE_PATH = stringKey("code.file.path"); + + /** + * The method or function fully-qualified name without arguments. The value should fit the natural + * representation of the language runtime, which is also likely the same used within {@code + * code.stacktrace} attribute value. This attribute MUST NOT be used on the Profile signal since + * the data is already captured in 'message Function'. This constraint is imposed to prevent + * redundancy and maintain data integrity. + * + *

    Notes: + * + *

    Values and format depends on each language runtime, thus it is impossible to provide an + * exhaustive list of examples. The values are usually the same (or prefixes of) the ones found in + * native stack trace representation stored in {@code code.stacktrace} without information on + * arguments. + * + *

    Examples: + * + *

      + *
    • Java method: {@code com.example.MyHttpService.serveRequest} + *
    • Java anonymous class method: {@code com.mycompany.Main$1.myMethod} + *
    • Java lambda method: {@code com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod} + *
    • PHP function: {@code GuzzleHttp\Client::transfer} + *
    • Go function: {@code github.com/my/repo/pkg.foo.func5} + *
    • Elixir: {@code OpenTelemetry.Ctx.new} + *
    • Erlang: {@code opentelemetry_ctx:new} + *
    • Rust: {@code playground::my_module::my_cool_func} + *
    • C function: {@code fopen} + *
    + */ + public static final AttributeKey CODE_FUNCTION_NAME = stringKey("code.function.name"); + + /** + * The line number in {@code code.file.path} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on + * the Profile signal since the data is already captured in 'message Line'. This constraint is + * imposed to prevent redundancy and maintain data integrity. + */ + public static final AttributeKey CODE_LINE_NUMBER = longKey("code.line.number"); + + /** + * A stacktrace as a string in the natural representation for the language runtime. The + * representation is identical to {@code + * exception.stacktrace}. This attribute MUST NOT be used on the Profile signal since the data + * is already captured in 'message Location'. This constraint is imposed to prevent redundancy and + * maintain data integrity. + */ + public static final AttributeKey CODE_STACKTRACE = stringKey("code.stacktrace"); + + private CodeAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java new file mode 100644 index 00000000..e90afcc9 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/DbAttributes.java @@ -0,0 +1,170 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.longKey; +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 DbAttributes { + /** + * The name of a collection (table, container) within the database. + * + *

    Notes: + * + *

    It is RECOMMENDED to capture the value as provided by the application without attempting to + * do any case normalization. + * + *

    The collection name SHOULD NOT be extracted from {@code db.query.text}, when the database + * system supports query text with multiple collections in non-batch operations. + * + *

    For batch operations, if the individual operations are known to have the same collection + * name then that collection name SHOULD be used. + */ + public static final AttributeKey DB_COLLECTION_NAME = stringKey("db.collection.name"); + + /** + * The name of the database, fully qualified within the server address and port. + * + *

    Notes: + * + *

    If a database system has multiple namespace components, they SHOULD be concatenated from the + * most general to the most specific namespace component, using {@code |} as a separator between + * the components. Any missing components (and their associated separators) SHOULD be omitted. + * Semantic conventions for individual database systems SHOULD document what {@code db.namespace} + * means in the context of that system. It is RECOMMENDED to capture the value as provided by the + * application without attempting to do any case normalization. + */ + public static final AttributeKey DB_NAMESPACE = stringKey("db.namespace"); + + /** + * The number of queries included in a batch operation. + * + *

    Notes: + * + *

    Operations are only considered batches when they contain two or more operations, and so + * {@code db.operation.batch.size} SHOULD never be {@code 1}. + */ + public static final AttributeKey DB_OPERATION_BATCH_SIZE = + longKey("db.operation.batch.size"); + + /** + * The name of the operation or command being executed. + * + *

    Notes: + * + *

    It is RECOMMENDED to capture the value as provided by the application without attempting to + * do any case normalization. + * + *

    The operation name SHOULD NOT be extracted from {@code db.query.text}, when the database + * system supports query text with multiple operations in non-batch operations. + * + *

    If spaces can occur in the operation name, multiple consecutive spaces SHOULD be normalized + * to a single space. + * + *

    For batch operations, if the individual operations are known to have the same operation name + * then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code + * db.operation.name} SHOULD be {@code BATCH} or some other database system specific term if more + * applicable. + */ + public static final AttributeKey DB_OPERATION_NAME = stringKey("db.operation.name"); + + /** + * Low cardinality summary of a database query. + * + *

    Notes: + * + *

    The query summary describes a class of database queries and is useful as a grouping key, + * especially when analyzing telemetry for database calls involving complex queries. + * + *

    Summary may be available to the instrumentation through instrumentation hooks or other + * means. If it is not available, instrumentations that support query parsing SHOULD generate a + * summary following Generating query + * summary section. + */ + public static final AttributeKey DB_QUERY_SUMMARY = stringKey("db.query.summary"); + + /** + * The database query being executed. + * + *

    Notes: + * + *

    For sanitization see Sanitization of {@code + * db.query.text}. For batch operations, if the individual operations are known to have the + * same query text then that query text SHOULD be used, otherwise all of the individual query + * texts SHOULD be concatenated with separator {@code ; } or some other database system specific + * separator if more applicable. Parameterized query text SHOULD NOT be sanitized. Even though + * parameterized query text can potentially have sensitive data, by using a parameterized query + * the user is giving a strong signal that any sensitive data will be passed as parameter values, + * and the benefit to observability of capturing the static part of the query text by default + * outweighs the risk. + */ + public static final AttributeKey DB_QUERY_TEXT = stringKey("db.query.text"); + + /** + * Database response status code. + * + *

    Notes: + * + *

    The status code returned by the database. Usually it represents an error code, but may also + * represent partial success, warning, or differentiate between various types of successful + * outcomes. Semantic conventions for individual database systems SHOULD document what {@code + * db.response.status_code} means in the context of that system. + */ + public static final AttributeKey DB_RESPONSE_STATUS_CODE = + stringKey("db.response.status_code"); + + /** + * The name of a stored procedure within the database. + * + *

    Notes: + * + *

    It is RECOMMENDED to capture the value as provided by the application without attempting to + * do any case normalization. + * + *

    For batch operations, if the individual operations are known to have the same stored + * procedure name then that stored procedure name SHOULD be used. + */ + public static final AttributeKey DB_STORED_PROCEDURE_NAME = + stringKey("db.stored_procedure.name"); + + /** + * The database management system (DBMS) product as identified by the client instrumentation. + * + *

    Notes: + * + *

    The actual DBMS may differ from the one identified by the client. For example, when using + * PostgreSQL client libraries to connect to a CockroachDB, the {@code db.system.name} is set to + * {@code postgresql} based on the instrumentation's best knowledge. + */ + public static final AttributeKey DB_SYSTEM_NAME = stringKey("db.system.name"); + + // Enum definition + /** Values for {@link #DB_SYSTEM_NAME}. */ + public static final class DbSystemNameValues { + /** MariaDB */ + public static final String MARIADB = "mariadb"; + + /** Microsoft SQL Server */ + public static final String MICROSOFT_SQL_SERVER = "microsoft.sql_server"; + + /** MySQL */ + public static final String MYSQL = "mysql"; + + /** PostgreSQL */ + public static final String POSTGRESQL = "postgresql"; + + private DbSystemNameValues() {} + } + + private DbAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java index 1296c598..0aeec898 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java @@ -24,11 +24,25 @@ public final class HttpAttributes { * *

    Instrumentations SHOULD require an explicit configuration of which headers are to be * captured. Including all request headers can be a security risk - explicit configuration helps - * avoid leaking sensitive information. The {@code User-Agent} header is already captured in the - * {@code user_agent.original} attribute. Users MAY explicitly configure instrumentations to - * capture them even though it is not recommended. The attribute value MUST consist of either - * multiple header values as an array of strings or a single-item array containing a possibly - * comma-concatenated string, depending on the way the HTTP library provides access to headers. + * avoid leaking sensitive information. + * + *

    The {@code User-Agent} header is already captured in the {@code user_agent.original} + * attribute. Users MAY explicitly configure instrumentations to capture them even though it is + * not recommended. + * + *

    The attribute value MUST consist of either multiple header values as an array of strings or + * a single-item array containing a possibly comma-concatenated string, depending on the way the + * HTTP library provides access to headers. + * + *

    Examples: + * + *

      + *
    • A header {@code Content-Type: application/json} SHOULD be recorded as the {@code + * http.request.header.content-type} attribute with value {@code ["application/json"]}. + *
    • A header {@code X-Forwarded-For: 1.2.3.4, 1.2.3.5} SHOULD be recorded as the {@code + * http.request.header.x-forwarded-for} attribute with value {@code ["1.2.3.4", "1.2.3.5"]} + * or {@code ["1.2.3.4, 1.2.3.5"]} depending on the HTTP library. + *
    */ public static final AttributeKeyTemplate> HTTP_REQUEST_HEADER = stringArrayKeyTemplate("http.request.header"); @@ -85,10 +99,24 @@ public final class HttpAttributes { * *

    Instrumentations SHOULD require an explicit configuration of which headers are to be * captured. Including all response headers can be a security risk - explicit configuration helps - * avoid leaking sensitive information. Users MAY explicitly configure instrumentations to capture - * them even though it is not recommended. The attribute value MUST consist of either multiple - * header values as an array of strings or a single-item array containing a possibly - * comma-concatenated string, depending on the way the HTTP library provides access to headers. + * avoid leaking sensitive information. + * + *

    Users MAY explicitly configure instrumentations to capture them even though it is not + * recommended. + * + *

    The attribute value MUST consist of either multiple header values as an array of strings or + * a single-item array containing a possibly comma-concatenated string, depending on the way the + * HTTP library provides access to headers. + * + *

    Examples: + * + *

      + *
    • A header {@code Content-Type: application/json} header SHOULD be recorded as the {@code + * http.request.response.content-type} attribute with value {@code ["application/json"]}. + *
    • A header {@code My-custom-header: abc, def} header SHOULD be recorded as the {@code + * http.response.header.my-custom-header} attribute with value {@code ["abc", "def"]} or + * {@code ["abc, def"]} depending on the HTTP library. + *
    */ public static final AttributeKeyTemplate> HTTP_RESPONSE_HEADER = stringArrayKeyTemplate("http.response.header"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index 7b86177f..3e9e114d 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -7,6 +7,8 @@ public final class SchemaUrls { + public static final String V1_34_0 = "https://opentelemetry.io/schemas/1.34.0"; + public static final String V1_33_0 = "https://opentelemetry.io/schemas/1.33.0"; public static final String V1_32_0 = "https://opentelemetry.io/schemas/1.32.0"; public static final String V1_31_0 = "https://opentelemetry.io/schemas/1.31.0"; public static final String V1_30_0 = "https://opentelemetry.io/schemas/1.30.0";