From 34ad318d71ddadbb88bf09e1136756f3c43add3b Mon Sep 17 00:00:00 2001 From: jack-berg Date: Fri, 9 Feb 2024 15:06:07 -0600 Subject: [PATCH] Generate classes by root namespace Co-authored-by: Liudmila Molkova --- build.gradle.kts | 30 +- buildscripts/checkstyle-suppressions.xml | 2 +- .../templates/SemanticAttributes.java.j2 | 60 +- .../AndroidIncubatingAttributes.java | 62 + .../incubating/AwsIncubatingAttributes.java | 358 +++ .../BrowserIncubatingAttributes.java | 80 + .../incubating/CloudIncubatingAttributes.java | 210 ++ .../CloudeventsIncubatingAttributes.java | 59 + .../incubating/CodeIncubatingAttributes.java | 51 + .../ContainerIncubatingAttributes.java | 110 + .../incubating/DbIncubatingAttributes.java | 482 ++++ .../DeploymentIncubatingAttributes.java | 27 + .../DestinationIncubatingAttributes.java | 38 + .../DeviceIncubatingAttributes.java | 79 + .../EnduserIncubatingAttributes.java | 43 + .../incubating/EventIncubatingAttributes.java | 47 + .../ExceptionIncubatingAttributes.java | 59 + .../incubating/FaasIncubatingAttributes.java | 225 ++ .../FeatureFlagIncubatingAttributes.java | 45 + .../incubating/GcpIncubatingAttributes.java | 56 + .../GraphqlIncubatingAttributes.java | 51 + .../HerokuIncubatingAttributes.java | 31 + .../incubating/HostIncubatingAttributes.java | 139 + .../incubating/HttpIncubatingAttributes.java | 37 + .../IncubatingResourceAttributes.java | 1148 -------- .../IncubatingSemanticAttributes.java | 2337 ----------------- .../incubating/IosIncubatingAttributes.java | 64 + .../incubating/JvmIncubatingAttributes.java | 115 + .../incubating/K8sIncubatingAttributes.java | 113 + .../incubating/LogIncubatingAttributes.java | 61 + .../MessageIncubatingAttributes.java | 54 + .../MessagingIncubatingAttributes.java | 295 +++ .../NetworkIncubatingAttributes.java | 128 + .../incubating/OciIncubatingAttributes.java | 37 + .../OpentracingIncubatingAttributes.java | 40 + .../incubating/OsIncubatingAttributes.java | 77 + .../incubating/OtelIncubatingAttributes.java | 48 + .../incubating/OtherIncubatingAttributes.java | 32 + .../incubating/PeerIncubatingAttributes.java | 27 + .../incubating/PoolIncubatingAttributes.java | 28 + .../ProcessIncubatingAttributes.java | 90 + .../incubating/RpcIncubatingAttributes.java | 276 ++ .../ServiceIncubatingAttributes.java | 77 + .../SessionIncubatingAttributes.java | 26 + .../SourceIncubatingAttributes.java | 38 + .../SystemIncubatingAttributes.java | 263 ++ .../TelemetryIncubatingAttributes.java | 102 + .../ThreadIncubatingAttributes.java | 27 + .../WebengineIncubatingAttributes.java | 30 + .../IncubatingAvailabilityTest.java | 65 +- .../semconv/ClientAttributes.java | 48 + .../semconv/ErrorAttributes.java | 51 + .../opentelemetry/semconv/HttpAttributes.java | 159 ++ .../semconv/NetworkAttributes.java | 113 + .../semconv/ResourceAttributes.java | 16 - .../semconv/SemanticAttributes.java | 386 --- .../semconv/ServerAttributes.java | 48 + .../opentelemetry/semconv/UrlAttributes.java | 63 + .../semconv/UserAgentAttributes.java | 26 + .../semconv/AvailabilityTest.java | 30 +- 60 files changed, 4961 insertions(+), 3958 deletions(-) create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudeventsIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DestinationIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HerokuIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java delete mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingResourceAttributes.java delete mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingSemanticAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PeerIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PoolIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SourceIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ThreadIncubatingAttributes.java create mode 100644 semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/WebengineIncubatingAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/ClientAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/NetworkAttributes.java delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java delete mode 100644 semconv/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/ServerAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java create mode 100644 semconv/src/main/java/io/opentelemetry/semconv/UserAgentAttributes.java diff --git a/build.gradle.kts b/build.gradle.kts index 01c3cd7..7417a4b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,9 @@ nexusPublishing { } // start - define tasks to download, unzip, and generate from opentelemetry/semantic-conventions -var generatorVersion = "0.23.0" +// TODO: build locally from https://github.com/open-telemetry/build-tools/tree/feature/codegen-by-namespace branch +// Blocked on release of this: https://github.com/open-telemetry/build-tools/pull/243#issuecomment-1936446767 +var generatorVersion = "codegen-by-namespace" val semanticConventionsRepoZip = "https://github.com/open-telemetry/semantic-conventions/archive/v$semanticConventionsVersion.zip" val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion" @@ -70,18 +72,16 @@ val unzipConfigurationSchema by tasks.registering(Copy::class) { into("$buildDir/semantic-conventions/") } -fun generateTask(taskName: String, resource: Boolean, incubating: Boolean) { +fun generateTask(taskName: String, incubating: Boolean) { tasks.register(taskName, Exec::class) { dependsOn(unzipConfigurationSchema) standardOutput = System.out executable = "docker" - val onlyArg = if (resource) "resource" else "span,event,attribute_group,scope,metric" - val classNamePrefix = if (incubating) "Incubating" else "" - var className = if (resource) "${classNamePrefix}ResourceAttributes" else "${classNamePrefix}SemanticAttributes" + var filter = if (incubating) "is_experimental" else "is_stable" + var classPrefix = if (incubating) "Incubating" else "" val outputDir = if (incubating) "semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/" else "semconv/src/main/java/io/opentelemetry/semconv/" - val stability = if (incubating) "StabilityLevel.EXPERIMENTAL" else "StabilityLevel.STABLE" val packageNameArg = if (incubating) "io.opentelemetry.semconv.incubating" else "io.opentelemetry.semconv" setArgs(listOf( @@ -90,21 +90,19 @@ fun generateTask(taskName: String, resource: Boolean, incubating: Boolean) { "-v", "$buildDir/semantic-conventions/model:/source", "-v", "$projectDir/buildscripts/templates:/templates", "-v", "$projectDir/$outputDir:/output", - "otel/semconvgen:$generatorVersion", - "--only", onlyArg, + "semconvgen:$generatorVersion", "--yaml-root", "/source", "code", "--template", "/templates/SemanticAttributes.java.j2", - "--output", "/output/$className.java", - "-Dclass=$className", - "-Dstability=${stability}", + "--output", "/output/${classPrefix}Attributes.java", + "--file-per-group", "root_namespace", + "-Dfilter=${filter}", + "-DclassPrefix=${classPrefix}", "-Dpkg=$packageNameArg")) } } -generateTask("generateStableSemanticAttributes", false, false) -generateTask("generateIncubatingSemanticAttributes", false, true) -generateTask("generateStableResourceAttributes", true, false) -generateTask("generateIncubatingResourceAttributes", true, true) +generateTask("generateStableSemanticAttributes", false) +generateTask("generateIncubatingSemanticAttributes", true) tasks.register("checkSchemaUrls") { val schemaUrlsClass = File("$projectDir/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java") @@ -123,8 +121,6 @@ tasks.register("checkSchemaUrls") { val generateSemanticConventions by tasks.registering { dependsOn(tasks.getByName("generateStableSemanticAttributes")) dependsOn(tasks.getByName("generateIncubatingSemanticAttributes")) - dependsOn(tasks.getByName("generateStableResourceAttributes")) - dependsOn(tasks.getByName("generateIncubatingResourceAttributes")) dependsOn(tasks.getByName("checkSchemaUrls")) } diff --git a/buildscripts/checkstyle-suppressions.xml b/buildscripts/checkstyle-suppressions.xml index 94f96cc..f6ca779 100644 --- a/buildscripts/checkstyle-suppressions.xml +++ b/buildscripts/checkstyle-suppressions.xml @@ -6,6 +6,6 @@ - + diff --git a/buildscripts/templates/SemanticAttributes.java.j2 b/buildscripts/templates/SemanticAttributes.java.j2 index c30ded6..b904651 100644 --- a/buildscripts/templates/SemanticAttributes.java.j2 +++ b/buildscripts/templates/SemanticAttributes.java.j2 @@ -1,9 +1,3 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - - {%- macro to_java_return_type(type) -%} {%- if type == "string" -%} String @@ -31,18 +25,18 @@ {%- elif type == "double" -%} doubleKey {%- else -%} - {{lowerFirst(type)}}Key + {{type | to_camelcase(False)}}Key {%- endif -%} {%- endmacro %} {%- macro print_value(type, value) -%} {{ "\"" if type == "String"}}{{value}}{{ "\"" if type == "String"}} {%- endmacro %} -{%- macro upFirst(text) -%} - {{ text[0]|upper}}{{text[1:] }} -{%- endmacro %} -{%- macro lowerFirst(text) -%} - {{ text[0]|lower}}{{text[1:] }} -{%- endmacro %} +{%- set filtered_attributes = attributes_and_templates | select(filter) | list %} +{%- if filtered_attributes | count > 0 %} +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ package {{pkg | trim}}; @@ -61,9 +55,9 @@ import java.util.List; // DO NOT EDIT, this is an Auto-generated file from buildscripts{{template}} @SuppressWarnings("unused") -public final class {{class}} { +public final class {{ root_namespace | to_camelcase(True) }}{{ classPrefix }}Attributes { + {%- for attribute in filtered_attributes %} - {%- for attribute in attributes if attribute.is_local and not attribute.ref and (attribute.stability | string()) == stability %} /** * {{attribute.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}} {%- if attribute.note %} @@ -74,42 +68,23 @@ public final class {{class}} { {%- endif %} - {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} + {%- if attribute | is_deprecated %} * * @deprecated {{attribute.brief | to_doc_brief}}. {%- endif %} */ - {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} + {%- if attribute | is_deprecated %} @Deprecated {%- endif %} - public static final AttributeKey<{{upFirst(to_java_return_type(attribute.attr_type | string))}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.attr_type | string)}}("{{attribute.fqn}}"); - {%- endfor %} - - {%- for attribute_template in attribute_templates if attribute_template.is_local and not attribute_template.ref and (attribute_template.stability | string()) == stability %} - - /** - * {{attribute_template.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}} - {%- if attribute_template.note %} - * - *

Notes: - {# NOTE: replace("> ", "") removes the following problematic characters which produce mangled javadoc: #} - {# https://github.com/open-telemetry/semantic-conventions/blob/c83a10a9c33c18a769835e959200d0e24dc708fe/model/resource/k8s.yaml#L34-L38 #} -

- - {%- endif %} - {%- if (attribute_template.stability | string()) == "StabilityLevel.DEPRECATED" %} - * - * @deprecated {{attribute_template.brief | to_doc_brief}}. - {%- endif %} - */ - {%- if (attribute_template.stability | string()) == "StabilityLevel.DEPRECATED" %} - @Deprecated + {%- if attribute | is_template %} + public static final AttributeKeyTemplate<{{to_java_return_type(attribute.instantiated_type | string) | first_up}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.instantiated_type | string)}}Template("{{attribute.fqn}}"); + {%- else %} + public static final AttributeKey<{{to_java_return_type(attribute.attr_type | string) | first_up}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.attr_type | string)}}("{{attribute.fqn}}"); {%- endif %} - public static final AttributeKeyTemplate<{{upFirst(to_java_return_type(attribute_template.instantiated_type | string))}}> {{attribute_template.fqn | to_const_name}} = {{to_java_key_type(attribute_template.instantiated_type | string)}}Template("{{attribute_template.fqn}}"); {%- endfor %} // Enum definitions - {%- for attribute in attributes if attribute.is_local and not attribute.ref and attribute.is_enum and (attribute.stability | string()) == stability%} + {%- for attribute in filtered_attributes if attribute.is_enum %} {%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %} {%- set type = to_java_return_type(attribute.attr_type.enum_type) %} public static final class {{class_name}} { @@ -124,5 +99,6 @@ public final class {{class}} { {%- endfor %} - private {{class}}() {} + private {{ root_namespace | to_camelcase(True) }}{{ classPrefix }}Attributes() {} } +{%- endif %} 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 new file mode 100644 index 0000000..397e2b6 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java @@ -0,0 +1,62 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class AndroidIncubatingAttributes { + + /** + * Uniquely identifies the framework API revision offered by a version ({@code os.version}) of the + * android operating system. More information can be found here. + */ + public static final AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); + + /** + * This attribute represents the state the application has transitioned into at the occurrence of + * the event. + * + *

Notes: + * + *

+ */ + public static final AttributeKey ANDROID_STATE = stringKey("android.state"); + + // Enum definitions + public static final class AndroidStateValues { + /** + * Any time before Activity.onResume() or, if the app has no Activity, Context.startService() + * has been called in the app for the first time. + */ + public static final String CREATED = "created"; + + /** + * Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has + * been called when the app was in the foreground state. + */ + public static final String BACKGROUND = "background"; + + /** + * Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has + * been called when the app was in either the created or background states. + */ + public static final String FOREGROUND = "foreground"; + + private AndroidStateValues() {} + } + + private AndroidIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..68421ff --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AwsIncubatingAttributes.java @@ -0,0 +1,358 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.doubleKey; +import static io.opentelemetry.api.common.AttributeKey.longKey; +import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class AwsIncubatingAttributes { + + /** 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"); + + /** The value of the {@code AttributesToGet} request parameter. */ + public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = + stringArrayKey("aws.dynamodb.attributes_to_get"); + + /** The value of the {@code ConsistentRead} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = + booleanKey("aws.dynamodb.consistent_read"); + + /** The JSON-serialized value of each item in the {@code ConsumedCapacity} response field. */ + public static final AttributeKey> AWS_DYNAMODB_CONSUMED_CAPACITY = + stringArrayKey("aws.dynamodb.consumed_capacity"); + + /** The value of the {@code Count} response parameter. */ + public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); + + /** The value of the {@code ExclusiveStartTableName} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_EXCLUSIVE_START_TABLE = + stringKey("aws.dynamodb.exclusive_start_table"); + + /** + * The JSON-serialized value of each item in the the {@code GlobalSecondaryIndexUpdates} request + * field. + */ + public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = + stringArrayKey("aws.dynamodb.global_secondary_index_updates"); + + /** The JSON-serialized value of each item of the {@code GlobalSecondaryIndexes} request field */ + public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = + stringArrayKey("aws.dynamodb.global_secondary_indexes"); + + /** The value of the {@code IndexName} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = + stringKey("aws.dynamodb.index_name"); + + /** The JSON-serialized value of the {@code ItemCollectionMetrics} response field. */ + public static final AttributeKey AWS_DYNAMODB_ITEM_COLLECTION_METRICS = + stringKey("aws.dynamodb.item_collection_metrics"); + + /** The value of the {@code Limit} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); + + /** The JSON-serialized value of each item of the {@code LocalSecondaryIndexes} request field. */ + public static final AttributeKey> AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = + stringArrayKey("aws.dynamodb.local_secondary_indexes"); + + /** The value of the {@code ProjectionExpression} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_PROJECTION = + stringKey("aws.dynamodb.projection"); + + /** The value of the {@code ProvisionedThroughput.ReadCapacityUnits} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = + doubleKey("aws.dynamodb.provisioned_read_capacity"); + + /** The value of the {@code ProvisionedThroughput.WriteCapacityUnits} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = + doubleKey("aws.dynamodb.provisioned_write_capacity"); + + /** The value of the {@code ScanIndexForward} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = + booleanKey("aws.dynamodb.scan_forward"); + + /** The value of the {@code ScannedCount} response parameter. */ + public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = + longKey("aws.dynamodb.scanned_count"); + + /** The value of the {@code Segment} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); + + /** The value of the {@code Select} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select"); + + /** The the number of items in the {@code TableNames} response parameter. */ + public static final AttributeKey AWS_DYNAMODB_TABLE_COUNT = + longKey("aws.dynamodb.table_count"); + + /** The keys in the {@code RequestItems} object field. */ + public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = + stringArrayKey("aws.dynamodb.table_names"); + + /** The value of the {@code TotalSegments} request parameter. */ + public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = + longKey("aws.dynamodb.total_segments"); + + /** + * The ARN of an ECS + * cluster. + */ + public static final AttributeKey AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); + + /** + * The Amazon Resource Name (ARN) of an ECS + * container instance. + */ + public static final AttributeKey AWS_ECS_CONTAINER_ARN = + stringKey("aws.ecs.container.arn"); + + /** + * The launch + * type for an ECS task. + */ + public static final AttributeKey AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype"); + + /** + * The ARN of an ECS + * task definition. + */ + public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); + + /** The task definition family this task definition is a member of. */ + public static final AttributeKey AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family"); + + /** The revision for this task definition. */ + public static final AttributeKey AWS_ECS_TASK_REVISION = + stringKey("aws.ecs.task.revision"); + + /** The ARN of an EKS cluster. */ + public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); + + /** + * 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} + * applicable). + * + *

Notes: + * + *

    + *
  • This may be different from {@code cloud.resource_id} if an alias is involved. + *
+ */ + public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = + stringKey("aws.lambda.invoked_arn"); + + /** + * The Amazon Resource Name(s) (ARN) of the AWS log group(s). + * + *

Notes: + * + *

+ */ + public static final AttributeKey> AWS_LOG_GROUP_ARNS = + stringArrayKey("aws.log.group.arns"); + + /** + * The name(s) of the AWS log group(s) an application is writing to. + * + *

Notes: + * + *

    + *
  • Multiple log groups must be supported for cases like multi-container applications, where + * a single application has sidecar containers, and each write to their own log group. + *
+ */ + public static final AttributeKey> AWS_LOG_GROUP_NAMES = + stringArrayKey("aws.log.group.names"); + + /** + * The ARN(s) of the AWS log stream(s). + * + *

Notes: + * + *

+ */ + public static final AttributeKey> AWS_LOG_STREAM_ARNS = + stringArrayKey("aws.log.stream.arns"); + + /** The name(s) of the AWS log stream(s) an application is writing to. */ + public static final AttributeKey> AWS_LOG_STREAM_NAMES = + stringArrayKey("aws.log.stream.names"); + + /** + * The AWS request ID as returned in the response headers {@code x-amz-request-id} or {@code + * x-amz-requestid}. + */ + public static final AttributeKey AWS_REQUEST_ID = stringKey("aws.request_id"); + + /** + * The S3 bucket name the request refers to. Corresponds to the {@code --bucket} parameter of the + * S3 API + * operations. + * + *

Notes: + * + *

    + *
  • The {@code bucket} attribute is applicable to all S3 operations that reference a bucket, + * i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 + * operations except {@code list-buckets}. + *
+ */ + public static final AttributeKey AWS_S3_BUCKET = stringKey("aws.s3.bucket"); + + /** + * The source object (in the form {@code bucket}/{@code key}) for the copy operation. + * + *

Notes: + * + *

+ */ + public static final AttributeKey AWS_S3_COPY_SOURCE = stringKey("aws.s3.copy_source"); + + /** + * The delete request container that specifies the objects to be deleted. + * + *

Notes: + * + *

+ */ + public static final AttributeKey AWS_S3_DELETE = stringKey("aws.s3.delete"); + + /** + * The S3 object key the request refers to. Corresponds to the {@code --key} parameter of the S3 API operations. + * + *

Notes: + * + *

+ */ + public static final AttributeKey AWS_S3_KEY = stringKey("aws.s3.key"); + + /** + * The part number of the part being uploaded in a multipart-upload operation. This is a positive + * integer between 1 and 10,000. + * + *

Notes: + * + *

+ */ + public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); + + /** + * Upload ID that identifies the multipart upload. + * + *

Notes: + * + *

+ */ + public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); + + // Enum definitions + public static final class AwsEcsLaunchtypeValues { + /** ec2. */ + public static final String EC2 = "ec2"; + + /** fargate. */ + public static final String FARGATE = "fargate"; + + private AwsEcsLaunchtypeValues() {} + } + + private AwsIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java new file mode 100644 index 0000000..cb7f735 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/BrowserIncubatingAttributes.java @@ -0,0 +1,80 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class BrowserIncubatingAttributes { + + /** + * Array of brand name and version separated by a space + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.brands}). + *
+ */ + public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); + + /** + * Preferred language of the user using the browser + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the Navigator API {@code navigator.language}. + *
+ */ + public static final AttributeKey BROWSER_LANGUAGE = stringKey("browser.language"); + + /** + * A boolean that is true if the browser is running on a mobile device + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.mobile}). If unavailable, this attribute SHOULD be left unset. + *
+ */ + public static final AttributeKey BROWSER_MOBILE = booleanKey("browser.mobile"); + + /** + * The platform on which the browser is running + * + *

Notes: + * + *

    + *
  • This value is intended to be taken from the UA client hints API ({@code + * navigator.userAgentData.platform}). If unavailable, the legacy {@code navigator.platform} + * API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the + * values to be consistent. The list of possible values is defined in the W3C User-Agent Client + * Hints specification. Note that some (but not all) of these values can overlap with + * values in the {@code os.type} and {@code os.name} attributes. + * However, for consistency, the values in the {@code browser.platform} attribute should + * capture the exact value that the user agent provides. + *
+ */ + public static final AttributeKey BROWSER_PLATFORM = stringKey("browser.platform"); + + // Enum definitions + + private BrowserIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..589d107 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java @@ -0,0 +1,210 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class CloudIncubatingAttributes { + + /** The cloud account ID the resource is assigned to. */ + public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); + + /** + * Cloud regions often have multiple, isolated locations known as zones to increase availability. + * Availability zone represents the zone where the resource is running. + * + *

Notes: + * + *

    + *
  • Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + *
+ */ + public static final AttributeKey CLOUD_AVAILABILITY_ZONE = + stringKey("cloud.availability_zone"); + + /** + * The cloud platform in use. + * + *

Notes: + * + *

    + *
  • The prefix of the service SHOULD match the one specified in {@code cloud.provider}. + *
+ */ + public static final AttributeKey CLOUD_PLATFORM = stringKey("cloud.platform"); + + /** Name of the cloud provider. */ + public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); + + /** + * The geographical region the resource is running. + * + *

Notes: + * + *

+ */ + public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); + + /** + * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on + * AWS, a fully + * qualified resource ID on Azure, a full resource + * name on GCP) + * + *

Notes: + * + *

    + *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so + * it may be necessary to set {@code cloud.resource_id} as a span attribute instead. + *
  • The exact value to use for {@code cloud.resource_id} depends on the cloud provider. The + * following well-known definitions MUST be used if you set this attribute and they apply: + *
  • AWS Lambda: The function ARN. + * Take care not to use the "invoked ARN" directly but replace any alias + * suffix with the resolved function version, as the same runtime instance may be + * invokable with multiple different aliases. + *
  • GCP: The URI of the resource + *
  • Azure: The Fully Qualified + * Resource ID of the invoked function, not the function app, having the form + * {@code + * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. + * This means that a span attribute MUST be used, as an Azure function app can host multiple + * functions that would usually share a TracerProvider. + *
+ */ + public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); + + // Enum definitions + public static final class CloudPlatformValues { + /** Alibaba Cloud Elastic Compute Service. */ + public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"; + + /** Alibaba Cloud Function Compute. */ + public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc"; + + /** Red Hat OpenShift on Alibaba Cloud. */ + public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"; + + /** AWS Elastic Compute Cloud. */ + public static final String AWS_EC2 = "aws_ec2"; + + /** AWS Elastic Container Service. */ + public static final String AWS_ECS = "aws_ecs"; + + /** AWS Elastic Kubernetes Service. */ + public static final String AWS_EKS = "aws_eks"; + + /** AWS Lambda. */ + public static final String AWS_LAMBDA = "aws_lambda"; + + /** AWS Elastic Beanstalk. */ + public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; + + /** AWS App Runner. */ + public static final String AWS_APP_RUNNER = "aws_app_runner"; + + /** Red Hat OpenShift on AWS (ROSA). */ + public static final String AWS_OPENSHIFT = "aws_openshift"; + + /** Azure Virtual Machines. */ + public static final String AZURE_VM = "azure_vm"; + + /** Azure Container Instances. */ + public static final String AZURE_CONTAINER_INSTANCES = "azure_container_instances"; + + /** Azure Kubernetes Service. */ + public static final String AZURE_AKS = "azure_aks"; + + /** Azure Functions. */ + public static final String AZURE_FUNCTIONS = "azure_functions"; + + /** Azure App Service. */ + public static final String AZURE_APP_SERVICE = "azure_app_service"; + + /** Azure Red Hat OpenShift. */ + public static final String AZURE_OPENSHIFT = "azure_openshift"; + + /** Google Bare Metal Solution (BMS). */ + public static final String GCP_BARE_METAL_SOLUTION = "gcp_bare_metal_solution"; + + /** Google Cloud Compute Engine (GCE). */ + public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine"; + + /** Google Cloud Run. */ + public static final String GCP_CLOUD_RUN = "gcp_cloud_run"; + + /** Google Cloud Kubernetes Engine (GKE). */ + public static final String GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"; + + /** Google Cloud Functions (GCF). */ + public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"; + + /** Google Cloud App Engine (GAE). */ + public static final String GCP_APP_ENGINE = "gcp_app_engine"; + + /** Red Hat OpenShift on Google Cloud. */ + public static final String GCP_OPENSHIFT = "gcp_openshift"; + + /** Red Hat OpenShift on IBM Cloud. */ + public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"; + + /** Tencent Cloud Cloud Virtual Machine (CVM). */ + public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm"; + + /** Tencent Cloud Elastic Kubernetes Service (EKS). */ + public static final String TENCENT_CLOUD_EKS = "tencent_cloud_eks"; + + /** Tencent Cloud Serverless Cloud Function (SCF). */ + public static final String TENCENT_CLOUD_SCF = "tencent_cloud_scf"; + + private CloudPlatformValues() {} + } + + public static final class CloudProviderValues { + /** Alibaba Cloud. */ + public static final String ALIBABA_CLOUD = "alibaba_cloud"; + + /** Amazon Web Services. */ + public static final String AWS = "aws"; + + /** Microsoft Azure. */ + public static final String AZURE = "azure"; + + /** Google Cloud Platform. */ + public static final String GCP = "gcp"; + + /** Heroku Platform as a Service. */ + public static final String HEROKU = "heroku"; + + /** IBM Cloud. */ + public static final String IBM_CLOUD = "ibm_cloud"; + + /** Tencent Cloud. */ + public static final String TENCENT_CLOUD = "tencent_cloud"; + + private CloudProviderValues() {} + } + + private CloudIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudeventsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudeventsIncubatingAttributes.java new file mode 100644 index 0000000..1b1bab0 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudeventsIncubatingAttributes.java @@ -0,0 +1,59 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class CloudeventsIncubatingAttributes { + + /** + * The event_id + * uniquely identifies the event. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); + + /** + * The source + * identifies the context in which an event happened. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = + stringKey("cloudevents.event_source"); + + /** + * The version + * of the CloudEvents specification which the event uses. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = + stringKey("cloudevents.event_spec_version"); + + /** + * The subject + * of the event in the context of the event producer (identified by source). + */ + public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = + stringKey("cloudevents.event_subject"); + + /** + * The event_type + * contains a value describing the type of event related to the originating occurrence. + */ + public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = + stringKey("cloudevents.event_type"); + + // Enum definitions + + private CloudeventsIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..5e8c392 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class CodeIncubatingAttributes { + + /** + * The column number in {@code code.filepath} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function}. + */ + public static final AttributeKey CODE_COLUMN = longKey("code.column"); + + /** + * The source code file name that identifies the code unit as uniquely as possible (preferably an + * absolute file path). + */ + public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); + + /** + * The method or function name, or equivalent (usually rightmost part of the code unit's name). + */ + public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); + + /** + * The line number in {@code code.filepath} best representing the operation. It SHOULD point + * within the code unit named in {@code code.function}. + */ + public static final AttributeKey CODE_LINENO = longKey("code.lineno"); + + /** + * The "namespace" within which {@code code.function} is defined. Usually the qualified + * class or module name, such that {@code code.namespace} + some separator + {@code code.function} + * form a unique identifier for the code unit. + */ + public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); + + // Enum definitions + + private CodeIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..bdec60e --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java @@ -0,0 +1,110 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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 +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ContainerIncubatingAttributes { + + /** + * The command used to run the container (i.e. the command name). + * + *

Notes: + * + *

    + *
  • If using embedded credentials or sensitive data, it is recommended to remove them to + * prevent potential leakage. + *
+ */ + public static final AttributeKey CONTAINER_COMMAND = stringKey("container.command"); + + /** + * All the command arguments (including the command/executable itself) run by the container. [2] + */ + public static final AttributeKey> CONTAINER_COMMAND_ARGS = + stringArrayKey("container.command_args"); + + /** The full command run by the container as a single string representing the full command. [2] */ + public static final AttributeKey CONTAINER_COMMAND_LINE = + stringKey("container.command_line"); + + /** + * Container ID. Usually a UUID, as for example used to identify Docker + * containers. The UUID might be abbreviated. + */ + public static final AttributeKey CONTAINER_ID = stringKey("container.id"); + + /** + * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. + * + *

Notes: + * + *

    + *
  • Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the + * {@code Image} field from the Docker container inspect API + * endpoint. K8s defines a link to the container registry repository with digest {@code + * "imageID": "registry.azurecr.io + * /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}. + * The ID is assinged by the container runtime and can vary in different environments. + * Consider using {@code oci.manifest.digest} if it is important to identify the same image + * in different environments/runtimes. + *
+ */ + public static final AttributeKey CONTAINER_IMAGE_ID = stringKey("container.image.id"); + + /** Name of the image the container was built on. */ + public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); + + /** + * Repo digests of the container image as provided by the container runtime. + * + *

Notes: + * + *

    + *
  • Docker + * and CRI + * report those under the {@code RepoDigests} field. + *
+ */ + public static final AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS = + stringArrayKey("container.image.repo_digests"); + + /** + * Container image tags. An example can be found in Docker Image + * Inspect. Should be only the {@code } section of the full name for example from {@code + * registry.example.com/my-org/my-image:}. + */ + public static final AttributeKey> CONTAINER_IMAGE_TAGS = + stringArrayKey("container.image.tags"); + + /** Container labels, {@code } being the label name, the value being the label value. */ + public static final AttributeKeyTemplate CONTAINER_LABELS = + stringKeyTemplate("container.labels"); + + /** Container name used by container runtime. */ + public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); + + /** The container runtime managing this container. */ + public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); + + // Enum definitions + + private ContainerIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..da7a569 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java @@ -0,0 +1,482 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +import static io.opentelemetry.api.common.AttributeKey.doubleKey; +import static io.opentelemetry.api.common.AttributeKey.longKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate; + +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.semconv.AttributeKeyTemplate; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class DbIncubatingAttributes { + + /** + * The consistency level of the query. Based on consistency values from CQL. + */ + public static final AttributeKey DB_CASSANDRA_CONSISTENCY_LEVEL = + stringKey("db.cassandra.consistency_level"); + + /** The data center of the coordinating node for a query. */ + public static final AttributeKey DB_CASSANDRA_COORDINATOR_DC = + stringKey("db.cassandra.coordinator.dc"); + + /** The ID of the coordinating node for a query. */ + public static final AttributeKey DB_CASSANDRA_COORDINATOR_ID = + stringKey("db.cassandra.coordinator.id"); + + /** Whether or not the query is idempotent. */ + public static final AttributeKey DB_CASSANDRA_IDEMPOTENCE = + booleanKey("db.cassandra.idempotence"); + + /** The fetch size used for paging, i.e. how many rows will be returned at once. */ + public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); + + /** + * The number of times a query was speculatively executed. Not set or {@code 0} if the query was + * not executed speculatively. + */ + public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = + longKey("db.cassandra.speculative_execution_count"); + + /** + * The name of the primary table that the operation is acting upon, including the keyspace name + * (if applicable). + * + *

Notes: + * + *

    + *
  • This mirrors the db.sql.table attribute but references cassandra rather than sql. It is + * not recommended to attempt any client-side parsing of {@code db.statement} just to get + * this property, but it should be set if it is provided by the library being instrumented. + * If the operation is acting upon an anonymous table, or more than one table, this value + * MUST NOT be set. + *
+ */ + public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); + + /** + * The connection string used to connect to the database. It is recommended to remove embedded + * credentials. + */ + public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); + + /** Unique Cosmos client instance id. */ + public static final AttributeKey DB_COSMOSDB_CLIENT_ID = + stringKey("db.cosmosdb.client_id"); + + /** Cosmos client connection mode. */ + public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = + stringKey("db.cosmosdb.connection_mode"); + + /** Cosmos DB container name. */ + public static final AttributeKey DB_COSMOSDB_CONTAINER = + stringKey("db.cosmosdb.container"); + + /** CosmosDB Operation Type. */ + public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = + stringKey("db.cosmosdb.operation_type"); + + /** RU consumed for that operation */ + public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = + doubleKey("db.cosmosdb.request_charge"); + + /** Request payload size in bytes */ + public static final AttributeKey DB_COSMOSDB_REQUEST_CONTENT_LENGTH = + longKey("db.cosmosdb.request_content_length"); + + /** Cosmos DB status code. */ + public static final AttributeKey DB_COSMOSDB_STATUS_CODE = + longKey("db.cosmosdb.status_code"); + + /** Cosmos DB sub status code. */ + public static final AttributeKey DB_COSMOSDB_SUB_STATUS_CODE = + longKey("db.cosmosdb.sub_status_code"); + + /** Represents the identifier of an Elasticsearch cluster. */ + public static final AttributeKey DB_ELASTICSEARCH_CLUSTER_NAME = + stringKey("db.elasticsearch.cluster.name"); + + /** + * Represents the human-readable identifier of the node/instance to which a request was routed. + */ + public static final AttributeKey DB_ELASTICSEARCH_NODE_NAME = + stringKey("db.elasticsearch.node.name"); + + /** + * A dynamic value in the url path. + * + *

Notes: + * + *

    + *
  • Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span + * attributes in the format {@code db.elasticsearch.path_parts.}, where {@code } + * is the url path part name. The implementation SHOULD reference the elasticsearch + * schema in order to map the path part values to their names. + *
+ */ + public static final AttributeKeyTemplate DB_ELASTICSEARCH_PATH_PARTS = + stringKeyTemplate("db.elasticsearch.path_parts"); + + /** + * The fully-qualified class name of the Java Database Connectivity + * (JDBC) driver used to connect. + */ + public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = + stringKey("db.jdbc.driver_classname"); + + /** The collection being accessed within the database stated in {@code db.name}. */ + public static final AttributeKey DB_MONGODB_COLLECTION = + stringKey("db.mongodb.collection"); + + /** + * The Microsoft SQL Server instance + * name connecting to. This name is used to determine the port of a named instance. + * + *

Notes: + * + *

    + *
  • If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required + * (but still recommended if non-standard). + *
+ */ + public static final AttributeKey DB_MSSQL_INSTANCE_NAME = + stringKey("db.mssql.instance_name"); + + /** + * This attribute is used to report the name of the database being accessed. For commands that + * switch the database, this should be set to the target database (even if the command fails). + * + *

Notes: + * + *

    + *
  • In some SQL databases, the database name to be used is called "schema name". In + * case there are multiple layers that could be considered for database name (e.g. Oracle + * instance name and schema name), the database name to be used is the more specific layer + * (e.g. Oracle schema name). + *
+ */ + public static final AttributeKey DB_NAME = stringKey("db.name"); + + /** + * The name of the operation being executed, e.g. the MongoDB command + * name such as {@code findAndModify}, or the SQL keyword. + * + *

Notes: + * + *

    + *
  • When setting this to an SQL keyword, it is not recommended to attempt any client-side + * parsing of {@code db.statement} just to get this property, but it should be set if the + * operation name is provided by the library being instrumented. If the SQL statement has an + * ambiguous operation, or performs more than one operation, this value may be omitted. + *
+ */ + public static final AttributeKey DB_OPERATION = stringKey("db.operation"); + + /** + * The index of the database being accessed as used in the {@code SELECT} command, provided as an integer. To + * be used instead of the generic {@code db.name} attribute. + */ + public static final AttributeKey DB_REDIS_DATABASE_INDEX = + longKey("db.redis.database_index"); + + /** + * The name of the primary table that the operation is acting upon, including the database name + * (if applicable). + * + *

Notes: + * + *

    + *
  • It is not recommended to attempt any client-side parsing of {@code db.statement} just to + * get this property, but it should be set if it is provided by the library being + * instrumented. If the operation is acting upon an anonymous table, or more than one table, + * this value MUST NOT be set. + *
+ */ + public static final AttributeKey DB_SQL_TABLE = stringKey("db.sql.table"); + + /** The database statement being executed. */ + public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); + + /** + * An identifier for the database management system (DBMS) product being used. See below for a + * list of well-known identifiers. + */ + public static final AttributeKey DB_SYSTEM = stringKey("db.system"); + + /** Username for accessing the database. */ + public static final AttributeKey DB_USER = stringKey("db.user"); + + // Enum definitions + public static final class DbCassandraConsistencyLevelValues { + /** all. */ + public static final String ALL = "all"; + + /** each_quorum. */ + public static final String EACH_QUORUM = "each_quorum"; + + /** quorum. */ + public static final String QUORUM = "quorum"; + + /** local_quorum. */ + public static final String LOCAL_QUORUM = "local_quorum"; + + /** one. */ + public static final String ONE = "one"; + + /** two. */ + public static final String TWO = "two"; + + /** three. */ + public static final String THREE = "three"; + + /** local_one. */ + public static final String LOCAL_ONE = "local_one"; + + /** any. */ + public static final String ANY = "any"; + + /** serial. */ + public static final String SERIAL = "serial"; + + /** local_serial. */ + public static final String LOCAL_SERIAL = "local_serial"; + + private DbCassandraConsistencyLevelValues() {} + } + + public static final class DbCosmosdbConnectionModeValues { + /** Gateway (HTTP) connections mode. */ + public static final String GATEWAY = "gateway"; + + /** Direct connection. */ + public static final String DIRECT = "direct"; + + private DbCosmosdbConnectionModeValues() {} + } + + public static final class DbCosmosdbOperationTypeValues { + /** invalid. */ + public static final String INVALID = "Invalid"; + + /** create. */ + public static final String CREATE = "Create"; + + /** patch. */ + public static final String PATCH = "Patch"; + + /** read. */ + public static final String READ = "Read"; + + /** read_feed. */ + public static final String READ_FEED = "ReadFeed"; + + /** delete. */ + public static final String DELETE = "Delete"; + + /** replace. */ + public static final String REPLACE = "Replace"; + + /** execute. */ + public static final String EXECUTE = "Execute"; + + /** query. */ + public static final String QUERY = "Query"; + + /** head. */ + public static final String HEAD = "Head"; + + /** head_feed. */ + public static final String HEAD_FEED = "HeadFeed"; + + /** upsert. */ + public static final String UPSERT = "Upsert"; + + /** batch. */ + public static final String BATCH = "Batch"; + + /** query_plan. */ + public static final String QUERY_PLAN = "QueryPlan"; + + /** execute_javascript. */ + public static final String EXECUTE_JAVASCRIPT = "ExecuteJavaScript"; + + private DbCosmosdbOperationTypeValues() {} + } + + public static final class DbSystemValues { + /** Some other SQL database. Fallback only. See notes. */ + public static final String OTHER_SQL = "other_sql"; + + /** Microsoft SQL Server. */ + public static final String MSSQL = "mssql"; + + /** Microsoft SQL Server Compact. */ + public static final String MSSQLCOMPACT = "mssqlcompact"; + + /** MySQL. */ + public static final String MYSQL = "mysql"; + + /** Oracle Database. */ + public static final String ORACLE = "oracle"; + + /** IBM Db2. */ + public static final String DB2 = "db2"; + + /** PostgreSQL. */ + public static final String POSTGRESQL = "postgresql"; + + /** Amazon Redshift. */ + public static final String REDSHIFT = "redshift"; + + /** Apache Hive. */ + public static final String HIVE = "hive"; + + /** Cloudscape. */ + public static final String CLOUDSCAPE = "cloudscape"; + + /** HyperSQL DataBase. */ + public static final String HSQLDB = "hsqldb"; + + /** Progress Database. */ + public static final String PROGRESS = "progress"; + + /** SAP MaxDB. */ + public static final String MAXDB = "maxdb"; + + /** SAP HANA. */ + public static final String HANADB = "hanadb"; + + /** Ingres. */ + public static final String INGRES = "ingres"; + + /** FirstSQL. */ + public static final String FIRSTSQL = "firstsql"; + + /** EnterpriseDB. */ + public static final String EDB = "edb"; + + /** InterSystems Caché. */ + public static final String CACHE = "cache"; + + /** Adabas (Adaptable Database System). */ + public static final String ADABAS = "adabas"; + + /** Firebird. */ + public static final String FIREBIRD = "firebird"; + + /** Apache Derby. */ + public static final String DERBY = "derby"; + + /** FileMaker. */ + public static final String FILEMAKER = "filemaker"; + + /** Informix. */ + public static final String INFORMIX = "informix"; + + /** InstantDB. */ + public static final String INSTANTDB = "instantdb"; + + /** InterBase. */ + public static final String INTERBASE = "interbase"; + + /** MariaDB. */ + public static final String MARIADB = "mariadb"; + + /** Netezza. */ + public static final String NETEZZA = "netezza"; + + /** Pervasive PSQL. */ + public static final String PERVASIVE = "pervasive"; + + /** PointBase. */ + public static final String POINTBASE = "pointbase"; + + /** SQLite. */ + public static final String SQLITE = "sqlite"; + + /** Sybase. */ + public static final String SYBASE = "sybase"; + + /** Teradata. */ + public static final String TERADATA = "teradata"; + + /** Vertica. */ + public static final String VERTICA = "vertica"; + + /** H2. */ + public static final String H2 = "h2"; + + /** ColdFusion IMQ. */ + public static final String COLDFUSION = "coldfusion"; + + /** Apache Cassandra. */ + public static final String CASSANDRA = "cassandra"; + + /** Apache HBase. */ + public static final String HBASE = "hbase"; + + /** MongoDB. */ + public static final String MONGODB = "mongodb"; + + /** Redis. */ + public static final String REDIS = "redis"; + + /** Couchbase. */ + public static final String COUCHBASE = "couchbase"; + + /** CouchDB. */ + public static final String COUCHDB = "couchdb"; + + /** Microsoft Azure Cosmos DB. */ + public static final String COSMOSDB = "cosmosdb"; + + /** Amazon DynamoDB. */ + public static final String DYNAMODB = "dynamodb"; + + /** Neo4j. */ + public static final String NEO4J = "neo4j"; + + /** Apache Geode. */ + public static final String GEODE = "geode"; + + /** Elasticsearch. */ + public static final String ELASTICSEARCH = "elasticsearch"; + + /** Memcached. */ + public static final String MEMCACHED = "memcached"; + + /** CockroachDB. */ + public static final String COCKROACHDB = "cockroachdb"; + + /** OpenSearch. */ + public static final String OPENSEARCH = "opensearch"; + + /** ClickHouse. */ + public static final String CLICKHOUSE = "clickhouse"; + + /** Cloud Spanner. */ + public static final String SPANNER = "spanner"; + + /** Trino. */ + public static final String TRINO = "trino"; + + private DbSystemValues() {} + } + + private DbIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..999b4e4 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeploymentIncubatingAttributes.java @@ -0,0 +1,27 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class DeploymentIncubatingAttributes { + + /** + * Name of the deployment + * environment (aka deployment tier). + */ + public static final AttributeKey DEPLOYMENT_ENVIRONMENT = + stringKey("deployment.environment"); + + // Enum definitions + + private DeploymentIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DestinationIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DestinationIncubatingAttributes.java new file mode 100644 index 0000000..a54cdf8 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DestinationIncubatingAttributes.java @@ -0,0 +1,38 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class DestinationIncubatingAttributes { + + /** + * Destination address - domain name if available without reverse DNS lookup; otherwise, IP + * address or Unix domain socket name. + * + *

Notes: + * + *

    + *
  • When observed from the source side, and when communicating through an intermediary, + * {@code destination.address} SHOULD represent the destination address behind any + * intermediaries, for example proxies, if it's available. + *
+ */ + public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); + + /** Destination port number */ + public static final AttributeKey DESTINATION_PORT = longKey("destination.port"); + + // Enum definitions + + private DestinationIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..8368feb --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DeviceIncubatingAttributes.java @@ -0,0 +1,79 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class DeviceIncubatingAttributes { + + /** + * A unique identifier representing the device + * + *

Notes: + * + *

    + *
  • The device identifier MUST only be defined using the values outlined below. This value is + * not an advertising identifier and MUST NOT be used as such. On iOS (Swift or + * Objective-C), this value MUST be equal to the vendor + * identifier. On Android (Java or Kotlin), this value MUST be equal to the Firebase + * Installation ID or a globally unique UUID which is persisted across sessions in your + * application. More information can be found here on best + * practices and exact implementation details. Caution should be taken when storing personal + * data or anything which can identify a user. GDPR and data protection laws may apply, + * ensure you do your own due diligence. + *
+ */ + public static final AttributeKey DEVICE_ID = stringKey("device.id"); + + /** + * The name of the device manufacturer + * + *

Notes: + * + *

    + *
  • The Android OS provides this field via Build. + * iOS apps SHOULD hardcode the value {@code Apple}. + *
+ */ + public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); + + /** + * The model identifier for the device + * + *

Notes: + * + *

    + *
  • It's recommended this value represents a machine readable version of the model identifier + * rather than the market or consumer-friendly name of the device. + *
+ */ + public static final AttributeKey DEVICE_MODEL_IDENTIFIER = + stringKey("device.model.identifier"); + + /** + * The marketing name for the device model + * + *

Notes: + * + *

    + *
  • It's recommended this value represents a human readable version of the device model + * rather than a machine readable alternative. + *
+ */ + public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); + + // Enum definitions + + private DeviceIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..ce11231 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java @@ -0,0 +1,43 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class EnduserIncubatingAttributes { + + /** + * Username or client_id extracted from the access token or Authorization header in the inbound + * request from outside the system. + */ + public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); + + /** + * Actual/assumed role the client is making the request under extracted from token or application + * security context. + */ + public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); + + /** + * Scopes or granted authorities the client currently possesses extracted from token or + * application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an + * attribute value in a SAML + * 2.0 Assertion. + */ + public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); + + // Enum definitions + + private EnduserIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..4960987 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EventIncubatingAttributes.java @@ -0,0 +1,47 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class EventIncubatingAttributes { + + /** + * The domain identifies the business context for the events. + * + *

Notes: + * + *

    + *
  • Events across different domains may have same {@code event.name}, yet be unrelated + * events. + *
+ */ + public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); + + /** The name identifies the event. */ + public static final AttributeKey EVENT_NAME = stringKey("event.name"); + + // Enum definitions + public static final class EventDomainValues { + /** Events from browser apps. */ + public static final String BROWSER = "browser"; + + /** Events from mobile apps. */ + public static final String DEVICE = "device"; + + /** Events from Kubernetes. */ + public static final String K8S = "k8s"; + + private EventDomainValues() {} + } + + private EventIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java new file mode 100644 index 0000000..fe90b25 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ExceptionIncubatingAttributes.java @@ -0,0 +1,59 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ExceptionIncubatingAttributes { + + /** + * SHOULD be set to true if the exception event is recorded at a point where it is known that the + * exception is escaping the scope of the span. + * + *

Notes: + * + *

    + *
  • An exception is considered to have escaped (or left) the scope of a span, if that span is + * ended while the exception is still logically "in flight". This may be actually + * "in flight" in some languages (e.g. if the exception is passed to a Context + * manager's {@code __exit__} method in Python) but will usually be caught at the point of + * recording the exception in most languages. + *
  • It is usually not possible to determine at the point where an exception is thrown whether + * it will escape the scope of a span. However, it is trivial to know that an exception will + * escape, if one checks for an active exception just before ending the span, as done in the + * example above. + *
  • It follows that an exception may still escape the scope of the span even if the {@code + * exception.escaped} attribute was not set or set to false, since the event might have been + * recorded at a time where it was not clear whether the exception will escape. + *
+ */ + public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); + + /** The exception message. */ + public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); + + /** + * A stacktrace as a string in the natural representation for the language runtime. The + * representation is to be determined and documented by each language SIG. + */ + public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); + + /** + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of + * the exception should be preferred over the static type in languages that support it. + */ + public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); + + // Enum definitions + + private ExceptionIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..7b248aa --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FaasIncubatingAttributes.java @@ -0,0 +1,225 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class FaasIncubatingAttributes { + + /** + * A boolean that is true if the serverless function is executed for the first time (aka + * cold-start). + */ + public static final AttributeKey FAAS_COLDSTART = booleanKey("faas.coldstart"); + + /** + * A string containing the schedule period as Cron + * Expression. + */ + public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); + + /** + * The name of the source on which the triggering operation was performed. For example, in Cloud + * Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. + */ + public static final AttributeKey FAAS_DOCUMENT_COLLECTION = + stringKey("faas.document.collection"); + + /** + * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the + * name of the file, and in Cosmos DB the table name. + */ + public static final AttributeKey FAAS_DOCUMENT_NAME = stringKey("faas.document.name"); + + /** Describes the type of the operation that was performed on the data. */ + public static final AttributeKey FAAS_DOCUMENT_OPERATION = + stringKey("faas.document.operation"); + + /** + * A string containing the time when the data was accessed in the ISO 8601 format expressed in + * UTC. + */ + public static final AttributeKey FAAS_DOCUMENT_TIME = stringKey("faas.document.time"); + + /** + * The execution environment ID as a string, that will be potentially reused for other invocations + * to the same function/function version. + * + *

Notes: + * + *

    + *
  • AWS Lambda: Use the (full) log stream name. + *
+ */ + public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); + + /** The invocation ID of the current function invocation. */ + public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); + + /** + * The name of the invoked function. + * + *

Notes: + * + *

    + *
  • SHOULD be equal to the {@code faas.name} resource attribute of the invoked function. + *
+ */ + public static final AttributeKey FAAS_INVOKED_NAME = stringKey("faas.invoked_name"); + + /** + * The cloud provider of the invoked function. + * + *

Notes: + * + *

    + *
  • SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function. + *
+ */ + public static final AttributeKey FAAS_INVOKED_PROVIDER = + stringKey("faas.invoked_provider"); + + /** + * The cloud region of the invoked function. + * + *

Notes: + * + *

    + *
  • SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function. + *
+ */ + public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); + + /** + * The amount of memory available to the serverless function converted to Bytes. + * + *

Notes: + * + *

    + *
  • It's recommended to set this attribute since e.g. too little memory can easily stop a + * Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable + * {@code AWS_LAMBDA_FUNCTION_MEMORY_SIZE} provides this information (which must be + * multiplied by 1,048,576). + *
+ */ + public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); + + /** + * The name of the single function that this runtime instance executes. + * + *

Notes: + * + *

    + *
  • This is the name of the function as configured/deployed on the FaaS platform and is + * usually different from the name of the callback function (which may be stored in the {@code code.namespace}/{@code + * code.function} span attributes). + *
  • For some cloud providers, the above definition is ambiguous. The following definition of + * function name MUST be used for this attribute (and consequently the span name) for the + * listed cloud providers/products: + *
  • Azure: The full name {@code /}, i.e., function app name + * followed by a forward slash followed by the function name (this form can also be seen in + * the resource JSON for the function). This means that a span attribute MUST be used, as an + * Azure function app can host multiple functions that would usually share a TracerProvider + * (see also the {@code cloud.resource_id} attribute). + *
+ */ + public static final AttributeKey FAAS_NAME = stringKey("faas.name"); + + /** + * A string containing the function invocation time in the ISO 8601 format expressed in + * UTC. + */ + public static final AttributeKey FAAS_TIME = stringKey("faas.time"); + + /** Type of the trigger which caused this function invocation. */ + public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger"); + + /** + * The immutable version of the function being executed. + * + *

Notes: + * + *

    + *
  • Depending on the cloud provider and platform, use: + *
  • AWS Lambda: The function + * version (an integer represented as a decimal string). + *
  • Google Cloud Run (Services): The revision (i.e., the + * function name plus the revision suffix). + *
  • Google Cloud Functions: The value of the {@code + * K_REVISION} environment variable. + *
  • Azure Functions: Not applicable. Do not set this attribute. + *
+ */ + public static final AttributeKey FAAS_VERSION = stringKey("faas.version"); + + // Enum definitions + public static final class FaasDocumentOperationValues { + /** When a new object is created. */ + public static final String INSERT = "insert"; + + /** When an object is modified. */ + public static final String EDIT = "edit"; + + /** When an object is deleted. */ + public static final String DELETE = "delete"; + + private FaasDocumentOperationValues() {} + } + + public static final class FaasInvokedProviderValues { + /** Alibaba Cloud. */ + public static final String ALIBABA_CLOUD = "alibaba_cloud"; + + /** Amazon Web Services. */ + public static final String AWS = "aws"; + + /** Microsoft Azure. */ + public static final String AZURE = "azure"; + + /** Google Cloud Platform. */ + public static final String GCP = "gcp"; + + /** Tencent Cloud. */ + public static final String TENCENT_CLOUD = "tencent_cloud"; + + private FaasInvokedProviderValues() {} + } + + public static final class FaasTriggerValues { + /** A response to some data source operation such as a database or filesystem read/write. */ + public static final String DATASOURCE = "datasource"; + + /** To provide an answer to an inbound HTTP request. */ + public static final String HTTP = "http"; + + /** A function is set to be executed when messages are sent to a messaging system. */ + public static final String PUBSUB = "pubsub"; + + /** A function is scheduled to be executed regularly. */ + public static final String TIMER = "timer"; + + /** If none of the others apply. */ + public static final String OTHER = "other"; + + private FaasTriggerValues() {} + } + + private FaasIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..8de51d8 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/FeatureFlagIncubatingAttributes.java @@ -0,0 +1,45 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class FeatureFlagIncubatingAttributes { + + /** The unique identifier of the feature flag. */ + public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); + + /** The name of the service provider that performs the flag evaluation. */ + public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = + stringKey("feature_flag.provider_name"); + + /** + * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of + * the value can be used. + * + *

Notes: + * + *

    + *
  • A semantic identifier, commonly referred to as a variant, provides a means for referring + * to a value without including the value itself. This can provide additional context for + * understanding the meaning behind a value. For example, the variant {@code red} maybe be + * used for the value {@code #c05543}. + *
  • A stringified version of the value can be used in situations where a semantic identifier + * is unavailable. String representation of the value should be determined by the + * implementer. + *
+ */ + public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); + + // Enum definitions + + private FeatureFlagIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..b039688 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GcpIncubatingAttributes.java @@ -0,0 +1,56 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class GcpIncubatingAttributes { + + /** + * The name of the Cloud Run execution being run for + * the Job, as set by the {@code + * CLOUD_RUN_EXECUTION} environment variable. + */ + public static final AttributeKey GCP_CLOUD_RUN_JOB_EXECUTION = + stringKey("gcp.cloud_run.job.execution"); + + /** + * The index for a task within an execution as provided by the {@code + * CLOUD_RUN_TASK_INDEX} environment variable. + */ + public static final AttributeKey GCP_CLOUD_RUN_JOB_TASK_INDEX = + longKey("gcp.cloud_run.job.task_index"); + + /** + * The hostname of a GCE instance. This is the full value of the default or custom hostname. + */ + public static final AttributeKey GCP_GCE_INSTANCE_HOSTNAME = + stringKey("gcp.gce.instance.hostname"); + + /** + * The instance name of a GCE instance. This is the value provided by {@code host.name}, the + * visible name of the instance in the Cloud Console UI, and the prefix for the default hostname + * of the instance as defined by the default + * internal DNS name. + */ + public static final AttributeKey GCP_GCE_INSTANCE_NAME = + stringKey("gcp.gce.instance.name"); + + // Enum definitions + + private GcpIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..a037cb7 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GraphqlIncubatingAttributes.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class GraphqlIncubatingAttributes { + + /** + * The GraphQL document being executed. + * + *

Notes: + * + *

    + *
  • The value may be sanitized to exclude sensitive information. + *
+ */ + public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); + + /** The name of the operation being executed. */ + public static final AttributeKey GRAPHQL_OPERATION_NAME = + stringKey("graphql.operation.name"); + + /** The type of the operation being executed. */ + public static final AttributeKey GRAPHQL_OPERATION_TYPE = + stringKey("graphql.operation.type"); + + // Enum definitions + public static final class GraphqlOperationTypeValues { + /** GraphQL query. */ + public static final String QUERY = "query"; + + /** GraphQL mutation. */ + public static final String MUTATION = "mutation"; + + /** GraphQL subscription. */ + public static final String SUBSCRIPTION = "subscription"; + + private GraphqlOperationTypeValues() {} + } + + private GraphqlIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HerokuIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HerokuIncubatingAttributes.java new file mode 100644 index 0000000..ffad37f --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HerokuIncubatingAttributes.java @@ -0,0 +1,31 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class HerokuIncubatingAttributes { + + /** Unique identifier for the application */ + public static final AttributeKey HEROKU_APP_ID = stringKey("heroku.app.id"); + + /** Commit hash for the current release */ + public static final AttributeKey HEROKU_RELEASE_COMMIT = + stringKey("heroku.release.commit"); + + /** Time and date the release was created */ + public static final AttributeKey HEROKU_RELEASE_CREATION_TIMESTAMP = + stringKey("heroku.release.creation_timestamp"); + + // Enum definitions + + private HerokuIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..928b4b3 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HostIncubatingAttributes.java @@ -0,0 +1,139 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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 io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class HostIncubatingAttributes { + + /** The CPU architecture the host system is running on. */ + public static final AttributeKey HOST_ARCH = stringKey("host.arch"); + + /** The amount of level 2 memory cache available to the processor (in Bytes). */ + public static final AttributeKey HOST_CPU_CACHE_L2_SIZE = longKey("host.cpu.cache.l2.size"); + + /** Numeric value specifying the family or generation of the CPU. */ + public static final AttributeKey HOST_CPU_FAMILY = longKey("host.cpu.family"); + + /** + * Model identifier. It provides more granular information about the CPU, distinguishing it from + * other CPUs within the same family. + */ + public static final AttributeKey HOST_CPU_MODEL_ID = longKey("host.cpu.model.id"); + + /** Model designation of the processor. */ + public static final AttributeKey HOST_CPU_MODEL_NAME = stringKey("host.cpu.model.name"); + + /** Stepping or core revisions. */ + public static final AttributeKey HOST_CPU_STEPPING = longKey("host.cpu.stepping"); + + /** + * Processor manufacturer identifier. A maximum 12-character string. + * + *

Notes: + * + *

    + *
  • CPUID command returns the vendor ID string in + * EBX, EDX and ECX registers. Writing these to memory in this order results in a + * 12-character string. + *
+ */ + public static final AttributeKey HOST_CPU_VENDOR_ID = stringKey("host.cpu.vendor.id"); + + /** + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For + * non-containerized systems, this should be the {@code machine-id}. See the table below for the + * sources to use to determine the {@code machine-id} based on operating system. + */ + public static final AttributeKey HOST_ID = stringKey("host.id"); + + /** VM image ID or host OS image ID. For Cloud, this value is from the provider. */ + public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); + + /** Name of the VM image or OS install the host was instantiated from. */ + public static final AttributeKey HOST_IMAGE_NAME = stringKey("host.image.name"); + + /** + * The version string of the VM image or host OS as defined in Version Attributes. + */ + public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); + + /** + * Available IP addresses of the host, excluding loopback interfaces. + * + *

Notes: + * + *

    + *
  • IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be + * specified in the RFC 5952 + * format. + *
+ */ + public static final AttributeKey> HOST_IP = stringArrayKey("host.ip"); + + /** + * Available MAC addresses of the host, excluding loopback interfaces. + * + *

Notes: + * + *

    + *
  • MAC Addresses MUST be represented in IEEE + * RA hexadecimal form: as hyphen-separated octets in uppercase hexadecimal form from + * most to least significant. + *
+ */ + public static final AttributeKey> HOST_MAC = stringArrayKey("host.mac"); + + /** + * Name of the host. On Unix systems, it may contain what the hostname command returns, or the + * fully qualified hostname, or another name specified by the user. + */ + public static final AttributeKey HOST_NAME = stringKey("host.name"); + + /** Type of host. For Cloud, this must be the machine type. */ + public static final AttributeKey HOST_TYPE = stringKey("host.type"); + + // Enum definitions + public static final class HostArchValues { + /** AMD64. */ + public static final String AMD64 = "amd64"; + + /** ARM32. */ + public static final String ARM32 = "arm32"; + + /** ARM64. */ + public static final String ARM64 = "arm64"; + + /** Itanium. */ + public static final String IA64 = "ia64"; + + /** 32-bit PowerPC. */ + public static final String PPC32 = "ppc32"; + + /** 64-bit PowerPC. */ + public static final String PPC64 = "ppc64"; + + /** IBM z/Architecture. */ + public static final String S390X = "s390x"; + + /** 32-bit x86. */ + public static final String X86 = "x86"; + + private HostArchValues() {} + } + + private HostIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..1657c99 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/HttpIncubatingAttributes.java @@ -0,0 +1,37 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.longKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class HttpIncubatingAttributes { + + /** + * The size of the request payload body in bytes. This is the number of bytes transferred + * excluding headers and is often, but not always, present as the Content-Length + * header. For requests using transport encoding, this should be the compressed size. + */ + public static final AttributeKey HTTP_REQUEST_BODY_SIZE = longKey("http.request.body.size"); + + /** + * The size of the response payload body in bytes. This is the number of bytes transferred + * excluding headers and is often, but not always, present as the Content-Length + * header. For requests using transport encoding, this should be the compressed size. + */ + public static final AttributeKey HTTP_RESPONSE_BODY_SIZE = + longKey("http.response.body.size"); + + // Enum definitions + + private HttpIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingResourceAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingResourceAttributes.java deleted file mode 100644 index 2501098..0000000 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingResourceAttributes.java +++ /dev/null @@ -1,1148 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv.incubating; - -import static io.opentelemetry.api.common.AttributeKey.booleanKey; -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 -// buildscripts/templates/SemanticAttributes.java.j2 -@SuppressWarnings("unused") -public final class IncubatingResourceAttributes { - /** The cloud account ID the resource is assigned to. */ - public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); - - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. - * Availability zone represents the zone where the resource is running. - * - *

Notes: - * - *

    - *
  • Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - *
- */ - public static final AttributeKey CLOUD_AVAILABILITY_ZONE = - stringKey("cloud.availability_zone"); - - /** - * The cloud platform in use. - * - *

Notes: - * - *

    - *
  • The prefix of the service SHOULD match the one specified in {@code cloud.provider}. - *
- */ - public static final AttributeKey CLOUD_PLATFORM = stringKey("cloud.platform"); - - /** Name of the cloud provider. */ - public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); - - /** - * The geographical region the resource is running. - * - *

Notes: - * - *

- */ - public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); - - /** - * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an ARN on - * AWS, a fully - * qualified resource ID on Azure, a full resource - * name on GCP) - * - *

Notes: - * - *

    - *
  • On some cloud providers, it may not be possible to determine the full ID at startup, so - * it may be necessary to set {@code cloud.resource_id} as a span attribute instead. - *
  • The exact value to use for {@code cloud.resource_id} depends on the cloud provider. The - * following well-known definitions MUST be used if you set this attribute and they apply: - *
  • AWS Lambda: The function ARN. - * Take care not to use the "invoked ARN" directly but replace any alias - * suffix with the resolved function version, as the same runtime instance may be - * invokable with multiple different aliases. - *
  • GCP: The URI of the resource - *
  • Azure: The Fully Qualified - * Resource ID of the invoked function, not the function app, having the form - * {@code - * /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/}. - * This means that a span attribute MUST be used, as an Azure function app can host multiple - * functions that would usually share a TracerProvider. - *
- */ - public static final AttributeKey CLOUD_RESOURCE_ID = stringKey("cloud.resource_id"); - - /** - * The command used to run the container (i.e. the command name). - * - *

Notes: - * - *

    - *
  • If using embedded credentials or sensitive data, it is recommended to remove them to - * prevent potential leakage. - *
- */ - public static final AttributeKey CONTAINER_COMMAND = stringKey("container.command"); - - /** - * All the command arguments (including the command/executable itself) run by the container. [2] - */ - public static final AttributeKey> CONTAINER_COMMAND_ARGS = - stringArrayKey("container.command_args"); - - /** The full command run by the container as a single string representing the full command. [2] */ - public static final AttributeKey CONTAINER_COMMAND_LINE = - stringKey("container.command_line"); - - /** - * Container ID. Usually a UUID, as for example used to identify Docker - * containers. The UUID might be abbreviated. - */ - public static final AttributeKey CONTAINER_ID = stringKey("container.id"); - - /** - * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - * - *

Notes: - * - *

    - *
  • Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the - * {@code Image} field from the Docker container inspect API - * endpoint. K8s defines a link to the container registry repository with digest {@code - * "imageID": "registry.azurecr.io - * /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}. - * The ID is assinged by the container runtime and can vary in different environments. - * Consider using {@code oci.manifest.digest} if it is important to identify the same image - * in different environments/runtimes. - *
- */ - public static final AttributeKey CONTAINER_IMAGE_ID = stringKey("container.image.id"); - - /** Name of the image the container was built on. */ - public static final AttributeKey CONTAINER_IMAGE_NAME = stringKey("container.image.name"); - - /** - * Repo digests of the container image as provided by the container runtime. - * - *

Notes: - * - *

    - *
  • Docker - * and CRI - * report those under the {@code RepoDigests} field. - *
- */ - public static final AttributeKey> CONTAINER_IMAGE_REPO_DIGESTS = - stringArrayKey("container.image.repo_digests"); - - /** - * Container image tags. An example can be found in Docker Image - * Inspect. Should be only the {@code } section of the full name for example from {@code - * registry.example.com/my-org/my-image:}. - */ - public static final AttributeKey> CONTAINER_IMAGE_TAGS = - stringArrayKey("container.image.tags"); - - /** Container name used by container runtime. */ - public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); - - /** The container runtime managing this container. */ - public static final AttributeKey CONTAINER_RUNTIME = stringKey("container.runtime"); - - /** - * The digest of the OCI image manifest. For container images specifically is the digest by which - * the container image is known. - * - *

Notes: - * - *

- */ - public static final AttributeKey OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); - - /** - * Uniquely identifies the framework API revision offered by a version ({@code os.version}) of the - * android operating system. More information can be found here. - */ - public static final AttributeKey ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); - - /** - * Array of brand name and version separated by a space - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the UA client hints API ({@code - * navigator.userAgentData.brands}). - *
- */ - public static final AttributeKey> BROWSER_BRANDS = stringArrayKey("browser.brands"); - - /** - * Preferred language of the user using the browser - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the Navigator API {@code navigator.language}. - *
- */ - public static final AttributeKey BROWSER_LANGUAGE = stringKey("browser.language"); - - /** - * A boolean that is true if the browser is running on a mobile device - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the UA client hints API ({@code - * navigator.userAgentData.mobile}). If unavailable, this attribute SHOULD be left unset. - *
- */ - public static final AttributeKey BROWSER_MOBILE = booleanKey("browser.mobile"); - - /** - * The platform on which the browser is running - * - *

Notes: - * - *

    - *
  • This value is intended to be taken from the UA client hints API ({@code - * navigator.userAgentData.platform}). If unavailable, the legacy {@code navigator.platform} - * API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the - * values to be consistent. The list of possible values is defined in the W3C User-Agent Client - * Hints specification. Note that some (but not all) of these values can overlap with - * values in the {@code os.type} and {@code os.name} attributes. - * However, for consistency, the values in the {@code browser.platform} attribute should - * capture the exact value that the user agent provides. - *
- */ - public static final AttributeKey BROWSER_PLATFORM = stringKey("browser.platform"); - - /** - * The ARN of an ECS - * cluster. - */ - public static final AttributeKey AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); - - /** - * The Amazon Resource Name (ARN) of an ECS - * container instance. - */ - public static final AttributeKey AWS_ECS_CONTAINER_ARN = - stringKey("aws.ecs.container.arn"); - - /** - * The launch - * type for an ECS task. - */ - public static final AttributeKey AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype"); - - /** - * The ARN of an ECS - * task definition. - */ - public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); - - /** The task definition family this task definition is a member of. */ - public static final AttributeKey AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family"); - - /** The revision for this task definition. */ - public static final AttributeKey AWS_ECS_TASK_REVISION = - stringKey("aws.ecs.task.revision"); - - /** The ARN of an EKS cluster. */ - public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); - - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - *

Notes: - * - *

- */ - public static final AttributeKey> AWS_LOG_GROUP_ARNS = - stringArrayKey("aws.log.group.arns"); - - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - *

Notes: - * - *

    - *
  • Multiple log groups must be supported for cases like multi-container applications, where - * a single application has sidecar containers, and each write to their own log group. - *
- */ - public static final AttributeKey> AWS_LOG_GROUP_NAMES = - stringArrayKey("aws.log.group.names"); - - /** - * The ARN(s) of the AWS log stream(s). - * - *

Notes: - * - *

- */ - public static final AttributeKey> AWS_LOG_STREAM_ARNS = - stringArrayKey("aws.log.stream.arns"); - - /** The name(s) of the AWS log stream(s) an application is writing to. */ - public static final AttributeKey> AWS_LOG_STREAM_NAMES = - stringArrayKey("aws.log.stream.names"); - - /** - * The name of the Cloud Run execution being run for - * the Job, as set by the {@code - * CLOUD_RUN_EXECUTION} environment variable. - */ - public static final AttributeKey GCP_CLOUD_RUN_JOB_EXECUTION = - stringKey("gcp.cloud_run.job.execution"); - - /** - * The index for a task within an execution as provided by the {@code - * CLOUD_RUN_TASK_INDEX} environment variable. - */ - public static final AttributeKey GCP_CLOUD_RUN_JOB_TASK_INDEX = - longKey("gcp.cloud_run.job.task_index"); - - /** - * The hostname of a GCE instance. This is the full value of the default or custom hostname. - */ - public static final AttributeKey GCP_GCE_INSTANCE_HOSTNAME = - stringKey("gcp.gce.instance.hostname"); - - /** - * The instance name of a GCE instance. This is the value provided by {@code host.name}, the - * visible name of the instance in the Cloud Console UI, and the prefix for the default hostname - * of the instance as defined by the default - * internal DNS name. - */ - public static final AttributeKey GCP_GCE_INSTANCE_NAME = - stringKey("gcp.gce.instance.name"); - - /** Unique identifier for the application */ - public static final AttributeKey HEROKU_APP_ID = stringKey("heroku.app.id"); - - /** Commit hash for the current release */ - public static final AttributeKey HEROKU_RELEASE_COMMIT = - stringKey("heroku.release.commit"); - - /** Time and date the release was created */ - public static final AttributeKey HEROKU_RELEASE_CREATION_TIMESTAMP = - stringKey("heroku.release.creation_timestamp"); - - /** - * Name of the deployment - * environment (aka deployment tier). - */ - public static final AttributeKey DEPLOYMENT_ENVIRONMENT = - stringKey("deployment.environment"); - - /** - * A unique identifier representing the device - * - *

Notes: - * - *

    - *
  • The device identifier MUST only be defined using the values outlined below. This value is - * not an advertising identifier and MUST NOT be used as such. On iOS (Swift or - * Objective-C), this value MUST be equal to the vendor - * identifier. On Android (Java or Kotlin), this value MUST be equal to the Firebase - * Installation ID or a globally unique UUID which is persisted across sessions in your - * application. More information can be found here on best - * practices and exact implementation details. Caution should be taken when storing personal - * data or anything which can identify a user. GDPR and data protection laws may apply, - * ensure you do your own due diligence. - *
- */ - public static final AttributeKey DEVICE_ID = stringKey("device.id"); - - /** - * The name of the device manufacturer - * - *

Notes: - * - *

    - *
  • The Android OS provides this field via Build. - * iOS apps SHOULD hardcode the value {@code Apple}. - *
- */ - public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); - - /** - * The model identifier for the device - * - *

Notes: - * - *

    - *
  • It's recommended this value represents a machine readable version of the model identifier - * rather than the market or consumer-friendly name of the device. - *
- */ - public static final AttributeKey DEVICE_MODEL_IDENTIFIER = - stringKey("device.model.identifier"); - - /** - * The marketing name for the device model - * - *

Notes: - * - *

    - *
  • It's recommended this value represents a human readable version of the device model - * rather than a machine readable alternative. - *
- */ - public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); - - /** - * The execution environment ID as a string, that will be potentially reused for other invocations - * to the same function/function version. - * - *

Notes: - * - *

    - *
  • AWS Lambda: Use the (full) log stream name. - *
- */ - public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); - - /** - * The amount of memory available to the serverless function converted to Bytes. - * - *

Notes: - * - *

    - *
  • It's recommended to set this attribute since e.g. too little memory can easily stop a - * Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable - * {@code AWS_LAMBDA_FUNCTION_MEMORY_SIZE} provides this information (which must be - * multiplied by 1,048,576). - *
- */ - public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); - - /** - * The name of the single function that this runtime instance executes. - * - *

Notes: - * - *

    - *
  • This is the name of the function as configured/deployed on the FaaS platform and is - * usually different from the name of the callback function (which may be stored in the {@code code.namespace}/{@code - * code.function} span attributes). - *
  • For some cloud providers, the above definition is ambiguous. The following definition of - * function name MUST be used for this attribute (and consequently the span name) for the - * listed cloud providers/products: - *
  • Azure: The full name {@code /}, i.e., function app name - * followed by a forward slash followed by the function name (this form can also be seen in - * the resource JSON for the function). This means that a span attribute MUST be used, as an - * Azure function app can host multiple functions that would usually share a TracerProvider - * (see also the {@code cloud.resource_id} attribute). - *
- */ - public static final AttributeKey FAAS_NAME = stringKey("faas.name"); - - /** - * The immutable version of the function being executed. - * - *

Notes: - * - *

    - *
  • Depending on the cloud provider and platform, use: - *
  • AWS Lambda: The function - * version (an integer represented as a decimal string). - *
  • Google Cloud Run (Services): The revision (i.e., the - * function name plus the revision suffix). - *
  • Google Cloud Functions: The value of the {@code - * K_REVISION} environment variable. - *
  • Azure Functions: Not applicable. Do not set this attribute. - *
- */ - public static final AttributeKey FAAS_VERSION = stringKey("faas.version"); - - /** The CPU architecture the host system is running on. */ - public static final AttributeKey HOST_ARCH = stringKey("host.arch"); - - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For - * non-containerized systems, this should be the {@code machine-id}. See the table below for the - * sources to use to determine the {@code machine-id} based on operating system. - */ - public static final AttributeKey HOST_ID = stringKey("host.id"); - - /** VM image ID or host OS image ID. For Cloud, this value is from the provider. */ - public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); - - /** Name of the VM image or OS install the host was instantiated from. */ - public static final AttributeKey HOST_IMAGE_NAME = stringKey("host.image.name"); - - /** - * The version string of the VM image or host OS as defined in Version Attributes. - */ - public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); - - /** - * Available IP addresses of the host, excluding loopback interfaces. - * - *

Notes: - * - *

    - *
  • IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be - * specified in the RFC 5952 - * format. - *
- */ - public static final AttributeKey> HOST_IP = stringArrayKey("host.ip"); - - /** - * Available MAC addresses of the host, excluding loopback interfaces. - * - *

Notes: - * - *

    - *
  • MAC Addresses MUST be represented in IEEE - * RA hexadecimal form: as hyphen-separated octets in uppercase hexadecimal form from - * most to least significant. - *
- */ - public static final AttributeKey> HOST_MAC = stringArrayKey("host.mac"); - - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the - * fully qualified hostname, or another name specified by the user. - */ - public static final AttributeKey HOST_NAME = stringKey("host.name"); - - /** Type of host. For Cloud, this must be the machine type. */ - public static final AttributeKey HOST_TYPE = stringKey("host.type"); - - /** The amount of level 2 memory cache available to the processor (in Bytes). */ - public static final AttributeKey HOST_CPU_CACHE_L2_SIZE = longKey("host.cpu.cache.l2.size"); - - /** Numeric value specifying the family or generation of the CPU. */ - public static final AttributeKey HOST_CPU_FAMILY = longKey("host.cpu.family"); - - /** - * Model identifier. It provides more granular information about the CPU, distinguishing it from - * other CPUs within the same family. - */ - public static final AttributeKey HOST_CPU_MODEL_ID = longKey("host.cpu.model.id"); - - /** Model designation of the processor. */ - public static final AttributeKey HOST_CPU_MODEL_NAME = stringKey("host.cpu.model.name"); - - /** Stepping or core revisions. */ - public static final AttributeKey HOST_CPU_STEPPING = longKey("host.cpu.stepping"); - - /** - * Processor manufacturer identifier. A maximum 12-character string. - * - *

Notes: - * - *

    - *
  • CPUID command returns the vendor ID string in - * EBX, EDX and ECX registers. Writing these to memory in this order results in a - * 12-character string. - *
- */ - public static final AttributeKey HOST_CPU_VENDOR_ID = stringKey("host.cpu.vendor.id"); - - /** The name of the cluster. */ - public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); - - /** - * A pseudo-ID for the cluster, set to the UID of the {@code kube-system} namespace. - * - *

Notes: - * - *

    - *
  • K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will - * recommend collecting the {@code k8s.cluster.uid} through the official APIs. In the - * meantime, we are able to use the {@code uid} of the {@code kube-system} namespace as a - * proxy for cluster ID. Read on for the rationale. - *
  • Every object created in a K8s cluster is assigned a distinct UID. The {@code kube-system} - * namespace is used by Kubernetes itself and will exist for the lifetime of the cluster. - * Using the {@code uid} of the {@code kube-system} namespace is a reasonable proxy for the - * K8s ClusterID as it will only change if the cluster is rebuilt. Furthermore, Kubernetes - * UIDs are UUIDs as standardized by ISO/IEC 9834-8 and ITU-T - * X.667. Which states: - *
  • If generated according to one of the mechanisms defined in Rec. ITU-T X.667 | ISO/IEC - * 9834-8, a UUID is either guaranteed to be different from all other UUIDs generated before - * 3603 A.D., or is extremely likely to be different (depending on the mechanism chosen). - *
  • Therefore, UIDs between clusters should be extremely unlikely to conflict. - *
- */ - public static final AttributeKey K8S_CLUSTER_UID = stringKey("k8s.cluster.uid"); - - /** The name of the Node. */ - public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); - - /** The UID of the Node. */ - public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); - - /** The name of the namespace that the pod is running in. */ - public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); - - /** The name of the Pod. */ - public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); - - /** The UID of the Pod. */ - public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); - - /** - * The name of the Container from Pod specification, must be unique within a Pod. Container - * runtime usually uses different globally unique name ({@code container.name}). - */ - public static final AttributeKey K8S_CONTAINER_NAME = stringKey("k8s.container.name"); - - /** - * Number of times the container was restarted. This attribute can be used to identify a - * particular container (running or stopped) within a container spec. - */ - public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = - longKey("k8s.container.restart_count"); - - /** The name of the ReplicaSet. */ - public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); - - /** The UID of the ReplicaSet. */ - public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); - - /** The name of the Deployment. */ - public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); - - /** The UID of the Deployment. */ - public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); - - /** The name of the StatefulSet. */ - public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); - - /** The UID of the StatefulSet. */ - public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); - - /** 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 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 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"); - - /** Unique identifier for a particular build or compilation of the operating system. */ - public static final AttributeKey OS_BUILD_ID = stringKey("os.build_id"); - - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by {@code - * ver} or {@code lsb_release -a} commands. - */ - public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); - - /** Human readable operating system name. */ - public static final AttributeKey OS_NAME = stringKey("os.name"); - - /** The operating system type. */ - public static final AttributeKey OS_TYPE = stringKey("os.type"); - - /** - * The version string of the operating system as defined in Version Attributes. - */ - public static final AttributeKey OS_VERSION = stringKey("os.version"); - - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be - * set to the zeroth string in {@code proc/[pid]/cmdline}. On Windows, can be set to the first - * parameter extracted from {@code GetCommandLineW}. - */ - public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); - - /** - * 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}. - */ - public static final AttributeKey> PROCESS_COMMAND_ARGS = - stringArrayKey("process.command_args"); - - /** - * 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. - */ - public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); - - /** - * The name of the process executable. On Linux based systems, can be set to the {@code Name} in - * {@code proc/[pid]/status}. On Windows, can be set to the base name of {@code - * GetProcessImageFileNameW}. - */ - public static final AttributeKey PROCESS_EXECUTABLE_NAME = - stringKey("process.executable.name"); - - /** - * The full path to the process executable. On Linux based systems, can be set to the target of - * {@code proc/[pid]/exe}. On Windows, can be set to the result of {@code - * GetProcessImageFileNameW}. - */ - public static final AttributeKey PROCESS_EXECUTABLE_PATH = - stringKey("process.executable.path"); - - /** The username of the user that owns the process. */ - public static final AttributeKey PROCESS_OWNER = stringKey("process.owner"); - - /** Parent Process identifier (PID). */ - public static final AttributeKey PROCESS_PARENT_PID = longKey("process.parent_pid"); - - /** Process identifier (PID). */ - public static final AttributeKey PROCESS_PID = longKey("process.pid"); - - /** - * An additional description about the runtime of the process, for example a specific vendor - * customization of the runtime environment. - */ - public static final AttributeKey PROCESS_RUNTIME_DESCRIPTION = - stringKey("process.runtime.description"); - - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name - * of the compiler. - */ - public static final AttributeKey PROCESS_RUNTIME_NAME = stringKey("process.runtime.name"); - - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - public static final AttributeKey PROCESS_RUNTIME_VERSION = - stringKey("process.runtime.version"); - - /** - * Logical name of the service. - * - *

Notes: - * - *

    - *
  • MUST be the same for all instances of horizontally scaled services. If the value was not - * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code - * unknown_service:bash}. If {@code process.executable.name} is not available, the value - * MUST be set to {@code unknown_service}. - *
- */ - public static final AttributeKey SERVICE_NAME = stringKey("service.name"); - - /** - * The version string of the service API or implementation. The format is not defined by these - * conventions. - */ - public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); - - /** - * The string ID of the service instance. - * - *

Notes: - * - *

    - *
  • MUST be unique for each instance of the same {@code service.namespace,service.name} pair - * (in other words {@code service.namespace,service.name,service.instance.id} triplet MUST - * be globally unique). The ID helps to distinguish instances of the same service that exist - * at the same time (e.g. instances of a horizontally scaled service). It is preferable for - * the ID to be persistent and stay the same for the lifetime of the service instance, - * however it is acceptable that the ID is ephemeral and changes during important lifetime - * events for the service (e.g. service restarts). If the service has no inherent unique ID - * that can be used as the value of this attribute it is recommended to generate a random - * Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use - * Version 5, see RFC 4122 for more recommendations). - *
- */ - public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); - - /** - * A namespace for {@code service.name}. - * - *

Notes: - * - *

    - *
  • A string value having a meaning that helps to distinguish a group of services, for - * example the team name that owns a group of services. {@code service.name} is expected to - * be unique within the same namespace. If {@code service.namespace} is not specified in the - * Resource then {@code service.name} is expected to be unique for all services that have no - * explicit namespace defined (so the empty/unspecified namespace is simply one more valid - * namespace). Zero-length namespace string is assumed equal to unspecified namespace. - *
- */ - public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); - - /** The language of the telemetry SDK. */ - public static final AttributeKey TELEMETRY_SDK_LANGUAGE = - stringKey("telemetry.sdk.language"); - - /** - * The name of the telemetry SDK as defined above. - * - *

Notes: - * - *

    - *
  • The OpenTelemetry SDK MUST set the {@code telemetry.sdk.name} attribute to {@code - * opentelemetry}. If another SDK, like a fork or a vendor-provided implementation, is used, - * this SDK MUST set the {@code telemetry.sdk.name} attribute to the fully-qualified class - * or module name of this SDK's main entry point or another suitable identifier depending on - * the language. The identifier {@code opentelemetry} is reserved and MUST NOT be used in - * this case. All custom identifiers SHOULD be stable across different versions of an - * implementation. - *
- */ - public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); - - /** The version string of the telemetry SDK. */ - public static final AttributeKey TELEMETRY_SDK_VERSION = - stringKey("telemetry.sdk.version"); - - /** - * The name of the auto instrumentation agent or distribution, if used. - * - *

Notes: - * - *

    - *
  • Official auto instrumentation agents and distributions SHOULD set the {@code - * telemetry.distro.name} attribute to a string starting with {@code opentelemetry-}, e.g. - * {@code opentelemetry-java-instrumentation}. - *
- */ - public static final AttributeKey TELEMETRY_DISTRO_NAME = - stringKey("telemetry.distro.name"); - - /** The version string of the auto instrumentation agent or distribution, if used. */ - public static final AttributeKey TELEMETRY_DISTRO_VERSION = - stringKey("telemetry.distro.version"); - - /** Additional description of the web engine (e.g. detailed version and edition information). */ - public static final AttributeKey WEBENGINE_DESCRIPTION = - stringKey("webengine.description"); - - /** The name of the web engine. */ - public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); - - /** The version of the web engine. */ - public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); - - /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - - /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - - /** Container labels, {@code } being the label name, the value being the label value. */ - public static final AttributeKeyTemplate CONTAINER_LABELS = - stringKeyTemplate("container.labels"); - - // Enum definitions - public static final class CloudPlatformValues { - /** Alibaba Cloud Elastic Compute Service. */ - public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"; - - /** Alibaba Cloud Function Compute. */ - public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc"; - - /** Red Hat OpenShift on Alibaba Cloud. */ - public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"; - - /** AWS Elastic Compute Cloud. */ - public static final String AWS_EC2 = "aws_ec2"; - - /** AWS Elastic Container Service. */ - public static final String AWS_ECS = "aws_ecs"; - - /** AWS Elastic Kubernetes Service. */ - public static final String AWS_EKS = "aws_eks"; - - /** AWS Lambda. */ - public static final String AWS_LAMBDA = "aws_lambda"; - - /** AWS Elastic Beanstalk. */ - public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; - - /** AWS App Runner. */ - public static final String AWS_APP_RUNNER = "aws_app_runner"; - - /** Red Hat OpenShift on AWS (ROSA). */ - public static final String AWS_OPENSHIFT = "aws_openshift"; - - /** Azure Virtual Machines. */ - public static final String AZURE_VM = "azure_vm"; - - /** Azure Container Instances. */ - public static final String AZURE_CONTAINER_INSTANCES = "azure_container_instances"; - - /** Azure Kubernetes Service. */ - public static final String AZURE_AKS = "azure_aks"; - - /** Azure Functions. */ - public static final String AZURE_FUNCTIONS = "azure_functions"; - - /** Azure App Service. */ - public static final String AZURE_APP_SERVICE = "azure_app_service"; - - /** Azure Red Hat OpenShift. */ - public static final String AZURE_OPENSHIFT = "azure_openshift"; - - /** Google Bare Metal Solution (BMS). */ - public static final String GCP_BARE_METAL_SOLUTION = "gcp_bare_metal_solution"; - - /** Google Cloud Compute Engine (GCE). */ - public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine"; - - /** Google Cloud Run. */ - public static final String GCP_CLOUD_RUN = "gcp_cloud_run"; - - /** Google Cloud Kubernetes Engine (GKE). */ - public static final String GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"; - - /** Google Cloud Functions (GCF). */ - public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"; - - /** Google Cloud App Engine (GAE). */ - public static final String GCP_APP_ENGINE = "gcp_app_engine"; - - /** Red Hat OpenShift on Google Cloud. */ - public static final String GCP_OPENSHIFT = "gcp_openshift"; - - /** Red Hat OpenShift on IBM Cloud. */ - public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"; - - /** Tencent Cloud Cloud Virtual Machine (CVM). */ - public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm"; - - /** Tencent Cloud Elastic Kubernetes Service (EKS). */ - public static final String TENCENT_CLOUD_EKS = "tencent_cloud_eks"; - - /** Tencent Cloud Serverless Cloud Function (SCF). */ - public static final String TENCENT_CLOUD_SCF = "tencent_cloud_scf"; - - private CloudPlatformValues() {} - } - - public static final class CloudProviderValues { - /** Alibaba Cloud. */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; - - /** Amazon Web Services. */ - public static final String AWS = "aws"; - - /** Microsoft Azure. */ - public static final String AZURE = "azure"; - - /** Google Cloud Platform. */ - public static final String GCP = "gcp"; - - /** Heroku Platform as a Service. */ - public static final String HEROKU = "heroku"; - - /** IBM Cloud. */ - public static final String IBM_CLOUD = "ibm_cloud"; - - /** Tencent Cloud. */ - public static final String TENCENT_CLOUD = "tencent_cloud"; - - private CloudProviderValues() {} - } - - public static final class AwsEcsLaunchtypeValues { - /** ec2. */ - public static final String EC2 = "ec2"; - - /** fargate. */ - public static final String FARGATE = "fargate"; - - private AwsEcsLaunchtypeValues() {} - } - - public static final class HostArchValues { - /** AMD64. */ - public static final String AMD64 = "amd64"; - - /** ARM32. */ - public static final String ARM32 = "arm32"; - - /** ARM64. */ - public static final String ARM64 = "arm64"; - - /** Itanium. */ - public static final String IA64 = "ia64"; - - /** 32-bit PowerPC. */ - public static final String PPC32 = "ppc32"; - - /** 64-bit PowerPC. */ - public static final String PPC64 = "ppc64"; - - /** IBM z/Architecture. */ - public static final String S390X = "s390x"; - - /** 32-bit x86. */ - public static final String X86 = "x86"; - - private HostArchValues() {} - } - - public static final class OsTypeValues { - /** Microsoft Windows. */ - public static final String WINDOWS = "windows"; - - /** Linux. */ - public static final String LINUX = "linux"; - - /** Apple Darwin. */ - public static final String DARWIN = "darwin"; - - /** FreeBSD. */ - public static final String FREEBSD = "freebsd"; - - /** NetBSD. */ - public static final String NETBSD = "netbsd"; - - /** OpenBSD. */ - public static final String OPENBSD = "openbsd"; - - /** DragonFly BSD. */ - public static final String DRAGONFLYBSD = "dragonflybsd"; - - /** HP-UX (Hewlett Packard Unix). */ - public static final String HPUX = "hpux"; - - /** AIX (Advanced Interactive eXecutive). */ - public static final String AIX = "aix"; - - /** SunOS, Oracle Solaris. */ - public static final String SOLARIS = "solaris"; - - /** IBM z/OS. */ - public static final String Z_OS = "z_os"; - - private OsTypeValues() {} - } - - public static final class TelemetrySdkLanguageValues { - /** cpp. */ - public static final String CPP = "cpp"; - - /** dotnet. */ - public static final String DOTNET = "dotnet"; - - /** erlang. */ - public static final String ERLANG = "erlang"; - - /** go. */ - public static final String GO = "go"; - - /** java. */ - public static final String JAVA = "java"; - - /** nodejs. */ - public static final String NODEJS = "nodejs"; - - /** php. */ - public static final String PHP = "php"; - - /** python. */ - public static final String PYTHON = "python"; - - /** ruby. */ - public static final String RUBY = "ruby"; - - /** rust. */ - public static final String RUST = "rust"; - - /** swift. */ - public static final String SWIFT = "swift"; - - /** webjs. */ - public static final String WEBJS = "webjs"; - - private TelemetrySdkLanguageValues() {} - } - - private IncubatingResourceAttributes() {} -} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingSemanticAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingSemanticAttributes.java deleted file mode 100644 index 0752811..0000000 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IncubatingSemanticAttributes.java +++ /dev/null @@ -1,2337 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv.incubating; - -import static io.opentelemetry.api.common.AttributeKey.booleanKey; -import static io.opentelemetry.api.common.AttributeKey.doubleKey; -import static io.opentelemetry.api.common.AttributeKey.longKey; -import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; -import static io.opentelemetry.api.common.AttributeKey.stringKey; -import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; -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 -// buildscripts/templates/SemanticAttributes.java.j2 -@SuppressWarnings("unused") -public final class IncubatingSemanticAttributes { - /** - * Destination address - domain name if available without reverse DNS lookup; otherwise, IP - * address or Unix domain socket name. - * - *

Notes: - * - *

    - *
  • When observed from the source side, and when communicating through an intermediary, - * {@code destination.address} SHOULD represent the destination address behind any - * intermediaries, for example proxies, if it's available. - *
- */ - public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address"); - - /** Destination port number */ - public static final AttributeKey DESTINATION_PORT = longKey("destination.port"); - - /** The exception message. */ - public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message"); - - /** - * A stacktrace as a string in the natural representation for the language runtime. The - * representation is to be determined and documented by each language SIG. - */ - public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace"); - - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of - * the exception should be preferred over the static type in languages that support it. - */ - public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type"); - - /** - * The name of the invoked function. - * - *

Notes: - * - *

    - *
  • SHOULD be equal to the {@code faas.name} resource attribute of the invoked function. - *
- */ - public static final AttributeKey FAAS_INVOKED_NAME = stringKey("faas.invoked_name"); - - /** - * The cloud provider of the invoked function. - * - *

Notes: - * - *

    - *
  • SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function. - *
- */ - public static final AttributeKey FAAS_INVOKED_PROVIDER = - stringKey("faas.invoked_provider"); - - /** - * The cloud region of the invoked function. - * - *

Notes: - * - *

    - *
  • SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function. - *
- */ - public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); - - /** Type of the trigger which caused this function invocation. */ - public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger"); - - /** - * The {@code service.name} of the remote service. - * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if - * any. - */ - public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); - - /** - * Username or client_id extracted from the access token or Authorization header in the inbound - * request from outside the system. - */ - public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); - - /** - * Actual/assumed role the client is making the request under extracted from token or application - * security context. - */ - public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role"); - - /** - * Scopes or granted authorities the client currently possesses extracted from token or - * application security context. The value would come from the scope associated with an OAuth 2.0 Access Token or an - * attribute value in a SAML - * 2.0 Assertion. - */ - public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope"); - - /** - * The domain identifies the business context for the events. - * - *

Notes: - * - *

    - *
  • Events across different domains may have same {@code event.name}, yet be unrelated - * events. - *
- */ - public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); - - /** The name identifies the event. */ - public static final AttributeKey EVENT_NAME = stringKey("event.name"); - - /** - * A unique identifier for the Log Record. - * - *

Notes: - * - *

    - *
  • If an id is provided, other log records with the same id will be considered duplicates - * and can be removed safely. This means, that two distinguishable log records MUST have - * different values. The id MAY be an Universally - * Unique Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. - * UUID) may be used as needed. - *
- */ - public static final AttributeKey LOG_RECORD_UID = stringKey("log.record.uid"); - - /** The stream associated with the log. See below for a list of well-known values. */ - public static final AttributeKey LOG_IOSTREAM = stringKey("log.iostream"); - - /** The basename of the file. */ - public static final AttributeKey LOG_FILE_NAME = stringKey("log.file.name"); - - /** The basename of the file, with symlinks resolved. */ - public static final AttributeKey LOG_FILE_NAME_RESOLVED = - stringKey("log.file.name_resolved"); - - /** The full path to the file. */ - public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path"); - - /** The full path to the file, with symlinks resolved. */ - public static final AttributeKey LOG_FILE_PATH_RESOLVED = - stringKey("log.file.path_resolved"); - - /** - * This attribute represents the state the application has transitioned into at the occurrence of - * the event. - * - *

Notes: - * - *

- */ - public static final AttributeKey IOS_STATE = stringKey("ios.state"); - - /** - * This attribute represents the state the application has transitioned into at the occurrence of - * the event. - * - *

Notes: - * - *

- */ - public static final AttributeKey ANDROID_STATE = stringKey("android.state"); - - /** - * The name of the connection pool; unique within the instrumented application. In case the - * connection pool implementation doesn't provide a name, then the db.connection_string - * should be used - */ - public static final AttributeKey POOL_NAME = stringKey("pool.name"); - - /** The state of a connection in the pool */ - public static final AttributeKey STATE = stringKey("state"); - - /** - * Name of the buffer pool. - * - *

Notes: - * - *

- */ - public static final AttributeKey JVM_BUFFER_POOL_NAME = stringKey("jvm.buffer.pool.name"); - - /** - * Name of the memory pool. - * - *

Notes: - * - *

- */ - public static final AttributeKey JVM_MEMORY_POOL_NAME = stringKey("jvm.memory.pool.name"); - - /** The type of memory. */ - public static final AttributeKey JVM_MEMORY_TYPE = stringKey("jvm.memory.type"); - - /** - * Name of the garbage collector action. - * - *

Notes: - * - *

- */ - public static final AttributeKey JVM_GC_ACTION = stringKey("jvm.gc.action"); - - /** - * Name of the garbage collector. - * - *

Notes: - * - *

- */ - public static final AttributeKey JVM_GC_NAME = stringKey("jvm.gc.name"); - - /** Whether the thread is daemon or not. */ - public static final AttributeKey JVM_THREAD_DAEMON = booleanKey("jvm.thread.daemon"); - - /** State of the thread. */ - public static final AttributeKey JVM_THREAD_STATE = stringKey("jvm.thread.state"); - - /** The device identifier */ - public static final AttributeKey SYSTEM_DEVICE = stringKey("system.device"); - - /** The logical CPU number [0..n-1] */ - public static final AttributeKey SYSTEM_CPU_LOGICAL_NUMBER = - longKey("system.cpu.logical_number"); - - /** The state of the CPU */ - public static final AttributeKey SYSTEM_CPU_STATE = stringKey("system.cpu.state"); - - /** The memory state */ - public static final AttributeKey SYSTEM_MEMORY_STATE = stringKey("system.memory.state"); - - /** The paging access direction */ - public static final AttributeKey SYSTEM_PAGING_DIRECTION = - stringKey("system.paging.direction"); - - /** The memory paging state */ - public static final AttributeKey SYSTEM_PAGING_STATE = stringKey("system.paging.state"); - - /** The memory paging type */ - public static final AttributeKey SYSTEM_PAGING_TYPE = stringKey("system.paging.type"); - - /** The disk operation direction */ - public static final AttributeKey SYSTEM_DISK_DIRECTION = - stringKey("system.disk.direction"); - - /** The filesystem mode */ - public static final AttributeKey SYSTEM_FILESYSTEM_MODE = - stringKey("system.filesystem.mode"); - - /** The filesystem mount path */ - public static final AttributeKey SYSTEM_FILESYSTEM_MOUNTPOINT = - stringKey("system.filesystem.mountpoint"); - - /** The filesystem state */ - public static final AttributeKey SYSTEM_FILESYSTEM_STATE = - stringKey("system.filesystem.state"); - - /** The filesystem type */ - public static final AttributeKey SYSTEM_FILESYSTEM_TYPE = - stringKey("system.filesystem.type"); - - /** */ - public static final AttributeKey SYSTEM_NETWORK_DIRECTION = - stringKey("system.network.direction"); - - /** A stateless protocol MUST NOT set this attribute */ - public static final AttributeKey SYSTEM_NETWORK_STATE = stringKey("system.network.state"); - - /** - * The process state, e.g., Linux Process State - * Codes - */ - public static final AttributeKey SYSTEM_PROCESSES_STATUS = - stringKey("system.processes.status"); - - /** - * The column number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_COLUMN = longKey("code.column"); - - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an - * absolute file path). - */ - public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); - - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); - - /** - * The line number in {@code code.filepath} best representing the operation. It SHOULD point - * within the code unit named in {@code code.function}. - */ - public static final AttributeKey CODE_LINENO = longKey("code.lineno"); - - /** - * The "namespace" within which {@code code.function} is defined. Usually the qualified - * class or module name, such that {@code code.namespace} + some separator + {@code code.function} - * form a unique identifier for the code unit. - */ - public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); - - /** - * The size of the request payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_REQUEST_BODY_SIZE = longKey("http.request.body.size"); - - /** - * The size of the response payload body in bytes. This is the number of bytes transferred - * excluding headers and is often, but not always, present as the Content-Length - * header. For requests using transport encoding, this should be the compressed size. - */ - public static final AttributeKey HTTP_RESPONSE_BODY_SIZE = - longKey("http.response.body.size"); - - /** - * The number of messages sent, received, or processed in the scope of the batching operation. - * - *

Notes: - * - *

    - *
  • Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that - * operate with a single message. When a messaging client library supports both batch and - * single-message API for the same operation, instrumentations SHOULD use {@code - * messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message - * APIs. - *
- */ - public static final AttributeKey MESSAGING_BATCH_MESSAGE_COUNT = - longKey("messaging.batch.message_count"); - - /** A unique identifier for the client that consumes or produces a message. */ - public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); - - /** - * A boolean that is true if the message destination is anonymous (could be unnamed or have - * auto-generated name). - */ - public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = - booleanKey("messaging.destination.anonymous"); - - /** - * The message destination name - * - *

Notes: - * - *

    - *
  • Destination name SHOULD uniquely identify a specific queue, topic or other entity within - * the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely - * identify the broker. - *
- */ - public static final AttributeKey MESSAGING_DESTINATION_NAME = - stringKey("messaging.destination.name"); - - /** - * Low cardinality representation of the messaging destination name - * - *

Notes: - * - *

    - *
  • Destination names could be constructed from templates. An example would be a destination - * name involving a user name or product id. Although the destination name in this case is - * of high cardinality, the underlying template is of low cardinality and can be effectively - * used for grouping and aggregation. - *
- */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = - stringKey("messaging.destination.template"); - - /** - * A boolean that is true if the message destination is temporary and might not exist anymore - * after messages are processed. - */ - public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = - booleanKey("messaging.destination.temporary"); - - /** - * A boolean that is true if the publish message destination is anonymous (could be unnamed or - * have auto-generated name). - */ - public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = - booleanKey("messaging.destination_publish.anonymous"); - - /** - * The name of the original destination the message was published to - * - *

Notes: - * - *

    - *
  • The name SHOULD uniquely identify a specific queue, topic, or other entity within the - * broker. If the broker doesn't have such notion, the original destination name SHOULD - * uniquely identify the broker. - *
- */ - public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_NAME = - stringKey("messaging.destination_publish.name"); - - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not - * producers. - */ - public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = - stringKey("messaging.kafka.consumer.group"); - - /** Partition the message is sent to. */ - public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = - longKey("messaging.kafka.destination.partition"); - - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the - * same partition. They differ from {@code messaging.message.id} in that they're not unique. If - * the key is {@code null}, the attribute MUST NOT be set. - * - *

Notes: - * - *

    - *
  • If the key type is not string, it's string representation has to be supplied for the - * attribute. If the key has no unambiguous, canonical string form, don't include its value. - *
- */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = - stringKey("messaging.kafka.message.key"); - - /** The offset of a record in the corresponding Kafka partition. */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = - longKey("messaging.kafka.message.offset"); - - /** A boolean that is true if the message is a tombstone. */ - public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = - booleanKey("messaging.kafka.message.tombstone"); - - /** - * The size of the message body in bytes. - * - *

Notes: - * - *

    - *
  • This can refer to both the compressed or uncompressed body size. If both sizes are known, - * the uncompressed body size should be used. - *
- */ - public static final AttributeKey MESSAGING_MESSAGE_BODY_SIZE = - longKey("messaging.message.body.size"); - - /** - * The conversation ID identifying the conversation to which the message belongs, represented as a - * string. Sometimes called "Correlation ID". - */ - public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = - stringKey("messaging.message.conversation_id"); - - /** - * The size of the message body and metadata in bytes. - * - *

Notes: - * - *

    - *
  • This can refer to both the compressed or uncompressed size. If both sizes are known, the - * uncompressed size should be used. - *
- */ - public static final AttributeKey MESSAGING_MESSAGE_ENVELOPE_SIZE = - longKey("messaging.message.envelope.size"); - - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); - - /** - * A string identifying the kind of messaging operation. - * - *

Notes: - * - *

    - *
  • If a custom value is used, it MUST be of low cardinality. - *
- */ - public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); - - /** RabbitMQ message routing key. */ - public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = - stringKey("messaging.rabbitmq.destination.routing_key"); - - /** - * Name of the RocketMQ producer/consumer group that is handling the message. The client type is - * identified by the SpanKind. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = - stringKey("messaging.rocketmq.client_group"); - - /** Model of message consumption. This only applies to consumer spans. */ - public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = - stringKey("messaging.rocketmq.consumption_model"); - - /** The delay time level for delay message, which determines the message delay time. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = - longKey("messaging.rocketmq.message.delay_time_level"); - - /** - * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = - longKey("messaging.rocketmq.message.delivery_timestamp"); - - /** - * It is essential for FIFO message. Messages that belong to the same message group are always - * processed one by one within the same consumer group. - */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = - stringKey("messaging.rocketmq.message.group"); - - /** Key(s) of message, another way to mark message besides message id. */ - public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = - stringArrayKey("messaging.rocketmq.message.keys"); - - /** The secondary classifier of message besides topic. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = - stringKey("messaging.rocketmq.message.tag"); - - /** Type of message. */ - public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = - stringKey("messaging.rocketmq.message.type"); - - /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ - public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = - stringKey("messaging.rocketmq.namespace"); - - /** A string identifying the messaging system. */ - public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); - - /** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ - public static final AttributeKey NETWORK_CARRIER_ICC = stringKey("network.carrier.icc"); - - /** The mobile carrier country code. */ - public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); - - /** The mobile carrier network code. */ - public static final AttributeKey NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc"); - - /** The name of the mobile carrier. */ - public static final AttributeKey NETWORK_CARRIER_NAME = stringKey("network.carrier.name"); - - /** - * This describes more details regarding the connection.type. It may be the type of cell - * technology connection, but it could be used for describing details about a wifi connection. - */ - public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = - stringKey("network.connection.subtype"); - - /** The internet connection type. */ - public static final AttributeKey NETWORK_CONNECTION_TYPE = - stringKey("network.connection.type"); - - /** - * The error codes of the Connect - * request. Error codes are always string values. - */ - public static final AttributeKey RPC_CONNECT_RPC_ERROR_CODE = - stringKey("rpc.connect_rpc.error_code"); - - /** - * The numeric status - * code of the gRPC request. - */ - public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); - - /** {@code error.code} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); - - /** {@code error.message} property of response if it is an error response. */ - public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = - stringKey("rpc.jsonrpc.error_message"); - - /** - * {@code id} property of request or response. Since protocol allows id to be int, string, {@code - * null} or missing (for notifications), value is expected to be cast to string for simplicity. - * Use empty string in case of {@code null} value. Omit entirely if this is a notification. - */ - public static final AttributeKey RPC_JSONRPC_REQUEST_ID = - stringKey("rpc.jsonrpc.request_id"); - - /** - * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 doesn't - * specify this, the value can be omitted. - */ - public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); - - /** - * The name of the (logical) method being called, must be equal to the $method part in the span - * name. - * - *

Notes: - * - *

    - *
  • This is the logical name of the method from the RPC interface perspective, which can be - * different from the name of any implementing method/function. The {@code code.function} - * attribute may be used to store the latter (e.g., method actually executing the call on - * the server side, RPC client stub method on the client side). - *
- */ - public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); - - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - *

Notes: - * - *

    - *
  • This is the logical name of the service from the RPC interface perspective, which can be - * different from the name of any implementing class. The {@code code.namespace} attribute - * may be used to store the latter (despite the attribute name, it may include a class name; - * e.g., class with method actually executing the call on the server side, RPC client stub - * class on the client side). - *
- */ - public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); - - /** A string identifying the remoting system. See below for a list of well-known identifiers. */ - public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); - - /** Current "managed" thread ID (as opposed to OS thread ID). */ - public static final AttributeKey THREAD_ID = longKey("thread.id"); - - /** Current thread name. */ - public static final AttributeKey THREAD_NAME = stringKey("thread.name"); - - /** A unique id to identify a session. */ - public static final AttributeKey SESSION_ID = stringKey("session.id"); - - /** The previous {@code session.id} for this user, when known. */ - public static final AttributeKey SESSION_PREVIOUS_ID = stringKey("session.previous_id"); - - /** - * Source address - domain name if available without reverse DNS lookup; otherwise, IP address or - * Unix domain socket name. - * - *

Notes: - * - *

    - *
  • When observed from the destination side, and when communicating through an intermediary, - * {@code source.address} SHOULD represent the source address behind any intermediaries, for - * example proxies, if it's available. - *
- */ - public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); - - /** Source port number */ - public static final AttributeKey SOURCE_PORT = longKey("source.port"); - - /** - * 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} - * applicable). - * - *

Notes: - * - *

    - *
  • This may be different from {@code cloud.resource_id} if an alias is involved. - *
- */ - public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = - stringKey("aws.lambda.invoked_arn"); - - /** - * The event_id - * uniquely identifies the event. - */ - public static final AttributeKey CLOUDEVENTS_EVENT_ID = stringKey("cloudevents.event_id"); - - /** - * The source - * identifies the context in which an event happened. - */ - public static final AttributeKey CLOUDEVENTS_EVENT_SOURCE = - stringKey("cloudevents.event_source"); - - /** - * The version - * of the CloudEvents specification which the event uses. - */ - public static final AttributeKey CLOUDEVENTS_EVENT_SPEC_VERSION = - stringKey("cloudevents.event_spec_version"); - - /** - * The subject - * of the event in the context of the event producer (identified by source). - */ - public static final AttributeKey CLOUDEVENTS_EVENT_SUBJECT = - stringKey("cloudevents.event_subject"); - - /** - * The event_type - * contains a value describing the type of event related to the originating occurrence. - */ - public static final AttributeKey CLOUDEVENTS_EVENT_TYPE = - stringKey("cloudevents.event_type"); - - /** - * Parent-child Reference type - * - *

Notes: - * - *

    - *
  • The causal relationship between a child Span and a parent Span. - *
- */ - public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); - - /** - * The connection string used to connect to the database. It is recommended to remove embedded - * credentials. - */ - public static final AttributeKey DB_CONNECTION_STRING = stringKey("db.connection_string"); - - /** - * The fully-qualified class name of the Java Database Connectivity - * (JDBC) driver used to connect. - */ - public static final AttributeKey DB_JDBC_DRIVER_CLASSNAME = - stringKey("db.jdbc.driver_classname"); - - /** - * This attribute is used to report the name of the database being accessed. For commands that - * switch the database, this should be set to the target database (even if the command fails). - * - *

Notes: - * - *

    - *
  • In some SQL databases, the database name to be used is called "schema name". In - * case there are multiple layers that could be considered for database name (e.g. Oracle - * instance name and schema name), the database name to be used is the more specific layer - * (e.g. Oracle schema name). - *
- */ - public static final AttributeKey DB_NAME = stringKey("db.name"); - - /** - * The name of the operation being executed, e.g. the MongoDB command - * name such as {@code findAndModify}, or the SQL keyword. - * - *

Notes: - * - *

    - *
  • When setting this to an SQL keyword, it is not recommended to attempt any client-side - * parsing of {@code db.statement} just to get this property, but it should be set if the - * operation name is provided by the library being instrumented. If the SQL statement has an - * ambiguous operation, or performs more than one operation, this value may be omitted. - *
- */ - public static final AttributeKey DB_OPERATION = stringKey("db.operation"); - - /** The database statement being executed. */ - public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); - - /** - * An identifier for the database management system (DBMS) product being used. See below for a - * list of well-known identifiers. - */ - public static final AttributeKey DB_SYSTEM = stringKey("db.system"); - - /** Username for accessing the database. */ - public static final AttributeKey DB_USER = stringKey("db.user"); - - /** - * The Microsoft SQL Server instance - * name connecting to. This name is used to determine the port of a named instance. - * - *

Notes: - * - *

    - *
  • If setting a {@code db.mssql.instance_name}, {@code server.port} is no longer required - * (but still recommended if non-standard). - *
- */ - public static final AttributeKey DB_MSSQL_INSTANCE_NAME = - stringKey("db.mssql.instance_name"); - - /** - * The consistency level of the query. Based on consistency values from CQL. - */ - public static final AttributeKey DB_CASSANDRA_CONSISTENCY_LEVEL = - stringKey("db.cassandra.consistency_level"); - - /** The data center of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_DC = - stringKey("db.cassandra.coordinator.dc"); - - /** The ID of the coordinating node for a query. */ - public static final AttributeKey DB_CASSANDRA_COORDINATOR_ID = - stringKey("db.cassandra.coordinator.id"); - - /** Whether or not the query is idempotent. */ - public static final AttributeKey DB_CASSANDRA_IDEMPOTENCE = - booleanKey("db.cassandra.idempotence"); - - /** The fetch size used for paging, i.e. how many rows will be returned at once. */ - public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); - - /** - * The number of times a query was speculatively executed. Not set or {@code 0} if the query was - * not executed speculatively. - */ - public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = - longKey("db.cassandra.speculative_execution_count"); - - /** - * The name of the primary table that the operation is acting upon, including the keyspace name - * (if applicable). - * - *

Notes: - * - *

    - *
  • This mirrors the db.sql.table attribute but references cassandra rather than sql. It is - * not recommended to attempt any client-side parsing of {@code db.statement} just to get - * this property, but it should be set if it is provided by the library being instrumented. - * If the operation is acting upon an anonymous table, or more than one table, this value - * MUST NOT be set. - *
- */ - public static final AttributeKey DB_CASSANDRA_TABLE = stringKey("db.cassandra.table"); - - /** - * The index of the database being accessed as used in the {@code SELECT} command, provided as an integer. To - * be used instead of the generic {@code db.name} attribute. - */ - public static final AttributeKey DB_REDIS_DATABASE_INDEX = - longKey("db.redis.database_index"); - - /** The collection being accessed within the database stated in {@code db.name}. */ - public static final AttributeKey DB_MONGODB_COLLECTION = - stringKey("db.mongodb.collection"); - - /** Represents the identifier of an Elasticsearch cluster. */ - public static final AttributeKey DB_ELASTICSEARCH_CLUSTER_NAME = - stringKey("db.elasticsearch.cluster.name"); - - /** - * Represents the human-readable identifier of the node/instance to which a request was routed. - */ - public static final AttributeKey DB_ELASTICSEARCH_NODE_NAME = - stringKey("db.elasticsearch.node.name"); - - /** - * The name of the primary table that the operation is acting upon, including the database name - * (if applicable). - * - *

Notes: - * - *

    - *
  • It is not recommended to attempt any client-side parsing of {@code db.statement} just to - * get this property, but it should be set if it is provided by the library being - * instrumented. If the operation is acting upon an anonymous table, or more than one table, - * this value MUST NOT be set. - *
- */ - public static final AttributeKey DB_SQL_TABLE = stringKey("db.sql.table"); - - /** Unique Cosmos client instance id. */ - public static final AttributeKey DB_COSMOSDB_CLIENT_ID = - stringKey("db.cosmosdb.client_id"); - - /** Cosmos client connection mode. */ - public static final AttributeKey DB_COSMOSDB_CONNECTION_MODE = - stringKey("db.cosmosdb.connection_mode"); - - /** Cosmos DB container name. */ - public static final AttributeKey DB_COSMOSDB_CONTAINER = - stringKey("db.cosmosdb.container"); - - /** CosmosDB Operation Type. */ - public static final AttributeKey DB_COSMOSDB_OPERATION_TYPE = - stringKey("db.cosmosdb.operation_type"); - - /** RU consumed for that operation */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CHARGE = - doubleKey("db.cosmosdb.request_charge"); - - /** Request payload size in bytes */ - public static final AttributeKey DB_COSMOSDB_REQUEST_CONTENT_LENGTH = - longKey("db.cosmosdb.request_content_length"); - - /** Cosmos DB status code. */ - public static final AttributeKey DB_COSMOSDB_STATUS_CODE = - longKey("db.cosmosdb.status_code"); - - /** Cosmos DB sub status code. */ - public static final AttributeKey DB_COSMOSDB_SUB_STATUS_CODE = - longKey("db.cosmosdb.sub_status_code"); - - /** - * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status - * code is UNSET. - */ - public static final AttributeKey OTEL_STATUS_CODE = stringKey("otel.status_code"); - - /** Description of the Status if it has a value, otherwise not set. */ - public static final AttributeKey OTEL_STATUS_DESCRIPTION = - stringKey("otel.status_description"); - - /** The invocation ID of the current function invocation. */ - public static final AttributeKey FAAS_INVOCATION_ID = stringKey("faas.invocation_id"); - - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud - * Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - public static final AttributeKey FAAS_DOCUMENT_COLLECTION = - stringKey("faas.document.collection"); - - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the - * name of the file, and in Cosmos DB the table name. - */ - public static final AttributeKey FAAS_DOCUMENT_NAME = stringKey("faas.document.name"); - - /** Describes the type of the operation that was performed on the data. */ - public static final AttributeKey FAAS_DOCUMENT_OPERATION = - stringKey("faas.document.operation"); - - /** - * A string containing the time when the data was accessed in the ISO 8601 format expressed in - * UTC. - */ - public static final AttributeKey FAAS_DOCUMENT_TIME = stringKey("faas.document.time"); - - /** - * A string containing the schedule period as Cron - * Expression. - */ - public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); - - /** - * A string containing the function invocation time in the ISO 8601 format expressed in - * UTC. - */ - public static final AttributeKey FAAS_TIME = stringKey("faas.time"); - - /** - * A boolean that is true if the serverless function is executed for the first time (aka - * cold-start). - */ - public static final AttributeKey FAAS_COLDSTART = booleanKey("faas.coldstart"); - - /** The unique identifier of the feature flag. */ - public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); - - /** The name of the service provider that performs the flag evaluation. */ - public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = - stringKey("feature_flag.provider_name"); - - /** - * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of - * the value can be used. - * - *

Notes: - * - *

    - *
  • A semantic identifier, commonly referred to as a variant, provides a means for referring - * to a value without including the value itself. This can provide additional context for - * understanding the meaning behind a value. For example, the variant {@code red} maybe be - * used for the value {@code #c05543}. - *
  • A stringified version of the value can be used in situations where a semantic identifier - * is unavailable. String representation of the value should be determined by the - * implementer. - *
- */ - public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); - - /** - * The AWS request ID as returned in the response headers {@code x-amz-request-id} or {@code - * x-amz-requestid}. - */ - public static final AttributeKey AWS_REQUEST_ID = stringKey("aws.request_id"); - - /** The value of the {@code AttributesToGet} request parameter. */ - public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = - stringArrayKey("aws.dynamodb.attributes_to_get"); - - /** The value of the {@code ConsistentRead} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = - booleanKey("aws.dynamodb.consistent_read"); - - /** The JSON-serialized value of each item in the {@code ConsumedCapacity} response field. */ - public static final AttributeKey> AWS_DYNAMODB_CONSUMED_CAPACITY = - stringArrayKey("aws.dynamodb.consumed_capacity"); - - /** The value of the {@code IndexName} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = - stringKey("aws.dynamodb.index_name"); - - /** The JSON-serialized value of the {@code ItemCollectionMetrics} response field. */ - public static final AttributeKey AWS_DYNAMODB_ITEM_COLLECTION_METRICS = - stringKey("aws.dynamodb.item_collection_metrics"); - - /** The value of the {@code Limit} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); - - /** The value of the {@code ProjectionExpression} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROJECTION = - stringKey("aws.dynamodb.projection"); - - /** The value of the {@code ProvisionedThroughput.ReadCapacityUnits} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = - doubleKey("aws.dynamodb.provisioned_read_capacity"); - - /** The value of the {@code ProvisionedThroughput.WriteCapacityUnits} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = - doubleKey("aws.dynamodb.provisioned_write_capacity"); - - /** The value of the {@code Select} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select"); - - /** The keys in the {@code RequestItems} object field. */ - public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = - stringArrayKey("aws.dynamodb.table_names"); - - /** The JSON-serialized value of each item of the {@code GlobalSecondaryIndexes} request field */ - public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = - stringArrayKey("aws.dynamodb.global_secondary_indexes"); - - /** The JSON-serialized value of each item of the {@code LocalSecondaryIndexes} request field. */ - public static final AttributeKey> AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = - stringArrayKey("aws.dynamodb.local_secondary_indexes"); - - /** The value of the {@code ExclusiveStartTableName} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_EXCLUSIVE_START_TABLE = - stringKey("aws.dynamodb.exclusive_start_table"); - - /** The the number of items in the {@code TableNames} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_TABLE_COUNT = - longKey("aws.dynamodb.table_count"); - - /** The value of the {@code ScanIndexForward} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = - booleanKey("aws.dynamodb.scan_forward"); - - /** The value of the {@code Count} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); - - /** The value of the {@code ScannedCount} response parameter. */ - public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = - longKey("aws.dynamodb.scanned_count"); - - /** The value of the {@code Segment} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); - - /** The value of the {@code TotalSegments} request parameter. */ - public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = - longKey("aws.dynamodb.total_segments"); - - /** 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"); - - /** - * The JSON-serialized value of each item in the the {@code GlobalSecondaryIndexUpdates} request - * field. - */ - public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = - stringArrayKey("aws.dynamodb.global_secondary_index_updates"); - - /** - * The S3 bucket name the request refers to. Corresponds to the {@code --bucket} parameter of the - * S3 API - * operations. - * - *

Notes: - * - *

    - *
  • The {@code bucket} attribute is applicable to all S3 operations that reference a bucket, - * i.e. that require the bucket name as a mandatory parameter. This applies to almost all S3 - * operations except {@code list-buckets}. - *
- */ - public static final AttributeKey AWS_S3_BUCKET = stringKey("aws.s3.bucket"); - - /** - * The source object (in the form {@code bucket}/{@code key}) for the copy operation. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_COPY_SOURCE = stringKey("aws.s3.copy_source"); - - /** - * The delete request container that specifies the objects to be deleted. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_DELETE = stringKey("aws.s3.delete"); - - /** - * The S3 object key the request refers to. Corresponds to the {@code --key} parameter of the S3 API operations. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_KEY = stringKey("aws.s3.key"); - - /** - * The part number of the part being uploaded in a multipart-upload operation. This is a positive - * integer between 1 and 10,000. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_PART_NUMBER = longKey("aws.s3.part_number"); - - /** - * Upload ID that identifies the multipart upload. - * - *

Notes: - * - *

- */ - public static final AttributeKey AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id"); - - /** - * The GraphQL document being executed. - * - *

Notes: - * - *

    - *
  • The value may be sanitized to exclude sensitive information. - *
- */ - public static final AttributeKey GRAPHQL_DOCUMENT = stringKey("graphql.document"); - - /** The name of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_NAME = - stringKey("graphql.operation.name"); - - /** The type of the operation being executed. */ - public static final AttributeKey GRAPHQL_OPERATION_TYPE = - stringKey("graphql.operation.type"); - - /** Compressed size of the message in bytes. */ - public static final AttributeKey MESSAGE_COMPRESSED_SIZE = - longKey("message.compressed_size"); - - /** - * MUST be calculated as two different counters starting from {@code 1} one for sent messages and - * one for received message. - * - *

Notes: - * - *

    - *
  • This way we guarantee that the values will be consistent between different - * implementations. - *
- */ - public static final AttributeKey MESSAGE_ID = longKey("message.id"); - - /** Whether this is a received or sent message. */ - public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); - - /** Uncompressed size of the message in bytes. */ - public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = - longKey("message.uncompressed_size"); - - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the - * exception is escaping the scope of the span. - * - *

Notes: - * - *

    - *
  • An exception is considered to have escaped (or left) the scope of a span, if that span is - * ended while the exception is still logically "in flight". This may be actually - * "in flight" in some languages (e.g. if the exception is passed to a Context - * manager's {@code __exit__} method in Python) but will usually be caught at the point of - * recording the exception in most languages. - *
  • It is usually not possible to determine at the point where an exception is thrown whether - * it will escape the scope of a span. However, it is trivial to know that an exception will - * escape, if one checks for an active exception just before ending the span, as done in the - * example above. - *
  • It follows that an exception may still escape the scope of the span even if the {@code - * exception.escaped} attribute was not set or set to false, since the event might have been - * recorded at a time where it was not clear whether the exception will escape. - *
- */ - public static final AttributeKey EXCEPTION_ESCAPED = booleanKey("exception.escaped"); - - /** - * Connect request metadata, {@code } being the normalized Connect Metadata key (lowercase), - * the value being the metadata values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> RPC_CONNECT_RPC_REQUEST_METADATA = - stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); - - /** - * Connect response metadata, {@code } being the normalized Connect Metadata key (lowercase), - * the value being the metadata values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> RPC_CONNECT_RPC_RESPONSE_METADATA = - stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); - - /** - * gRPC request metadata, {@code } being the normalized gRPC Metadata key (lowercase), the - * value being the metadata values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> RPC_GRPC_REQUEST_METADATA = - stringArrayKeyTemplate("rpc.grpc.request.metadata"); - - /** - * gRPC response metadata, {@code } being the normalized gRPC Metadata key (lowercase), the - * value being the metadata values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> RPC_GRPC_RESPONSE_METADATA = - stringArrayKeyTemplate("rpc.grpc.response.metadata"); - - /** - * A dynamic value in the url path. - * - *

Notes: - * - *

    - *
  • Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span - * attributes in the format {@code db.elasticsearch.path_parts.}, where {@code } - * is the url path part name. The implementation SHOULD reference the elasticsearch - * schema in order to map the path part values to their names. - *
- */ - public static final AttributeKeyTemplate DB_ELASTICSEARCH_PATH_PARTS = - stringKeyTemplate("db.elasticsearch.path_parts"); - - // Enum definitions - public static final class FaasInvokedProviderValues { - /** Alibaba Cloud. */ - public static final String ALIBABA_CLOUD = "alibaba_cloud"; - - /** Amazon Web Services. */ - public static final String AWS = "aws"; - - /** Microsoft Azure. */ - public static final String AZURE = "azure"; - - /** Google Cloud Platform. */ - public static final String GCP = "gcp"; - - /** Tencent Cloud. */ - public static final String TENCENT_CLOUD = "tencent_cloud"; - - private FaasInvokedProviderValues() {} - } - - public static final class FaasTriggerValues { - /** A response to some data source operation such as a database or filesystem read/write. */ - public static final String DATASOURCE = "datasource"; - - /** To provide an answer to an inbound HTTP request. */ - public static final String HTTP = "http"; - - /** A function is set to be executed when messages are sent to a messaging system. */ - public static final String PUBSUB = "pubsub"; - - /** A function is scheduled to be executed regularly. */ - public static final String TIMER = "timer"; - - /** If none of the others apply. */ - public static final String OTHER = "other"; - - private FaasTriggerValues() {} - } - - public static final class EventDomainValues { - /** Events from browser apps. */ - public static final String BROWSER = "browser"; - - /** Events from mobile apps. */ - public static final String DEVICE = "device"; - - /** Events from Kubernetes. */ - public static final String K8S = "k8s"; - - private EventDomainValues() {} - } - - public static final class LogIostreamValues { - /** Logs from stdout stream. */ - public static final String STDOUT = "stdout"; - - /** Events from stderr stream. */ - public static final String STDERR = "stderr"; - - private LogIostreamValues() {} - } - - public static final class IosStateValues { - /** - * The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. - */ - public static final String ACTIVE = "active"; - - /** - * The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. - */ - public static final String INACTIVE = "inactive"; - - /** - * The app is now in the background. This value is associated with UIKit notification - * `applicationDidEnterBackground`. - */ - public static final String BACKGROUND = "background"; - - /** - * The app is now in the foreground. This value is associated with UIKit notification - * `applicationWillEnterForeground`. - */ - public static final String FOREGROUND = "foreground"; - - /** - * The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. - */ - public static final String TERMINATE = "terminate"; - - private IosStateValues() {} - } - - public static final class AndroidStateValues { - /** - * Any time before Activity.onResume() or, if the app has no Activity, Context.startService() - * has been called in the app for the first time. - */ - public static final String CREATED = "created"; - - /** - * Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has - * been called when the app was in the foreground state. - */ - public static final String BACKGROUND = "background"; - - /** - * Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has - * been called when the app was in either the created or background states. - */ - public static final String FOREGROUND = "foreground"; - - private AndroidStateValues() {} - } - - public static final class StateValues { - /** idle. */ - public static final String IDLE = "idle"; - - /** used. */ - public static final String USED = "used"; - - private StateValues() {} - } - - public static final class JvmMemoryTypeValues { - /** Heap memory. */ - public static final String HEAP = "heap"; - - /** Non-heap memory. */ - public static final String NON_HEAP = "non_heap"; - - private JvmMemoryTypeValues() {} - } - - public static final class JvmThreadStateValues { - /** A thread that has not yet started is in this state. */ - public static final String NEW = "new"; - - /** A thread executing in the Java virtual machine is in this state. */ - public static final String RUNNABLE = "runnable"; - - /** A thread that is blocked waiting for a monitor lock is in this state. */ - public static final String BLOCKED = "blocked"; - - /** - * A thread that is waiting indefinitely for another thread to perform a particular action is in - * this state. - */ - public static final String WAITING = "waiting"; - - /** - * A thread that is waiting for another thread to perform an action for up to a specified - * waiting time is in this state. - */ - public static final String TIMED_WAITING = "timed_waiting"; - - /** A thread that has exited is in this state. */ - public static final String TERMINATED = "terminated"; - - private JvmThreadStateValues() {} - } - - public static final class SystemCpuStateValues { - /** user. */ - public static final String USER = "user"; - - /** system. */ - public static final String SYSTEM = "system"; - - /** nice. */ - public static final String NICE = "nice"; - - /** idle. */ - public static final String IDLE = "idle"; - - /** iowait. */ - public static final String IOWAIT = "iowait"; - - /** interrupt. */ - public static final String INTERRUPT = "interrupt"; - - /** steal. */ - public static final String STEAL = "steal"; - - private SystemCpuStateValues() {} - } - - public static final class SystemMemoryStateValues { - /** used. */ - public static final String USED = "used"; - - /** free. */ - public static final String FREE = "free"; - - /** shared. */ - public static final String SHARED = "shared"; - - /** buffers. */ - public static final String BUFFERS = "buffers"; - - /** cached. */ - public static final String CACHED = "cached"; - - private SystemMemoryStateValues() {} - } - - public static final class SystemPagingDirectionValues { - /** in. */ - public static final String IN = "in"; - - /** out. */ - public static final String OUT = "out"; - - private SystemPagingDirectionValues() {} - } - - public static final class SystemPagingStateValues { - /** used. */ - public static final String USED = "used"; - - /** free. */ - public static final String FREE = "free"; - - private SystemPagingStateValues() {} - } - - public static final class SystemPagingTypeValues { - /** major. */ - public static final String MAJOR = "major"; - - /** minor. */ - public static final String MINOR = "minor"; - - private SystemPagingTypeValues() {} - } - - public static final class SystemDiskDirectionValues { - /** read. */ - public static final String READ = "read"; - - /** write. */ - public static final String WRITE = "write"; - - private SystemDiskDirectionValues() {} - } - - public static final class SystemFilesystemStateValues { - /** used. */ - public static final String USED = "used"; - - /** free. */ - public static final String FREE = "free"; - - /** reserved. */ - public static final String RESERVED = "reserved"; - - private SystemFilesystemStateValues() {} - } - - public static final class SystemFilesystemTypeValues { - /** fat32. */ - public static final String FAT32 = "fat32"; - - /** exfat. */ - public static final String EXFAT = "exfat"; - - /** ntfs. */ - public static final String NTFS = "ntfs"; - - /** refs. */ - public static final String REFS = "refs"; - - /** hfsplus. */ - public static final String HFSPLUS = "hfsplus"; - - /** ext4. */ - public static final String EXT4 = "ext4"; - - private SystemFilesystemTypeValues() {} - } - - public static final class SystemNetworkDirectionValues { - /** transmit. */ - public static final String TRANSMIT = "transmit"; - - /** receive. */ - public static final String RECEIVE = "receive"; - - private SystemNetworkDirectionValues() {} - } - - public static final class SystemNetworkStateValues { - /** close. */ - public static final String CLOSE = "close"; - - /** close_wait. */ - public static final String CLOSE_WAIT = "close_wait"; - - /** closing. */ - public static final String CLOSING = "closing"; - - /** delete. */ - public static final String DELETE = "delete"; - - /** established. */ - public static final String ESTABLISHED = "established"; - - /** fin_wait_1. */ - public static final String FIN_WAIT_1 = "fin_wait_1"; - - /** fin_wait_2. */ - public static final String FIN_WAIT_2 = "fin_wait_2"; - - /** last_ack. */ - public static final String LAST_ACK = "last_ack"; - - /** listen. */ - public static final String LISTEN = "listen"; - - /** syn_recv. */ - public static final String SYN_RECV = "syn_recv"; - - /** syn_sent. */ - public static final String SYN_SENT = "syn_sent"; - - /** time_wait. */ - public static final String TIME_WAIT = "time_wait"; - - private SystemNetworkStateValues() {} - } - - public static final class SystemProcessesStatusValues { - /** running. */ - public static final String RUNNING = "running"; - - /** sleeping. */ - public static final String SLEEPING = "sleeping"; - - /** stopped. */ - public static final String STOPPED = "stopped"; - - /** defunct. */ - public static final String DEFUNCT = "defunct"; - - private SystemProcessesStatusValues() {} - } - - public static final class MessagingOperationValues { - /** - * One or more messages are provided for publishing to an intermediary. If a single message is - * published, the context of the "Publish" span can be used as the creation context and - * no "Create" span needs to be created. - */ - public static final String PUBLISH = "publish"; - - /** - * A message is created. "Create" spans always refer to a single message and are used to - * provide a unique creation context for messages in batch publishing scenarios. - */ - public static final String CREATE = "create"; - - /** - * One or more messages are requested by a consumer. This operation refers to pull-based - * scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. - */ - public static final String RECEIVE = "receive"; - - /** - * One or more messages are passed to a consumer. This operation refers to push-based scenarios, - * where consumer register callbacks which get called by messaging SDKs. - */ - public static final String DELIVER = "deliver"; - - private MessagingOperationValues() {} - } - - public static final class MessagingRocketmqConsumptionModelValues { - /** Clustering consumption model. */ - public static final String CLUSTERING = "clustering"; - - /** Broadcasting consumption model. */ - public static final String BROADCASTING = "broadcasting"; - - private MessagingRocketmqConsumptionModelValues() {} - } - - public static final class MessagingRocketmqMessageTypeValues { - /** Normal message. */ - public static final String NORMAL = "normal"; - - /** FIFO message. */ - public static final String FIFO = "fifo"; - - /** Delay message. */ - public static final String DELAY = "delay"; - - /** Transaction message. */ - public static final String TRANSACTION = "transaction"; - - private MessagingRocketmqMessageTypeValues() {} - } - - public static final class NetworkConnectionSubtypeValues { - /** GPRS. */ - public static final String GPRS = "gprs"; - - /** EDGE. */ - public static final String EDGE = "edge"; - - /** UMTS. */ - public static final String UMTS = "umts"; - - /** CDMA. */ - public static final String CDMA = "cdma"; - - /** EVDO Rel. 0. */ - public static final String EVDO_0 = "evdo_0"; - - /** EVDO Rev. A. */ - public static final String EVDO_A = "evdo_a"; - - /** CDMA2000 1XRTT. */ - public static final String CDMA2000_1XRTT = "cdma2000_1xrtt"; - - /** HSDPA. */ - public static final String HSDPA = "hsdpa"; - - /** HSUPA. */ - public static final String HSUPA = "hsupa"; - - /** HSPA. */ - public static final String HSPA = "hspa"; - - /** IDEN. */ - public static final String IDEN = "iden"; - - /** EVDO Rev. B. */ - public static final String EVDO_B = "evdo_b"; - - /** LTE. */ - public static final String LTE = "lte"; - - /** EHRPD. */ - public static final String EHRPD = "ehrpd"; - - /** HSPAP. */ - public static final String HSPAP = "hspap"; - - /** GSM. */ - public static final String GSM = "gsm"; - - /** TD-SCDMA. */ - public static final String TD_SCDMA = "td_scdma"; - - /** IWLAN. */ - public static final String IWLAN = "iwlan"; - - /** 5G NR (New Radio). */ - public static final String NR = "nr"; - - /** 5G NRNSA (New Radio Non-Standalone). */ - public static final String NRNSA = "nrnsa"; - - /** LTE CA. */ - public static final String LTE_CA = "lte_ca"; - - private NetworkConnectionSubtypeValues() {} - } - - public static final class NetworkConnectionTypeValues { - /** wifi. */ - public static final String WIFI = "wifi"; - - /** wired. */ - public static final String WIRED = "wired"; - - /** cell. */ - public static final String CELL = "cell"; - - /** unavailable. */ - public static final String UNAVAILABLE = "unavailable"; - - /** unknown. */ - public static final String UNKNOWN = "unknown"; - - private NetworkConnectionTypeValues() {} - } - - public static final class RpcConnectRpcErrorCodeValues { - /** cancelled. */ - public static final String CANCELLED = "cancelled"; - - /** unknown. */ - public static final String UNKNOWN = "unknown"; - - /** invalid_argument. */ - public static final String INVALID_ARGUMENT = "invalid_argument"; - - /** deadline_exceeded. */ - public static final String DEADLINE_EXCEEDED = "deadline_exceeded"; - - /** not_found. */ - public static final String NOT_FOUND = "not_found"; - - /** already_exists. */ - public static final String ALREADY_EXISTS = "already_exists"; - - /** permission_denied. */ - public static final String PERMISSION_DENIED = "permission_denied"; - - /** resource_exhausted. */ - public static final String RESOURCE_EXHAUSTED = "resource_exhausted"; - - /** failed_precondition. */ - public static final String FAILED_PRECONDITION = "failed_precondition"; - - /** aborted. */ - public static final String ABORTED = "aborted"; - - /** out_of_range. */ - public static final String OUT_OF_RANGE = "out_of_range"; - - /** unimplemented. */ - public static final String UNIMPLEMENTED = "unimplemented"; - - /** internal. */ - public static final String INTERNAL = "internal"; - - /** unavailable. */ - public static final String UNAVAILABLE = "unavailable"; - - /** data_loss. */ - public static final String DATA_LOSS = "data_loss"; - - /** unauthenticated. */ - public static final String UNAUTHENTICATED = "unauthenticated"; - - private RpcConnectRpcErrorCodeValues() {} - } - - public static final class RpcGrpcStatusCodeValues { - /** OK. */ - public static final long OK = 0; - - /** CANCELLED. */ - public static final long CANCELLED = 1; - - /** UNKNOWN. */ - public static final long UNKNOWN = 2; - - /** INVALID_ARGUMENT. */ - public static final long INVALID_ARGUMENT = 3; - - /** DEADLINE_EXCEEDED. */ - public static final long DEADLINE_EXCEEDED = 4; - - /** NOT_FOUND. */ - public static final long NOT_FOUND = 5; - - /** ALREADY_EXISTS. */ - public static final long ALREADY_EXISTS = 6; - - /** PERMISSION_DENIED. */ - public static final long PERMISSION_DENIED = 7; - - /** RESOURCE_EXHAUSTED. */ - public static final long RESOURCE_EXHAUSTED = 8; - - /** FAILED_PRECONDITION. */ - public static final long FAILED_PRECONDITION = 9; - - /** ABORTED. */ - public static final long ABORTED = 10; - - /** OUT_OF_RANGE. */ - public static final long OUT_OF_RANGE = 11; - - /** UNIMPLEMENTED. */ - public static final long UNIMPLEMENTED = 12; - - /** INTERNAL. */ - public static final long INTERNAL = 13; - - /** UNAVAILABLE. */ - public static final long UNAVAILABLE = 14; - - /** DATA_LOSS. */ - public static final long DATA_LOSS = 15; - - /** UNAUTHENTICATED. */ - public static final long UNAUTHENTICATED = 16; - - private RpcGrpcStatusCodeValues() {} - } - - public static final class RpcSystemValues { - /** gRPC. */ - public static final String GRPC = "grpc"; - - /** Java RMI. */ - public static final String JAVA_RMI = "java_rmi"; - - /** .NET WCF. */ - public static final String DOTNET_WCF = "dotnet_wcf"; - - /** Apache Dubbo. */ - public static final String APACHE_DUBBO = "apache_dubbo"; - - /** Connect RPC. */ - public static final String CONNECT_RPC = "connect_rpc"; - - private RpcSystemValues() {} - } - - public static final class OpentracingRefTypeValues { - /** The parent Span depends on the child Span in some capacity. */ - public static final String CHILD_OF = "child_of"; - - /** The parent Span doesn't depend in any way on the result of the child Span. */ - public static final String FOLLOWS_FROM = "follows_from"; - - private OpentracingRefTypeValues() {} - } - - public static final class DbSystemValues { - /** Some other SQL database. Fallback only. See notes. */ - public static final String OTHER_SQL = "other_sql"; - - /** Microsoft SQL Server. */ - public static final String MSSQL = "mssql"; - - /** Microsoft SQL Server Compact. */ - public static final String MSSQLCOMPACT = "mssqlcompact"; - - /** MySQL. */ - public static final String MYSQL = "mysql"; - - /** Oracle Database. */ - public static final String ORACLE = "oracle"; - - /** IBM Db2. */ - public static final String DB2 = "db2"; - - /** PostgreSQL. */ - public static final String POSTGRESQL = "postgresql"; - - /** Amazon Redshift. */ - public static final String REDSHIFT = "redshift"; - - /** Apache Hive. */ - public static final String HIVE = "hive"; - - /** Cloudscape. */ - public static final String CLOUDSCAPE = "cloudscape"; - - /** HyperSQL DataBase. */ - public static final String HSQLDB = "hsqldb"; - - /** Progress Database. */ - public static final String PROGRESS = "progress"; - - /** SAP MaxDB. */ - public static final String MAXDB = "maxdb"; - - /** SAP HANA. */ - public static final String HANADB = "hanadb"; - - /** Ingres. */ - public static final String INGRES = "ingres"; - - /** FirstSQL. */ - public static final String FIRSTSQL = "firstsql"; - - /** EnterpriseDB. */ - public static final String EDB = "edb"; - - /** InterSystems Caché. */ - public static final String CACHE = "cache"; - - /** Adabas (Adaptable Database System). */ - public static final String ADABAS = "adabas"; - - /** Firebird. */ - public static final String FIREBIRD = "firebird"; - - /** Apache Derby. */ - public static final String DERBY = "derby"; - - /** FileMaker. */ - public static final String FILEMAKER = "filemaker"; - - /** Informix. */ - public static final String INFORMIX = "informix"; - - /** InstantDB. */ - public static final String INSTANTDB = "instantdb"; - - /** InterBase. */ - public static final String INTERBASE = "interbase"; - - /** MariaDB. */ - public static final String MARIADB = "mariadb"; - - /** Netezza. */ - public static final String NETEZZA = "netezza"; - - /** Pervasive PSQL. */ - public static final String PERVASIVE = "pervasive"; - - /** PointBase. */ - public static final String POINTBASE = "pointbase"; - - /** SQLite. */ - public static final String SQLITE = "sqlite"; - - /** Sybase. */ - public static final String SYBASE = "sybase"; - - /** Teradata. */ - public static final String TERADATA = "teradata"; - - /** Vertica. */ - public static final String VERTICA = "vertica"; - - /** H2. */ - public static final String H2 = "h2"; - - /** ColdFusion IMQ. */ - public static final String COLDFUSION = "coldfusion"; - - /** Apache Cassandra. */ - public static final String CASSANDRA = "cassandra"; - - /** Apache HBase. */ - public static final String HBASE = "hbase"; - - /** MongoDB. */ - public static final String MONGODB = "mongodb"; - - /** Redis. */ - public static final String REDIS = "redis"; - - /** Couchbase. */ - public static final String COUCHBASE = "couchbase"; - - /** CouchDB. */ - public static final String COUCHDB = "couchdb"; - - /** Microsoft Azure Cosmos DB. */ - public static final String COSMOSDB = "cosmosdb"; - - /** Amazon DynamoDB. */ - public static final String DYNAMODB = "dynamodb"; - - /** Neo4j. */ - public static final String NEO4J = "neo4j"; - - /** Apache Geode. */ - public static final String GEODE = "geode"; - - /** Elasticsearch. */ - public static final String ELASTICSEARCH = "elasticsearch"; - - /** Memcached. */ - public static final String MEMCACHED = "memcached"; - - /** CockroachDB. */ - public static final String COCKROACHDB = "cockroachdb"; - - /** OpenSearch. */ - public static final String OPENSEARCH = "opensearch"; - - /** ClickHouse. */ - public static final String CLICKHOUSE = "clickhouse"; - - /** Cloud Spanner. */ - public static final String SPANNER = "spanner"; - - /** Trino. */ - public static final String TRINO = "trino"; - - private DbSystemValues() {} - } - - public static final class DbCassandraConsistencyLevelValues { - /** all. */ - public static final String ALL = "all"; - - /** each_quorum. */ - public static final String EACH_QUORUM = "each_quorum"; - - /** quorum. */ - public static final String QUORUM = "quorum"; - - /** local_quorum. */ - public static final String LOCAL_QUORUM = "local_quorum"; - - /** one. */ - public static final String ONE = "one"; - - /** two. */ - public static final String TWO = "two"; - - /** three. */ - public static final String THREE = "three"; - - /** local_one. */ - public static final String LOCAL_ONE = "local_one"; - - /** any. */ - public static final String ANY = "any"; - - /** serial. */ - public static final String SERIAL = "serial"; - - /** local_serial. */ - public static final String LOCAL_SERIAL = "local_serial"; - - private DbCassandraConsistencyLevelValues() {} - } - - public static final class DbCosmosdbConnectionModeValues { - /** Gateway (HTTP) connections mode. */ - public static final String GATEWAY = "gateway"; - - /** Direct connection. */ - public static final String DIRECT = "direct"; - - private DbCosmosdbConnectionModeValues() {} - } - - public static final class DbCosmosdbOperationTypeValues { - /** invalid. */ - public static final String INVALID = "Invalid"; - - /** create. */ - public static final String CREATE = "Create"; - - /** patch. */ - public static final String PATCH = "Patch"; - - /** read. */ - public static final String READ = "Read"; - - /** read_feed. */ - public static final String READ_FEED = "ReadFeed"; - - /** delete. */ - public static final String DELETE = "Delete"; - - /** replace. */ - public static final String REPLACE = "Replace"; - - /** execute. */ - public static final String EXECUTE = "Execute"; - - /** query. */ - public static final String QUERY = "Query"; - - /** head. */ - public static final String HEAD = "Head"; - - /** head_feed. */ - public static final String HEAD_FEED = "HeadFeed"; - - /** upsert. */ - public static final String UPSERT = "Upsert"; - - /** batch. */ - public static final String BATCH = "Batch"; - - /** query_plan. */ - public static final String QUERY_PLAN = "QueryPlan"; - - /** execute_javascript. */ - public static final String EXECUTE_JAVASCRIPT = "ExecuteJavaScript"; - - private DbCosmosdbOperationTypeValues() {} - } - - public static final class OtelStatusCodeValues { - /** - * The operation has been validated by an Application developer or Operator to have completed - * successfully. - */ - public static final String OK = "OK"; - - /** The operation contains an error. */ - public static final String ERROR = "ERROR"; - - private OtelStatusCodeValues() {} - } - - public static final class FaasDocumentOperationValues { - /** When a new object is created. */ - public static final String INSERT = "insert"; - - /** When an object is modified. */ - public static final String EDIT = "edit"; - - /** When an object is deleted. */ - public static final String DELETE = "delete"; - - private FaasDocumentOperationValues() {} - } - - public static final class GraphqlOperationTypeValues { - /** GraphQL query. */ - public static final String QUERY = "query"; - - /** GraphQL mutation. */ - public static final String MUTATION = "mutation"; - - /** GraphQL subscription. */ - public static final String SUBSCRIPTION = "subscription"; - - private GraphqlOperationTypeValues() {} - } - - public static final class MessageTypeValues { - /** sent. */ - public static final String SENT = "SENT"; - - /** received. */ - public static final String RECEIVED = "RECEIVED"; - - private MessageTypeValues() {} - } - - private IncubatingSemanticAttributes() {} -} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java new file mode 100644 index 0000000..59f5c2a --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java @@ -0,0 +1,64 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class IosIncubatingAttributes { + + /** + * This attribute represents the state the application has transitioned into at the occurrence of + * the event. + * + *

Notes: + * + *

+ */ + public static final AttributeKey IOS_STATE = stringKey("ios.state"); + + // Enum definitions + public static final class IosStateValues { + /** + * The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. + */ + public static final String ACTIVE = "active"; + + /** + * The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. + */ + public static final String INACTIVE = "inactive"; + + /** + * The app is now in the background. This value is associated with UIKit notification + * `applicationDidEnterBackground`. + */ + public static final String BACKGROUND = "background"; + + /** + * The app is now in the foreground. This value is associated with UIKit notification + * `applicationWillEnterForeground`. + */ + public static final String FOREGROUND = "foreground"; + + /** + * The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. + */ + public static final String TERMINATE = "terminate"; + + private IosStateValues() {} + } + + private IosIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..dbb9439 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/JvmIncubatingAttributes.java @@ -0,0 +1,115 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class JvmIncubatingAttributes { + + /** + * Name of the buffer pool. + * + *

Notes: + * + *

+ */ + public static final AttributeKey JVM_BUFFER_POOL_NAME = stringKey("jvm.buffer.pool.name"); + + /** + * Name of the garbage collector action. + * + *

Notes: + * + *

+ */ + public static final AttributeKey JVM_GC_ACTION = stringKey("jvm.gc.action"); + + /** + * Name of the garbage collector. + * + *

Notes: + * + *

+ */ + public static final AttributeKey JVM_GC_NAME = stringKey("jvm.gc.name"); + + /** + * Name of the memory pool. + * + *

Notes: + * + *

+ */ + public static final AttributeKey JVM_MEMORY_POOL_NAME = stringKey("jvm.memory.pool.name"); + + /** The type of memory. */ + public static final AttributeKey JVM_MEMORY_TYPE = stringKey("jvm.memory.type"); + + /** Whether the thread is daemon or not. */ + public static final AttributeKey JVM_THREAD_DAEMON = booleanKey("jvm.thread.daemon"); + + /** State of the thread. */ + public static final AttributeKey JVM_THREAD_STATE = stringKey("jvm.thread.state"); + + // Enum definitions + public static final class JvmMemoryTypeValues { + /** Heap memory. */ + public static final String HEAP = "heap"; + + /** Non-heap memory. */ + public static final String NON_HEAP = "non_heap"; + + private JvmMemoryTypeValues() {} + } + + public static final class JvmThreadStateValues { + /** A thread that has not yet started is in this state. */ + public static final String NEW = "new"; + + /** A thread executing in the Java virtual machine is in this state. */ + public static final String RUNNABLE = "runnable"; + + /** A thread that is blocked waiting for a monitor lock is in this state. */ + public static final String BLOCKED = "blocked"; + + /** + * A thread that is waiting indefinitely for another thread to perform a particular action is in + * this state. + */ + public static final String WAITING = "waiting"; + + /** + * A thread that is waiting for another thread to perform an action for up to a specified + * waiting time is in this state. + */ + public static final String TIMED_WAITING = "timed_waiting"; + + /** A thread that has exited is in this state. */ + public static final String TERMINATED = "terminated"; + + private JvmThreadStateValues() {} + } + + private JvmIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..5f329d0 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java @@ -0,0 +1,113 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class K8sIncubatingAttributes { + + /** The name of the cluster. */ + public static final AttributeKey K8S_CLUSTER_NAME = stringKey("k8s.cluster.name"); + + /** + * A pseudo-ID for the cluster, set to the UID of the {@code kube-system} namespace. + * + *

Notes: + * + *

    + *
  • K8s doesn't have support for obtaining a cluster ID. If this is ever added, we will + * recommend collecting the {@code k8s.cluster.uid} through the official APIs. In the + * meantime, we are able to use the {@code uid} of the {@code kube-system} namespace as a + * proxy for cluster ID. Read on for the rationale. + *
  • Every object created in a K8s cluster is assigned a distinct UID. The {@code kube-system} + * namespace is used by Kubernetes itself and will exist for the lifetime of the cluster. + * Using the {@code uid} of the {@code kube-system} namespace is a reasonable proxy for the + * K8s ClusterID as it will only change if the cluster is rebuilt. Furthermore, Kubernetes + * UIDs are UUIDs as standardized by ISO/IEC 9834-8 and ITU-T + * X.667. Which states: + *
  • If generated according to one of the mechanisms defined in Rec. ITU-T X.667 | ISO/IEC + * 9834-8, a UUID is either guaranteed to be different from all other UUIDs generated before + * 3603 A.D., or is extremely likely to be different (depending on the mechanism chosen). + *
  • Therefore, UIDs between clusters should be extremely unlikely to conflict. + *
+ */ + public static final AttributeKey K8S_CLUSTER_UID = stringKey("k8s.cluster.uid"); + + /** + * The name of the Container from Pod specification, must be unique within a Pod. Container + * runtime usually uses different globally unique name ({@code container.name}). + */ + public static final AttributeKey K8S_CONTAINER_NAME = stringKey("k8s.container.name"); + + /** + * Number of times the container was restarted. This attribute can be used to identify a + * particular container (running or stopped) within a container spec. + */ + public static final AttributeKey K8S_CONTAINER_RESTART_COUNT = + longKey("k8s.container.restart_count"); + + /** 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 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 name of the Deployment. */ + public static final AttributeKey K8S_DEPLOYMENT_NAME = stringKey("k8s.deployment.name"); + + /** The UID of the Deployment. */ + public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); + + /** 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 name of the namespace that the pod is running in. */ + public static final AttributeKey K8S_NAMESPACE_NAME = stringKey("k8s.namespace.name"); + + /** The name of the Node. */ + public static final AttributeKey K8S_NODE_NAME = stringKey("k8s.node.name"); + + /** The UID of the Node. */ + public static final AttributeKey K8S_NODE_UID = stringKey("k8s.node.uid"); + + /** The name of the Pod. */ + public static final AttributeKey K8S_POD_NAME = stringKey("k8s.pod.name"); + + /** The UID of the Pod. */ + public static final AttributeKey K8S_POD_UID = stringKey("k8s.pod.uid"); + + /** The name of the ReplicaSet. */ + public static final AttributeKey K8S_REPLICASET_NAME = stringKey("k8s.replicaset.name"); + + /** The UID of the ReplicaSet. */ + public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); + + /** The name of the StatefulSet. */ + public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); + + /** The UID of the StatefulSet. */ + public static final AttributeKey K8S_STATEFULSET_UID = stringKey("k8s.statefulset.uid"); + + // Enum definitions + + private K8sIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..f60b217 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/LogIncubatingAttributes.java @@ -0,0 +1,61 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class LogIncubatingAttributes { + + /** The basename of the file. */ + public static final AttributeKey LOG_FILE_NAME = stringKey("log.file.name"); + + /** The basename of the file, with symlinks resolved. */ + public static final AttributeKey LOG_FILE_NAME_RESOLVED = + stringKey("log.file.name_resolved"); + + /** The full path to the file. */ + public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path"); + + /** The full path to the file, with symlinks resolved. */ + public static final AttributeKey LOG_FILE_PATH_RESOLVED = + stringKey("log.file.path_resolved"); + + /** The stream associated with the log. See below for a list of well-known values. */ + public static final AttributeKey LOG_IOSTREAM = stringKey("log.iostream"); + + /** + * A unique identifier for the Log Record. + * + *

Notes: + * + *

    + *
  • If an id is provided, other log records with the same id will be considered duplicates + * and can be removed safely. This means, that two distinguishable log records MUST have + * different values. The id MAY be an Universally + * Unique Lexicographically Sortable Identifier (ULID), but other identifiers (e.g. + * UUID) may be used as needed. + *
+ */ + public static final AttributeKey LOG_RECORD_UID = stringKey("log.record.uid"); + + // Enum definitions + public static final class LogIostreamValues { + /** Logs from stdout stream. */ + public static final String STDOUT = "stdout"; + + /** Events from stderr stream. */ + public static final String STDERR = "stderr"; + + private LogIostreamValues() {} + } + + private LogIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..62f0247 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessageIncubatingAttributes.java @@ -0,0 +1,54 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class MessageIncubatingAttributes { + + /** Compressed size of the message in bytes. */ + public static final AttributeKey MESSAGE_COMPRESSED_SIZE = + longKey("message.compressed_size"); + + /** + * MUST be calculated as two different counters starting from {@code 1} one for sent messages and + * one for received message. + * + *

Notes: + * + *

    + *
  • This way we guarantee that the values will be consistent between different + * implementations. + *
+ */ + public static final AttributeKey MESSAGE_ID = longKey("message.id"); + + /** Whether this is a received or sent message. */ + public static final AttributeKey MESSAGE_TYPE = stringKey("message.type"); + + /** Uncompressed size of the message in bytes. */ + public static final AttributeKey MESSAGE_UNCOMPRESSED_SIZE = + longKey("message.uncompressed_size"); + + // Enum definitions + public static final class MessageTypeValues { + /** sent. */ + public static final String SENT = "SENT"; + + /** received. */ + public static final String RECEIVED = "RECEIVED"; + + private MessageTypeValues() {} + } + + private MessageIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..6fc3979 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java @@ -0,0 +1,295 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.booleanKey; +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 io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class MessagingIncubatingAttributes { + + /** + * The number of messages sent, received, or processed in the scope of the batching operation. + * + *

Notes: + * + *

    + *
  • Instrumentations SHOULD NOT set {@code messaging.batch.message_count} on spans that + * operate with a single message. When a messaging client library supports both batch and + * single-message API for the same operation, instrumentations SHOULD use {@code + * messaging.batch.message_count} for batching APIs and SHOULD NOT use it for single-message + * APIs. + *
+ */ + public static final AttributeKey MESSAGING_BATCH_MESSAGE_COUNT = + longKey("messaging.batch.message_count"); + + /** A unique identifier for the client that consumes or produces a message. */ + public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); + + /** + * A boolean that is true if the message destination is anonymous (could be unnamed or have + * auto-generated name). + */ + public static final AttributeKey MESSAGING_DESTINATION_ANONYMOUS = + booleanKey("messaging.destination.anonymous"); + + /** + * The message destination name + * + *

Notes: + * + *

    + *
  • Destination name SHOULD uniquely identify a specific queue, topic or other entity within + * the broker. If the broker doesn't have such notion, the destination name SHOULD uniquely + * identify the broker. + *
+ */ + public static final AttributeKey MESSAGING_DESTINATION_NAME = + stringKey("messaging.destination.name"); + + /** + * Low cardinality representation of the messaging destination name + * + *

Notes: + * + *

    + *
  • Destination names could be constructed from templates. An example would be a destination + * name involving a user name or product id. Although the destination name in this case is + * of high cardinality, the underlying template is of low cardinality and can be effectively + * used for grouping and aggregation. + *
+ */ + public static final AttributeKey MESSAGING_DESTINATION_TEMPLATE = + stringKey("messaging.destination.template"); + + /** + * A boolean that is true if the message destination is temporary and might not exist anymore + * after messages are processed. + */ + public static final AttributeKey MESSAGING_DESTINATION_TEMPORARY = + booleanKey("messaging.destination.temporary"); + + /** + * A boolean that is true if the publish message destination is anonymous (could be unnamed or + * have auto-generated name). + */ + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = + booleanKey("messaging.destination_publish.anonymous"); + + /** + * The name of the original destination the message was published to + * + *

Notes: + * + *

    + *
  • The name SHOULD uniquely identify a specific queue, topic, or other entity within the + * broker. If the broker doesn't have such notion, the original destination name SHOULD + * uniquely identify the broker. + *
+ */ + public static final AttributeKey MESSAGING_DESTINATION_PUBLISH_NAME = + stringKey("messaging.destination_publish.name"); + + /** + * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not + * producers. + */ + public static final AttributeKey MESSAGING_KAFKA_CONSUMER_GROUP = + stringKey("messaging.kafka.consumer.group"); + + /** Partition the message is sent to. */ + public static final AttributeKey MESSAGING_KAFKA_DESTINATION_PARTITION = + longKey("messaging.kafka.destination.partition"); + + /** + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the + * same partition. They differ from {@code messaging.message.id} in that they're not unique. If + * the key is {@code null}, the attribute MUST NOT be set. + * + *

Notes: + * + *

    + *
  • If the key type is not string, it's string representation has to be supplied for the + * attribute. If the key has no unambiguous, canonical string form, don't include its value. + *
+ */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_KEY = + stringKey("messaging.kafka.message.key"); + + /** The offset of a record in the corresponding Kafka partition. */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = + longKey("messaging.kafka.message.offset"); + + /** A boolean that is true if the message is a tombstone. */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_TOMBSTONE = + booleanKey("messaging.kafka.message.tombstone"); + + /** + * The size of the message body in bytes. + * + *

Notes: + * + *

    + *
  • This can refer to both the compressed or uncompressed body size. If both sizes are known, + * the uncompressed body size should be used. + *
+ */ + public static final AttributeKey MESSAGING_MESSAGE_BODY_SIZE = + longKey("messaging.message.body.size"); + + /** + * The conversation ID identifying the conversation to which the message belongs, represented as a + * string. Sometimes called "Correlation ID". + */ + public static final AttributeKey MESSAGING_MESSAGE_CONVERSATION_ID = + stringKey("messaging.message.conversation_id"); + + /** + * The size of the message body and metadata in bytes. + * + *

Notes: + * + *

    + *
  • This can refer to both the compressed or uncompressed size. If both sizes are known, the + * uncompressed size should be used. + *
+ */ + public static final AttributeKey MESSAGING_MESSAGE_ENVELOPE_SIZE = + longKey("messaging.message.envelope.size"); + + /** + * A value used by the messaging system as an identifier for the message, represented as a string. + */ + public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message.id"); + + /** + * A string identifying the kind of messaging operation. + * + *

Notes: + * + *

    + *
  • If a custom value is used, it MUST be of low cardinality. + *
+ */ + public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); + + /** RabbitMQ message routing key. */ + public static final AttributeKey MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = + stringKey("messaging.rabbitmq.destination.routing_key"); + + /** + * Name of the RocketMQ producer/consumer group that is handling the message. The client type is + * identified by the SpanKind. + */ + public static final AttributeKey MESSAGING_ROCKETMQ_CLIENT_GROUP = + stringKey("messaging.rocketmq.client_group"); + + /** Model of message consumption. This only applies to consumer spans. */ + public static final AttributeKey MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = + stringKey("messaging.rocketmq.consumption_model"); + + /** The delay time level for delay message, which determines the message delay time. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = + longKey("messaging.rocketmq.message.delay_time_level"); + + /** + * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. + */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = + longKey("messaging.rocketmq.message.delivery_timestamp"); + + /** + * It is essential for FIFO message. Messages that belong to the same message group are always + * processed one by one within the same consumer group. + */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_GROUP = + stringKey("messaging.rocketmq.message.group"); + + /** Key(s) of message, another way to mark message besides message id. */ + public static final AttributeKey> MESSAGING_ROCKETMQ_MESSAGE_KEYS = + stringArrayKey("messaging.rocketmq.message.keys"); + + /** The secondary classifier of message besides topic. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TAG = + stringKey("messaging.rocketmq.message.tag"); + + /** Type of message. */ + public static final AttributeKey MESSAGING_ROCKETMQ_MESSAGE_TYPE = + stringKey("messaging.rocketmq.message.type"); + + /** Namespace of RocketMQ resources, resources in different namespaces are individual. */ + public static final AttributeKey MESSAGING_ROCKETMQ_NAMESPACE = + stringKey("messaging.rocketmq.namespace"); + + /** A string identifying the messaging system. */ + public static final AttributeKey MESSAGING_SYSTEM = stringKey("messaging.system"); + + // Enum definitions + public static final class MessagingOperationValues { + /** + * One or more messages are provided for publishing to an intermediary. If a single message is + * published, the context of the "Publish" span can be used as the creation context and + * no "Create" span needs to be created. + */ + public static final String PUBLISH = "publish"; + + /** + * A message is created. "Create" spans always refer to a single message and are used to + * provide a unique creation context for messages in batch publishing scenarios. + */ + public static final String CREATE = "create"; + + /** + * One or more messages are requested by a consumer. This operation refers to pull-based + * scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. + */ + public static final String RECEIVE = "receive"; + + /** + * One or more messages are passed to a consumer. This operation refers to push-based scenarios, + * where consumer register callbacks which get called by messaging SDKs. + */ + public static final String DELIVER = "deliver"; + + private MessagingOperationValues() {} + } + + public static final class MessagingRocketmqConsumptionModelValues { + /** Clustering consumption model. */ + public static final String CLUSTERING = "clustering"; + + /** Broadcasting consumption model. */ + public static final String BROADCASTING = "broadcasting"; + + private MessagingRocketmqConsumptionModelValues() {} + } + + public static final class MessagingRocketmqMessageTypeValues { + /** Normal message. */ + public static final String NORMAL = "normal"; + + /** FIFO message. */ + public static final String FIFO = "fifo"; + + /** Delay message. */ + public static final String DELAY = "delay"; + + /** Transaction message. */ + public static final String TRANSACTION = "transaction"; + + private MessagingRocketmqMessageTypeValues() {} + } + + private MessagingIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..e591e30 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/NetworkIncubatingAttributes.java @@ -0,0 +1,128 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class NetworkIncubatingAttributes { + + /** The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ + public static final AttributeKey NETWORK_CARRIER_ICC = stringKey("network.carrier.icc"); + + /** The mobile carrier country code. */ + public static final AttributeKey NETWORK_CARRIER_MCC = stringKey("network.carrier.mcc"); + + /** The mobile carrier network code. */ + public static final AttributeKey NETWORK_CARRIER_MNC = stringKey("network.carrier.mnc"); + + /** The name of the mobile carrier. */ + public static final AttributeKey NETWORK_CARRIER_NAME = stringKey("network.carrier.name"); + + /** + * This describes more details regarding the connection.type. It may be the type of cell + * technology connection, but it could be used for describing details about a wifi connection. + */ + public static final AttributeKey NETWORK_CONNECTION_SUBTYPE = + stringKey("network.connection.subtype"); + + /** The internet connection type. */ + public static final AttributeKey NETWORK_CONNECTION_TYPE = + stringKey("network.connection.type"); + + // Enum definitions + public static final class NetworkConnectionSubtypeValues { + /** GPRS. */ + public static final String GPRS = "gprs"; + + /** EDGE. */ + public static final String EDGE = "edge"; + + /** UMTS. */ + public static final String UMTS = "umts"; + + /** CDMA. */ + public static final String CDMA = "cdma"; + + /** EVDO Rel. 0. */ + public static final String EVDO_0 = "evdo_0"; + + /** EVDO Rev. A. */ + public static final String EVDO_A = "evdo_a"; + + /** CDMA2000 1XRTT. */ + public static final String CDMA2000_1XRTT = "cdma2000_1xrtt"; + + /** HSDPA. */ + public static final String HSDPA = "hsdpa"; + + /** HSUPA. */ + public static final String HSUPA = "hsupa"; + + /** HSPA. */ + public static final String HSPA = "hspa"; + + /** IDEN. */ + public static final String IDEN = "iden"; + + /** EVDO Rev. B. */ + public static final String EVDO_B = "evdo_b"; + + /** LTE. */ + public static final String LTE = "lte"; + + /** EHRPD. */ + public static final String EHRPD = "ehrpd"; + + /** HSPAP. */ + public static final String HSPAP = "hspap"; + + /** GSM. */ + public static final String GSM = "gsm"; + + /** TD-SCDMA. */ + public static final String TD_SCDMA = "td_scdma"; + + /** IWLAN. */ + public static final String IWLAN = "iwlan"; + + /** 5G NR (New Radio). */ + public static final String NR = "nr"; + + /** 5G NRNSA (New Radio Non-Standalone). */ + public static final String NRNSA = "nrnsa"; + + /** LTE CA. */ + public static final String LTE_CA = "lte_ca"; + + private NetworkConnectionSubtypeValues() {} + } + + public static final class NetworkConnectionTypeValues { + /** wifi. */ + public static final String WIFI = "wifi"; + + /** wired. */ + public static final String WIRED = "wired"; + + /** cell. */ + public static final String CELL = "cell"; + + /** unavailable. */ + public static final String UNAVAILABLE = "unavailable"; + + /** unknown. */ + public static final String UNKNOWN = "unknown"; + + private NetworkConnectionTypeValues() {} + } + + private NetworkIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java new file mode 100644 index 0000000..2197da2 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java @@ -0,0 +1,37 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OciIncubatingAttributes { + + /** + * The digest of the OCI image manifest. For container images specifically is the digest by which + * the container image is known. + * + *

Notes: + * + *

+ */ + public static final AttributeKey OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); + + // Enum definitions + + private OciIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..395aef5 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OpentracingIncubatingAttributes.java @@ -0,0 +1,40 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OpentracingIncubatingAttributes { + + /** + * Parent-child Reference type + * + *

Notes: + * + *

    + *
  • The causal relationship between a child Span and a parent Span. + *
+ */ + public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); + + // Enum definitions + public static final class OpentracingRefTypeValues { + /** The parent Span depends on the child Span in some capacity. */ + public static final String CHILD_OF = "child_of"; + + /** The parent Span doesn't depend in any way on the result of the child Span. */ + public static final String FOLLOWS_FROM = "follows_from"; + + private OpentracingRefTypeValues() {} + } + + private OpentracingIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..80cc124 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OsIncubatingAttributes.java @@ -0,0 +1,77 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OsIncubatingAttributes { + + /** Unique identifier for a particular build or compilation of the operating system. */ + public static final AttributeKey OS_BUILD_ID = stringKey("os.build_id"); + + /** + * Human readable (not intended to be parsed) OS version information, like e.g. reported by {@code + * ver} or {@code lsb_release -a} commands. + */ + public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); + + /** Human readable operating system name. */ + public static final AttributeKey OS_NAME = stringKey("os.name"); + + /** The operating system type. */ + public static final AttributeKey OS_TYPE = stringKey("os.type"); + + /** + * The version string of the operating system as defined in Version Attributes. + */ + public static final AttributeKey OS_VERSION = stringKey("os.version"); + + // Enum definitions + public static final class OsTypeValues { + /** Microsoft Windows. */ + public static final String WINDOWS = "windows"; + + /** Linux. */ + public static final String LINUX = "linux"; + + /** Apple Darwin. */ + public static final String DARWIN = "darwin"; + + /** FreeBSD. */ + public static final String FREEBSD = "freebsd"; + + /** NetBSD. */ + public static final String NETBSD = "netbsd"; + + /** OpenBSD. */ + public static final String OPENBSD = "openbsd"; + + /** DragonFly BSD. */ + public static final String DRAGONFLYBSD = "dragonflybsd"; + + /** HP-UX (Hewlett Packard Unix). */ + public static final String HPUX = "hpux"; + + /** AIX (Advanced Interactive eXecutive). */ + public static final String AIX = "aix"; + + /** SunOS, Oracle Solaris. */ + public static final String SOLARIS = "solaris"; + + /** IBM z/OS. */ + public static final String Z_OS = "z_os"; + + private OsTypeValues() {} + } + + private OsIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..717a9d4 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java @@ -0,0 +1,48 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OtelIncubatingAttributes { + + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); + + /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); + + /** + * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status + * code is UNSET. + */ + public static final AttributeKey OTEL_STATUS_CODE = stringKey("otel.status_code"); + + /** Description of the Status if it has a value, otherwise not set. */ + public static final AttributeKey OTEL_STATUS_DESCRIPTION = + stringKey("otel.status_description"); + + // Enum definitions + public static final class OtelStatusCodeValues { + /** + * The operation has been validated by an Application developer or Operator to have completed + * successfully. + */ + public static final String OK = "OK"; + + /** The operation contains an error. */ + public static final String ERROR = "ERROR"; + + private OtelStatusCodeValues() {} + } + + private OtelIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..7238860 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtherIncubatingAttributes.java @@ -0,0 +1,32 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class OtherIncubatingAttributes { + + /** The state of a connection in the pool */ + public static final AttributeKey STATE = stringKey("state"); + + // Enum definitions + public static final class StateValues { + /** idle. */ + public static final String IDLE = "idle"; + + /** used. */ + public static final String USED = "used"; + + private StateValues() {} + } + + private OtherIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PeerIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PeerIncubatingAttributes.java new file mode 100644 index 0000000..ca239e4 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PeerIncubatingAttributes.java @@ -0,0 +1,27 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class PeerIncubatingAttributes { + + /** + * The {@code service.name} of the remote service. + * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if + * any. + */ + public static final AttributeKey PEER_SERVICE = stringKey("peer.service"); + + // Enum definitions + + private PeerIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PoolIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PoolIncubatingAttributes.java new file mode 100644 index 0000000..7350c37 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/PoolIncubatingAttributes.java @@ -0,0 +1,28 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class PoolIncubatingAttributes { + + /** + * The name of the connection pool; unique within the instrumented application. In case the + * connection pool implementation doesn't provide a name, then the db.connection_string + * should be used + */ + public static final AttributeKey POOL_NAME = stringKey("pool.name"); + + // Enum definitions + + private PoolIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..415cc1a --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java @@ -0,0 +1,90 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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 io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ProcessIncubatingAttributes { + + /** + * The command used to launch the process (i.e. the command name). On Linux based systems, can be + * set to the zeroth string in {@code proc/[pid]/cmdline}. On Windows, can be set to the first + * parameter extracted from {@code GetCommandLineW}. + */ + public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); + + /** + * 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}. + */ + public static final AttributeKey> PROCESS_COMMAND_ARGS = + stringArrayKey("process.command_args"); + + /** + * 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. + */ + public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); + + /** + * The name of the process executable. On Linux based systems, can be set to the {@code Name} in + * {@code proc/[pid]/status}. On Windows, can be set to the base name of {@code + * GetProcessImageFileNameW}. + */ + public static final AttributeKey PROCESS_EXECUTABLE_NAME = + stringKey("process.executable.name"); + + /** + * The full path to the process executable. On Linux based systems, can be set to the target of + * {@code proc/[pid]/exe}. On Windows, can be set to the result of {@code + * GetProcessImageFileNameW}. + */ + public static final AttributeKey PROCESS_EXECUTABLE_PATH = + stringKey("process.executable.path"); + + /** The username of the user that owns the process. */ + public static final AttributeKey PROCESS_OWNER = stringKey("process.owner"); + + /** Parent Process identifier (PID). */ + public static final AttributeKey PROCESS_PARENT_PID = longKey("process.parent_pid"); + + /** Process identifier (PID). */ + public static final AttributeKey PROCESS_PID = longKey("process.pid"); + + /** + * An additional description about the runtime of the process, for example a specific vendor + * customization of the runtime environment. + */ + public static final AttributeKey PROCESS_RUNTIME_DESCRIPTION = + stringKey("process.runtime.description"); + + /** + * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name + * of the compiler. + */ + public static final AttributeKey PROCESS_RUNTIME_NAME = stringKey("process.runtime.name"); + + /** + * The version of the runtime of this process, as returned by the runtime without modification. + */ + public static final AttributeKey PROCESS_RUNTIME_VERSION = + stringKey("process.runtime.version"); + + // Enum definitions + + private ProcessIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..7d39651 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java @@ -0,0 +1,276 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +import static io.opentelemetry.api.common.AttributeKey.longKey; +import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; + +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 +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class RpcIncubatingAttributes { + + /** + * The error codes of the Connect + * request. Error codes are always string values. + */ + public static final AttributeKey RPC_CONNECT_RPC_ERROR_CODE = + stringKey("rpc.connect_rpc.error_code"); + + /** + * Connect request metadata, {@code } being the normalized Connect Metadata key (lowercase), + * the value being the metadata values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> RPC_CONNECT_RPC_REQUEST_METADATA = + stringArrayKeyTemplate("rpc.connect_rpc.request.metadata"); + + /** + * Connect response metadata, {@code } being the normalized Connect Metadata key (lowercase), + * the value being the metadata values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> RPC_CONNECT_RPC_RESPONSE_METADATA = + stringArrayKeyTemplate("rpc.connect_rpc.response.metadata"); + + /** + * gRPC request metadata, {@code } being the normalized gRPC Metadata key (lowercase), the + * value being the metadata values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> RPC_GRPC_REQUEST_METADATA = + stringArrayKeyTemplate("rpc.grpc.request.metadata"); + + /** + * gRPC response metadata, {@code } being the normalized gRPC Metadata key (lowercase), the + * value being the metadata values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> RPC_GRPC_RESPONSE_METADATA = + stringArrayKeyTemplate("rpc.grpc.response.metadata"); + + /** + * The numeric status + * code of the gRPC request. + */ + public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); + + /** {@code error.code} property of response if it is an error response. */ + public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); + + /** {@code error.message} property of response if it is an error response. */ + public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = + stringKey("rpc.jsonrpc.error_message"); + + /** + * {@code id} property of request or response. Since protocol allows id to be int, string, {@code + * null} or missing (for notifications), value is expected to be cast to string for simplicity. + * Use empty string in case of {@code null} value. Omit entirely if this is a notification. + */ + public static final AttributeKey RPC_JSONRPC_REQUEST_ID = + stringKey("rpc.jsonrpc.request_id"); + + /** + * Protocol version as in {@code jsonrpc} property of request/response. Since JSON-RPC 1.0 doesn't + * specify this, the value can be omitted. + */ + public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); + + /** + * The name of the (logical) method being called, must be equal to the $method part in the span + * name. + * + *

Notes: + * + *

    + *
  • This is the logical name of the method from the RPC interface perspective, which can be + * different from the name of any implementing method/function. The {@code code.function} + * attribute may be used to store the latter (e.g., method actually executing the call on + * the server side, RPC client stub method on the client side). + *
+ */ + public static final AttributeKey RPC_METHOD = stringKey("rpc.method"); + + /** + * The full (logical) name of the service being called, including its package name, if applicable. + * + *

Notes: + * + *

    + *
  • This is the logical name of the service from the RPC interface perspective, which can be + * different from the name of any implementing class. The {@code code.namespace} attribute + * may be used to store the latter (despite the attribute name, it may include a class name; + * e.g., class with method actually executing the call on the server side, RPC client stub + * class on the client side). + *
+ */ + public static final AttributeKey RPC_SERVICE = stringKey("rpc.service"); + + /** A string identifying the remoting system. See below for a list of well-known identifiers. */ + public static final AttributeKey RPC_SYSTEM = stringKey("rpc.system"); + + // Enum definitions + public static final class RpcConnectRpcErrorCodeValues { + /** cancelled. */ + public static final String CANCELLED = "cancelled"; + + /** unknown. */ + public static final String UNKNOWN = "unknown"; + + /** invalid_argument. */ + public static final String INVALID_ARGUMENT = "invalid_argument"; + + /** deadline_exceeded. */ + public static final String DEADLINE_EXCEEDED = "deadline_exceeded"; + + /** not_found. */ + public static final String NOT_FOUND = "not_found"; + + /** already_exists. */ + public static final String ALREADY_EXISTS = "already_exists"; + + /** permission_denied. */ + public static final String PERMISSION_DENIED = "permission_denied"; + + /** resource_exhausted. */ + public static final String RESOURCE_EXHAUSTED = "resource_exhausted"; + + /** failed_precondition. */ + public static final String FAILED_PRECONDITION = "failed_precondition"; + + /** aborted. */ + public static final String ABORTED = "aborted"; + + /** out_of_range. */ + public static final String OUT_OF_RANGE = "out_of_range"; + + /** unimplemented. */ + public static final String UNIMPLEMENTED = "unimplemented"; + + /** internal. */ + public static final String INTERNAL = "internal"; + + /** unavailable. */ + public static final String UNAVAILABLE = "unavailable"; + + /** data_loss. */ + public static final String DATA_LOSS = "data_loss"; + + /** unauthenticated. */ + public static final String UNAUTHENTICATED = "unauthenticated"; + + private RpcConnectRpcErrorCodeValues() {} + } + + public static final class RpcGrpcStatusCodeValues { + /** OK. */ + public static final long OK = 0; + + /** CANCELLED. */ + public static final long CANCELLED = 1; + + /** UNKNOWN. */ + public static final long UNKNOWN = 2; + + /** INVALID_ARGUMENT. */ + public static final long INVALID_ARGUMENT = 3; + + /** DEADLINE_EXCEEDED. */ + public static final long DEADLINE_EXCEEDED = 4; + + /** NOT_FOUND. */ + public static final long NOT_FOUND = 5; + + /** ALREADY_EXISTS. */ + public static final long ALREADY_EXISTS = 6; + + /** PERMISSION_DENIED. */ + public static final long PERMISSION_DENIED = 7; + + /** RESOURCE_EXHAUSTED. */ + public static final long RESOURCE_EXHAUSTED = 8; + + /** FAILED_PRECONDITION. */ + public static final long FAILED_PRECONDITION = 9; + + /** ABORTED. */ + public static final long ABORTED = 10; + + /** OUT_OF_RANGE. */ + public static final long OUT_OF_RANGE = 11; + + /** UNIMPLEMENTED. */ + public static final long UNIMPLEMENTED = 12; + + /** INTERNAL. */ + public static final long INTERNAL = 13; + + /** UNAVAILABLE. */ + public static final long UNAVAILABLE = 14; + + /** DATA_LOSS. */ + public static final long DATA_LOSS = 15; + + /** UNAUTHENTICATED. */ + public static final long UNAUTHENTICATED = 16; + + private RpcGrpcStatusCodeValues() {} + } + + public static final class RpcSystemValues { + /** gRPC. */ + public static final String GRPC = "grpc"; + + /** Java RMI. */ + public static final String JAVA_RMI = "java_rmi"; + + /** .NET WCF. */ + public static final String DOTNET_WCF = "dotnet_wcf"; + + /** Apache Dubbo. */ + public static final String APACHE_DUBBO = "apache_dubbo"; + + /** Connect RPC. */ + public static final String CONNECT_RPC = "connect_rpc"; + + private RpcSystemValues() {} + } + + private RpcIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java new file mode 100644 index 0000000..c79bace --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ServiceIncubatingAttributes.java @@ -0,0 +1,77 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ServiceIncubatingAttributes { + + /** + * The string ID of the service instance. + * + *

Notes: + * + *

    + *
  • MUST be unique for each instance of the same {@code service.namespace,service.name} pair + * (in other words {@code service.namespace,service.name,service.instance.id} triplet MUST + * be globally unique). The ID helps to distinguish instances of the same service that exist + * at the same time (e.g. instances of a horizontally scaled service). It is preferable for + * the ID to be persistent and stay the same for the lifetime of the service instance, + * however it is acceptable that the ID is ephemeral and changes during important lifetime + * events for the service (e.g. service restarts). If the service has no inherent unique ID + * that can be used as the value of this attribute it is recommended to generate a random + * Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use + * Version 5, see RFC 4122 for more recommendations). + *
+ */ + public static final AttributeKey SERVICE_INSTANCE_ID = stringKey("service.instance.id"); + + /** + * Logical name of the service. + * + *

Notes: + * + *

    + *
  • MUST be the same for all instances of horizontally scaled services. If the value was not + * specified, SDKs MUST fallback to {@code unknown_service:} concatenated with {@code process.executable.name}, e.g. {@code + * unknown_service:bash}. If {@code process.executable.name} is not available, the value + * MUST be set to {@code unknown_service}. + *
+ */ + public static final AttributeKey SERVICE_NAME = stringKey("service.name"); + + /** + * A namespace for {@code service.name}. + * + *

Notes: + * + *

    + *
  • A string value having a meaning that helps to distinguish a group of services, for + * example the team name that owns a group of services. {@code service.name} is expected to + * be unique within the same namespace. If {@code service.namespace} is not specified in the + * Resource then {@code service.name} is expected to be unique for all services that have no + * explicit namespace defined (so the empty/unspecified namespace is simply one more valid + * namespace). Zero-length namespace string is assumed equal to unspecified namespace. + *
+ */ + public static final AttributeKey SERVICE_NAMESPACE = stringKey("service.namespace"); + + /** + * The version string of the service API or implementation. The format is not defined by these + * conventions. + */ + public static final AttributeKey SERVICE_VERSION = stringKey("service.version"); + + // Enum definitions + + private ServiceIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingAttributes.java new file mode 100644 index 0000000..176ef56 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SessionIncubatingAttributes.java @@ -0,0 +1,26 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class SessionIncubatingAttributes { + + /** A unique id to identify a session. */ + public static final AttributeKey SESSION_ID = stringKey("session.id"); + + /** The previous {@code session.id} for this user, when known. */ + public static final AttributeKey SESSION_PREVIOUS_ID = stringKey("session.previous_id"); + + // Enum definitions + + private SessionIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SourceIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SourceIncubatingAttributes.java new file mode 100644 index 0000000..71353e2 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SourceIncubatingAttributes.java @@ -0,0 +1,38 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class SourceIncubatingAttributes { + + /** + * Source address - domain name if available without reverse DNS lookup; otherwise, IP address or + * Unix domain socket name. + * + *

Notes: + * + *

    + *
  • When observed from the destination side, and when communicating through an intermediary, + * {@code source.address} SHOULD represent the source address behind any intermediaries, for + * example proxies, if it's available. + *
+ */ + public static final AttributeKey SOURCE_ADDRESS = stringKey("source.address"); + + /** Source port number */ + public static final AttributeKey SOURCE_PORT = longKey("source.port"); + + // Enum definitions + + private SourceIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..a18233f --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java @@ -0,0 +1,263 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class SystemIncubatingAttributes { + + /** The logical CPU number [0..n-1] */ + public static final AttributeKey SYSTEM_CPU_LOGICAL_NUMBER = + longKey("system.cpu.logical_number"); + + /** The state of the CPU */ + public static final AttributeKey SYSTEM_CPU_STATE = stringKey("system.cpu.state"); + + /** The device identifier */ + public static final AttributeKey SYSTEM_DEVICE = stringKey("system.device"); + + /** The disk operation direction */ + public static final AttributeKey SYSTEM_DISK_DIRECTION = + stringKey("system.disk.direction"); + + /** The filesystem mode */ + public static final AttributeKey SYSTEM_FILESYSTEM_MODE = + stringKey("system.filesystem.mode"); + + /** The filesystem mount path */ + public static final AttributeKey SYSTEM_FILESYSTEM_MOUNTPOINT = + stringKey("system.filesystem.mountpoint"); + + /** The filesystem state */ + public static final AttributeKey SYSTEM_FILESYSTEM_STATE = + stringKey("system.filesystem.state"); + + /** The filesystem type */ + public static final AttributeKey SYSTEM_FILESYSTEM_TYPE = + stringKey("system.filesystem.type"); + + /** The memory state */ + public static final AttributeKey SYSTEM_MEMORY_STATE = stringKey("system.memory.state"); + + /** */ + public static final AttributeKey SYSTEM_NETWORK_DIRECTION = + stringKey("system.network.direction"); + + /** A stateless protocol MUST NOT set this attribute */ + public static final AttributeKey SYSTEM_NETWORK_STATE = stringKey("system.network.state"); + + /** The paging access direction */ + public static final AttributeKey SYSTEM_PAGING_DIRECTION = + stringKey("system.paging.direction"); + + /** The memory paging state */ + public static final AttributeKey SYSTEM_PAGING_STATE = stringKey("system.paging.state"); + + /** The memory paging type */ + public static final AttributeKey SYSTEM_PAGING_TYPE = stringKey("system.paging.type"); + + /** + * The process state, e.g., Linux Process State + * Codes + */ + public static final AttributeKey SYSTEM_PROCESSES_STATUS = + stringKey("system.processes.status"); + + // Enum definitions + public static final class SystemCpuStateValues { + /** user. */ + public static final String USER = "user"; + + /** system. */ + public static final String SYSTEM = "system"; + + /** nice. */ + public static final String NICE = "nice"; + + /** idle. */ + public static final String IDLE = "idle"; + + /** iowait. */ + public static final String IOWAIT = "iowait"; + + /** interrupt. */ + public static final String INTERRUPT = "interrupt"; + + /** steal. */ + public static final String STEAL = "steal"; + + private SystemCpuStateValues() {} + } + + public static final class SystemDiskDirectionValues { + /** read. */ + public static final String READ = "read"; + + /** write. */ + public static final String WRITE = "write"; + + private SystemDiskDirectionValues() {} + } + + public static final class SystemFilesystemStateValues { + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + /** reserved. */ + public static final String RESERVED = "reserved"; + + private SystemFilesystemStateValues() {} + } + + public static final class SystemFilesystemTypeValues { + /** fat32. */ + public static final String FAT32 = "fat32"; + + /** exfat. */ + public static final String EXFAT = "exfat"; + + /** ntfs. */ + public static final String NTFS = "ntfs"; + + /** refs. */ + public static final String REFS = "refs"; + + /** hfsplus. */ + public static final String HFSPLUS = "hfsplus"; + + /** ext4. */ + public static final String EXT4 = "ext4"; + + private SystemFilesystemTypeValues() {} + } + + public static final class SystemMemoryStateValues { + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + /** shared. */ + public static final String SHARED = "shared"; + + /** buffers. */ + public static final String BUFFERS = "buffers"; + + /** cached. */ + public static final String CACHED = "cached"; + + private SystemMemoryStateValues() {} + } + + public static final class SystemNetworkDirectionValues { + /** transmit. */ + public static final String TRANSMIT = "transmit"; + + /** receive. */ + public static final String RECEIVE = "receive"; + + private SystemNetworkDirectionValues() {} + } + + public static final class SystemNetworkStateValues { + /** close. */ + public static final String CLOSE = "close"; + + /** close_wait. */ + public static final String CLOSE_WAIT = "close_wait"; + + /** closing. */ + public static final String CLOSING = "closing"; + + /** delete. */ + public static final String DELETE = "delete"; + + /** established. */ + public static final String ESTABLISHED = "established"; + + /** fin_wait_1. */ + public static final String FIN_WAIT_1 = "fin_wait_1"; + + /** fin_wait_2. */ + public static final String FIN_WAIT_2 = "fin_wait_2"; + + /** last_ack. */ + public static final String LAST_ACK = "last_ack"; + + /** listen. */ + public static final String LISTEN = "listen"; + + /** syn_recv. */ + public static final String SYN_RECV = "syn_recv"; + + /** syn_sent. */ + public static final String SYN_SENT = "syn_sent"; + + /** time_wait. */ + public static final String TIME_WAIT = "time_wait"; + + private SystemNetworkStateValues() {} + } + + public static final class SystemPagingDirectionValues { + /** in. */ + public static final String IN = "in"; + + /** out. */ + public static final String OUT = "out"; + + private SystemPagingDirectionValues() {} + } + + public static final class SystemPagingStateValues { + /** used. */ + public static final String USED = "used"; + + /** free. */ + public static final String FREE = "free"; + + private SystemPagingStateValues() {} + } + + public static final class SystemPagingTypeValues { + /** major. */ + public static final String MAJOR = "major"; + + /** minor. */ + public static final String MINOR = "minor"; + + private SystemPagingTypeValues() {} + } + + public static final class SystemProcessesStatusValues { + /** running. */ + public static final String RUNNING = "running"; + + /** sleeping. */ + public static final String SLEEPING = "sleeping"; + + /** stopped. */ + public static final String STOPPED = "stopped"; + + /** defunct. */ + public static final String DEFUNCT = "defunct"; + + private SystemProcessesStatusValues() {} + } + + private SystemIncubatingAttributes() {} +} 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 new file mode 100644 index 0000000..598813a --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TelemetryIncubatingAttributes.java @@ -0,0 +1,102 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class TelemetryIncubatingAttributes { + + /** + * The name of the auto instrumentation agent or distribution, if used. + * + *

Notes: + * + *

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

Notes: + * + *

    + *
  • The OpenTelemetry SDK MUST set the {@code telemetry.sdk.name} attribute to {@code + * opentelemetry}. If another SDK, like a fork or a vendor-provided implementation, is used, + * this SDK MUST set the {@code telemetry.sdk.name} attribute to the fully-qualified class + * or module name of this SDK's main entry point or another suitable identifier depending on + * the language. The identifier {@code opentelemetry} is reserved and MUST NOT be used in + * this case. All custom identifiers SHOULD be stable across different versions of an + * implementation. + *
+ */ + public static final AttributeKey TELEMETRY_SDK_NAME = stringKey("telemetry.sdk.name"); + + /** The version string of the telemetry SDK. */ + public static final AttributeKey TELEMETRY_SDK_VERSION = + stringKey("telemetry.sdk.version"); + + // Enum definitions + public static final class TelemetrySdkLanguageValues { + /** cpp. */ + public static final String CPP = "cpp"; + + /** dotnet. */ + public static final String DOTNET = "dotnet"; + + /** erlang. */ + public static final String ERLANG = "erlang"; + + /** go. */ + public static final String GO = "go"; + + /** java. */ + public static final String JAVA = "java"; + + /** nodejs. */ + public static final String NODEJS = "nodejs"; + + /** php. */ + public static final String PHP = "php"; + + /** python. */ + public static final String PYTHON = "python"; + + /** ruby. */ + public static final String RUBY = "ruby"; + + /** rust. */ + public static final String RUST = "rust"; + + /** swift. */ + public static final String SWIFT = "swift"; + + /** webjs. */ + public static final String WEBJS = "webjs"; + + private TelemetrySdkLanguageValues() {} + } + + private TelemetryIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ThreadIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ThreadIncubatingAttributes.java new file mode 100644 index 0000000..4948f36 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ThreadIncubatingAttributes.java @@ -0,0 +1,27 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +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; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ThreadIncubatingAttributes { + + /** Current "managed" thread ID (as opposed to OS thread ID). */ + public static final AttributeKey THREAD_ID = longKey("thread.id"); + + /** Current thread name. */ + public static final AttributeKey THREAD_NAME = stringKey("thread.name"); + + // Enum definitions + + private ThreadIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/WebengineIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/WebengineIncubatingAttributes.java new file mode 100644 index 0000000..8e33319 --- /dev/null +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/WebengineIncubatingAttributes.java @@ -0,0 +1,30 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv.incubating; + +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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class WebengineIncubatingAttributes { + + /** Additional description of the web engine (e.g. detailed version and edition information). */ + public static final AttributeKey WEBENGINE_DESCRIPTION = + stringKey("webengine.description"); + + /** The name of the web engine. */ + public static final AttributeKey WEBENGINE_NAME = stringKey("webengine.name"); + + /** The version of the web engine. */ + public static final AttributeKey WEBENGINE_VERSION = stringKey("webengine.version"); + + // Enum definitions + + private WebengineIncubatingAttributes() {} +} diff --git a/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java b/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java index 09ceaac..e32b50f 100644 --- a/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java +++ b/semconv-incubating/src/test/java/io/opentelemetry/semconv/incubating/IncubatingAvailabilityTest.java @@ -5,8 +5,10 @@ package io.opentelemetry.semconv.incubating; -import static org.assertj.core.api.Assertions.assertThatCode; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; +import java.lang.reflect.Field; import org.junit.jupiter.api.Test; /** A placeholder test which verifies that the generated classes compile and can load. */ @@ -14,11 +16,64 @@ public class IncubatingAvailabilityTest { @Test void available() { - classAvailable("io.opentelemetry.semconv.incubating.IncubatingResourceAttributes"); - classAvailable("io.opentelemetry.semconv.incubating.IncubatingSemanticAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.AndroidIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.AwsIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.BrowserIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.CloudIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.CodeIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.DbIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.DeploymentIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.DestinationIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.DeviceIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.EnduserIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.EventIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.ExceptionIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.FaasIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.FeatureFlagIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.GcpIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.GraphqlIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.HerokuIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.HostIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.HttpIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.IosIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.JvmIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.K8sIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.LogIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.MessageIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.MessagingIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.NetworkIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.OciIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.OpentracingIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.OsIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.OtelIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.OtherIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.PeerIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.PoolIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.ProcessIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.RpcIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.SessionIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.SourceIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.SystemIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.TelemetryIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.ThreadIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.incubating.WebengineIncubatingAttributes"); + isValidClass("io.opentelemetry.semconv.SchemaUrls"); } - private static void classAvailable(String fqcn) { - assertThatCode(() -> Class.forName(fqcn)).doesNotThrowAnyException(); + private static void isValidClass(String fqcn) { + Class clazz = null; + try { + clazz = Class.forName(fqcn); + } catch (ClassNotFoundException e) { + fail(e.getMessage()); + } + Field[] declaredFields = clazz.getDeclaredFields(); + Class[] declaredClasses = clazz.getDeclaredClasses(); + boolean hasFieldsOrInnerClasses = + (declaredFields != null && declaredFields.length > 0) + || (declaredClasses != null && declaredClasses.length > 0); + assertThat(hasFieldsOrInnerClasses).withFailMessage(() -> fqcn + " is empty").isTrue(); } } diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ClientAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ClientAttributes.java new file mode 100644 index 0000000..960902f --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/ClientAttributes.java @@ -0,0 +1,48 @@ +/* + * 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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ClientAttributes { + + /** + * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or + * Unix domain socket name. + * + *

Notes: + * + *

    + *
  • When observed from the server side, and when communicating through an intermediary, + * {@code client.address} SHOULD represent the client address behind any intermediaries, for + * example proxies, if it's available. + *
+ */ + public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); + + /** + * Client port number. + * + *

Notes: + * + *

    + *
  • When observed from the server side, and when communicating through an intermediary, + * {@code client.port} SHOULD represent the client port behind any intermediaries, for + * example proxies, if it's available. + *
+ */ + public static final AttributeKey CLIENT_PORT = longKey("client.port"); + + // Enum definitions + + private ClientAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java new file mode 100644 index 0000000..79dcf29 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/ErrorAttributes.java @@ -0,0 +1,51 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ErrorAttributes { + + /** + * Describes a class of error the operation ended with. + * + *

Notes: + * + *

    + *
  • The {@code error.type} SHOULD be predictable and SHOULD have low cardinality. + * Instrumentations SHOULD document the list of errors they report. + *
  • The cardinality of {@code error.type} within one instrumentation library SHOULD be low. + * Telemetry consumers that aggregate data from multiple instrumentation libraries and + * applications should be prepared for {@code error.type} to have high cardinality at query + * time when no additional filters are applied. + *
  • If the operation has completed successfully, instrumentations SHOULD NOT set {@code + * error.type}. + *
  • If a specific domain defines its own set of error identifiers (such as HTTP or gRPC + * status codes), it's RECOMMENDED to: + *
  • Use a domain-specific attribute + *
  • Set {@code error.type} to capture all errors, regardless of whether they are defined + * within the domain-specific set or not. + *
+ */ + public static final AttributeKey ERROR_TYPE = stringKey("error.type"); + + // Enum definitions + public static final class ErrorTypeValues { + /** + * A fallback error value to be used when the instrumentation doesn't define a custom value. + */ + public static final String OTHER = "_OTHER"; + + private ErrorTypeValues() {} + } + + private ErrorAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java new file mode 100644 index 0000000..6918a31 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/HttpAttributes.java @@ -0,0 +1,159 @@ +/* + * 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 static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; + +import io.opentelemetry.api.common.AttributeKey; +import java.util.List; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class HttpAttributes { + + /** + * HTTP request headers, {@code } being the normalized HTTP Header name (lowercase), the + * value being the header values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> HTTP_REQUEST_HEADER = + stringArrayKeyTemplate("http.request.header"); + + /** + * HTTP request method. + * + *

Notes: + * + *

    + *
  • HTTP request method value SHOULD be "known" to the instrumentation. By default, + * this convention defines "known" methods as the ones listed in RFC9110 and the PATCH + * method defined in RFC5789. + *
  • If the HTTP request method is not known to instrumentation, it MUST set the {@code + * http.request.method} attribute to {@code _OTHER}. + *
  • If the HTTP instrumentation could end up converting valid HTTP request methods to {@code + * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this + * override is done via environment variable, then the environment variable MUST be named + * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of + * case-sensitive known HTTP methods (this list MUST be a full override of the default known + * method, it is not a list of known methods in addition to the defaults). + *
  • HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST + * match a known HTTP method name exactly. Instrumentations for specific web frameworks that + * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. + * Tracing instrumentations that do so, MUST also set {@code http.request.method_original} + * to the original value. + *
+ */ + public static final AttributeKey HTTP_REQUEST_METHOD = stringKey("http.request.method"); + + /** Original HTTP method sent by the client in the request line. */ + public static final AttributeKey HTTP_REQUEST_METHOD_ORIGINAL = + stringKey("http.request.method_original"); + + /** + * The ordinal number of request resending attempt (for any reason, including redirects). + * + *

Notes: + * + *

    + *
  • The resend count SHOULD be updated each time an HTTP request gets resent by the client, + * regardless of what was the cause of the resending (e.g. redirection, authorization + * failure, 503 Server Unavailable, network issues, or any other). + *
+ */ + public static final AttributeKey HTTP_REQUEST_RESEND_COUNT = + longKey("http.request.resend_count"); + + /** + * HTTP response headers, {@code } being the normalized HTTP Header name (lowercase), the + * value being the header values. + * + *

Notes: + * + *

    + *
  • 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. + *
+ */ + public static final AttributeKeyTemplate> HTTP_RESPONSE_HEADER = + stringArrayKeyTemplate("http.response.header"); + + /** HTTP response status code. */ + public static final AttributeKey HTTP_RESPONSE_STATUS_CODE = + longKey("http.response.status_code"); + + /** + * The matched route, that is, the path template in the format used by the respective server + * framework. + * + *

Notes: + * + *

    + *
  • MUST NOT be populated when this is not supported by the HTTP server framework as the + * route attribute should have low-cardinality and the URI path can NOT substitute it. + * SHOULD include the application + * root if there is one. + *
+ */ + public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); + + // Enum definitions + public static final class HttpRequestMethodValues { + /** CONNECT method. */ + public static final String CONNECT = "CONNECT"; + + /** DELETE method. */ + public static final String DELETE = "DELETE"; + + /** GET method. */ + public static final String GET = "GET"; + + /** HEAD method. */ + public static final String HEAD = "HEAD"; + + /** OPTIONS method. */ + public static final String OPTIONS = "OPTIONS"; + + /** PATCH method. */ + public static final String PATCH = "PATCH"; + + /** POST method. */ + public static final String POST = "POST"; + + /** PUT method. */ + public static final String PUT = "PUT"; + + /** TRACE method. */ + public static final String TRACE = "TRACE"; + + /** Any HTTP method that the instrumentation has no prior knowledge of. */ + public static final String OTHER = "_OTHER"; + + private HttpRequestMethodValues() {} + } + + private HttpAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/NetworkAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/NetworkAttributes.java new file mode 100644 index 0000000..cd493da --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/NetworkAttributes.java @@ -0,0 +1,113 @@ +/* + * 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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class NetworkAttributes { + + /** Local address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_LOCAL_ADDRESS = + stringKey("network.local.address"); + + /** Local port number of the network connection. */ + public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); + + /** Peer address of the network connection - IP address or Unix domain socket name. */ + public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); + + /** Peer port number of the network connection. */ + public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); + + /** + * OSI application layer or non-OSI + * equivalent. + * + *

Notes: + * + *

    + *
  • The value SHOULD be normalized to lowercase. + *
+ */ + public static final AttributeKey NETWORK_PROTOCOL_NAME = + stringKey("network.protocol.name"); + + /** + * Version of the protocol specified in {@code network.protocol.name}. + * + *

Notes: + * + *

    + *
  • {@code network.protocol.version} refers to the version of the protocol used and might be + * different from the protocol client's version. If the HTTP client has a version of {@code + * 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to {@code 1.1}. + *
+ */ + public static final AttributeKey NETWORK_PROTOCOL_VERSION = + stringKey("network.protocol.version"); + + /** + * OSI transport layer or inter-process communication + * method. + * + *

Notes: + * + *

    + *
  • The value SHOULD be normalized to lowercase. + *
  • Consider always setting the transport when setting a port number, since a port number is + * ambiguous without knowing the transport. For example different processes could be + * listening on TCP port 12345 and UDP port 12345. + *
+ */ + public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); + + /** + * OSI network layer or non-OSI equivalent. + * + *

Notes: + * + *

    + *
  • The value SHOULD be normalized to lowercase. + *
+ */ + public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); + + // Enum definitions + public static final class NetworkTransportValues { + /** TCP. */ + public static final String TCP = "tcp"; + + /** UDP. */ + public static final String UDP = "udp"; + + /** Named or anonymous pipe. */ + public static final String PIPE = "pipe"; + + /** Unix domain socket. */ + public static final String UNIX = "unix"; + + private NetworkTransportValues() {} + } + + public static final class NetworkTypeValues { + /** IPv4. */ + public static final String IPV4 = "ipv4"; + + /** IPv6. */ + public static final String IPV6 = "ipv6"; + + private NetworkTypeValues() {} + } + + private NetworkAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java deleted file mode 100644 index ec1b789..0000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/ResourceAttributes.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv; - -// DO NOT EDIT, this is an Auto-generated file from -// buildscripts/templates/SemanticAttributes.java.j2 -@SuppressWarnings("unused") -public final class ResourceAttributes { - - // Enum definitions - - private ResourceAttributes() {} -} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java deleted file mode 100644 index e41c041..0000000 --- a/semconv/src/main/java/io/opentelemetry/semconv/SemanticAttributes.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * 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 static io.opentelemetry.semconv.AttributeKeyTemplate.stringArrayKeyTemplate; - -import io.opentelemetry.api.common.AttributeKey; -import java.util.List; - -// DO NOT EDIT, this is an Auto-generated file from -// buildscripts/templates/SemanticAttributes.java.j2 -@SuppressWarnings("unused") -public final class SemanticAttributes { - /** - * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or - * Unix domain socket name. - * - *

Notes: - * - *

    - *
  • When observed from the server side, and when communicating through an intermediary, - * {@code client.address} SHOULD represent the client address behind any intermediaries, for - * example proxies, if it's available. - *
- */ - public static final AttributeKey CLIENT_ADDRESS = stringKey("client.address"); - - /** - * Client port number. - * - *

Notes: - * - *

    - *
  • When observed from the server side, and when communicating through an intermediary, - * {@code client.port} SHOULD represent the client port behind any intermediaries, for - * example proxies, if it's available. - *
- */ - public static final AttributeKey CLIENT_PORT = longKey("client.port"); - - /** - * Describes a class of error the operation ended with. - * - *

Notes: - * - *

    - *
  • The {@code error.type} SHOULD be predictable and SHOULD have low cardinality. - * Instrumentations SHOULD document the list of errors they report. - *
  • The cardinality of {@code error.type} within one instrumentation library SHOULD be low. - * Telemetry consumers that aggregate data from multiple instrumentation libraries and - * applications should be prepared for {@code error.type} to have high cardinality at query - * time when no additional filters are applied. - *
  • If the operation has completed successfully, instrumentations SHOULD NOT set {@code - * error.type}. - *
  • If a specific domain defines its own set of error identifiers (such as HTTP or gRPC - * status codes), it's RECOMMENDED to: - *
  • Use a domain-specific attribute - *
  • Set {@code error.type} to capture all errors, regardless of whether they are defined - * within the domain-specific set or not. - *
- */ - public static final AttributeKey ERROR_TYPE = stringKey("error.type"); - - /** - * HTTP request method. - * - *

Notes: - * - *

    - *
  • HTTP request method value SHOULD be "known" to the instrumentation. By default, - * this convention defines "known" methods as the ones listed in RFC9110 and the PATCH - * method defined in RFC5789. - *
  • If the HTTP request method is not known to instrumentation, it MUST set the {@code - * http.request.method} attribute to {@code _OTHER}. - *
  • If the HTTP instrumentation could end up converting valid HTTP request methods to {@code - * _OTHER}, then it MUST provide a way to override the list of known HTTP methods. If this - * override is done via environment variable, then the environment variable MUST be named - * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of - * case-sensitive known HTTP methods (this list MUST be a full override of the default known - * method, it is not a list of known methods in addition to the defaults). - *
  • HTTP method names are case-sensitive and {@code http.request.method} attribute value MUST - * match a known HTTP method name exactly. Instrumentations for specific web frameworks that - * consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. - * Tracing instrumentations that do so, MUST also set {@code http.request.method_original} - * to the original value. - *
- */ - public static final AttributeKey HTTP_REQUEST_METHOD = stringKey("http.request.method"); - - /** Original HTTP method sent by the client in the request line. */ - public static final AttributeKey HTTP_REQUEST_METHOD_ORIGINAL = - stringKey("http.request.method_original"); - - /** - * The ordinal number of request resending attempt (for any reason, including redirects). - * - *

Notes: - * - *

    - *
  • The resend count SHOULD be updated each time an HTTP request gets resent by the client, - * regardless of what was the cause of the resending (e.g. redirection, authorization - * failure, 503 Server Unavailable, network issues, or any other). - *
- */ - public static final AttributeKey HTTP_REQUEST_RESEND_COUNT = - longKey("http.request.resend_count"); - - /** HTTP response status code. */ - public static final AttributeKey HTTP_RESPONSE_STATUS_CODE = - longKey("http.response.status_code"); - - /** - * The matched route, that is, the path template in the format used by the respective server - * framework. - * - *

Notes: - * - *

    - *
  • MUST NOT be populated when this is not supported by the HTTP server framework as the - * route attribute should have low-cardinality and the URI path can NOT substitute it. - * SHOULD include the application - * root if there is one. - *
- */ - public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); - - /** Local address of the network connection - IP address or Unix domain socket name. */ - public static final AttributeKey NETWORK_LOCAL_ADDRESS = - stringKey("network.local.address"); - - /** Local port number of the network connection. */ - public static final AttributeKey NETWORK_LOCAL_PORT = longKey("network.local.port"); - - /** Peer address of the network connection - IP address or Unix domain socket name. */ - public static final AttributeKey NETWORK_PEER_ADDRESS = stringKey("network.peer.address"); - - /** Peer port number of the network connection. */ - public static final AttributeKey NETWORK_PEER_PORT = longKey("network.peer.port"); - - /** - * OSI application layer or non-OSI - * equivalent. - * - *

Notes: - * - *

    - *
  • The value SHOULD be normalized to lowercase. - *
- */ - public static final AttributeKey NETWORK_PROTOCOL_NAME = - stringKey("network.protocol.name"); - - /** - * Version of the protocol specified in {@code network.protocol.name}. - * - *

Notes: - * - *

    - *
  • {@code network.protocol.version} refers to the version of the protocol used and might be - * different from the protocol client's version. If the HTTP client has a version of {@code - * 0.27.2}, but sends HTTP version {@code 1.1}, this attribute should be set to {@code 1.1}. - *
- */ - public static final AttributeKey NETWORK_PROTOCOL_VERSION = - stringKey("network.protocol.version"); - - /** - * OSI transport layer or inter-process communication - * method. - * - *

Notes: - * - *

    - *
  • The value SHOULD be normalized to lowercase. - *
  • Consider always setting the transport when setting a port number, since a port number is - * ambiguous without knowing the transport. For example different processes could be - * listening on TCP port 12345 and UDP port 12345. - *
- */ - public static final AttributeKey NETWORK_TRANSPORT = stringKey("network.transport"); - - /** - * OSI network layer or non-OSI equivalent. - * - *

Notes: - * - *

    - *
  • The value SHOULD be normalized to lowercase. - *
- */ - public static final AttributeKey NETWORK_TYPE = stringKey("network.type"); - - /** The URI fragment component */ - public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); - - /** - * Absolute URL describing a network resource according to RFC3986 - * - *

Notes: - * - *

    - *
  • For network calls, URL usually has {@code scheme://host[:port][path][?query][#fragment]} - * format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be - * included nevertheless. {@code url.full} MUST NOT contain credentials passed via URL in - * form of {@code https://username:password@www.example.com/}. In such case username and - * password SHOULD be redacted and attribute's value SHOULD be {@code - * https://REDACTED:REDACTED@www.example.com/}. {@code url.full} SHOULD capture the absolute - * URL when it is available (or can be reconstructed) and SHOULD NOT be validated or - * modified except for sanitizing purposes. - *
- */ - public static final AttributeKey URL_FULL = stringKey("url.full"); - - /** The URI path component */ - public static final AttributeKey URL_PATH = stringKey("url.path"); - - /** - * The URI query component - * - *

Notes: - * - *

    - *
  • Sensitive content provided in query string SHOULD be scrubbed when instrumentations can - * identify it. - *
- */ - public static final AttributeKey URL_QUERY = stringKey("url.query"); - - /** - * The URI scheme component - * identifying the used protocol. - */ - public static final AttributeKey URL_SCHEME = stringKey("url.scheme"); - - /** - * Value of the HTTP - * User-Agent header sent by the client. - */ - public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); - - /** - * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix - * domain socket name. - * - *

Notes: - * - *

    - *
  • When observed from the client side, and when communicating through an intermediary, - * {@code server.address} SHOULD represent the server address behind any intermediaries, for - * example proxies, if it's available. - *
- */ - public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); - - /** - * Server port number. - * - *

Notes: - * - *

    - *
  • When observed from the client side, and when communicating through an intermediary, - * {@code server.port} SHOULD represent the server port behind any intermediaries, for - * example proxies, if it's available. - *
- */ - public static final AttributeKey SERVER_PORT = longKey("server.port"); - - /** - * HTTP request headers, {@code } being the normalized HTTP Header name (lowercase), the - * value being the header values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> HTTP_REQUEST_HEADER = - stringArrayKeyTemplate("http.request.header"); - - /** - * HTTP response headers, {@code } being the normalized HTTP Header name (lowercase), the - * value being the header values. - * - *

Notes: - * - *

    - *
  • 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. - *
- */ - public static final AttributeKeyTemplate> HTTP_RESPONSE_HEADER = - stringArrayKeyTemplate("http.response.header"); - - // Enum definitions - public static final class ErrorTypeValues { - /** - * A fallback error value to be used when the instrumentation doesn't define a custom value. - */ - public static final String OTHER = "_OTHER"; - - private ErrorTypeValues() {} - } - - public static final class HttpRequestMethodValues { - /** CONNECT method. */ - public static final String CONNECT = "CONNECT"; - - /** DELETE method. */ - public static final String DELETE = "DELETE"; - - /** GET method. */ - public static final String GET = "GET"; - - /** HEAD method. */ - public static final String HEAD = "HEAD"; - - /** OPTIONS method. */ - public static final String OPTIONS = "OPTIONS"; - - /** PATCH method. */ - public static final String PATCH = "PATCH"; - - /** POST method. */ - public static final String POST = "POST"; - - /** PUT method. */ - public static final String PUT = "PUT"; - - /** TRACE method. */ - public static final String TRACE = "TRACE"; - - /** Any HTTP method that the instrumentation has no prior knowledge of. */ - public static final String OTHER = "_OTHER"; - - private HttpRequestMethodValues() {} - } - - public static final class NetworkTransportValues { - /** TCP. */ - public static final String TCP = "tcp"; - - /** UDP. */ - public static final String UDP = "udp"; - - /** Named or anonymous pipe. */ - public static final String PIPE = "pipe"; - - /** Unix domain socket. */ - public static final String UNIX = "unix"; - - private NetworkTransportValues() {} - } - - public static final class NetworkTypeValues { - /** IPv4. */ - public static final String IPV4 = "ipv4"; - - /** IPv6. */ - public static final String IPV6 = "ipv6"; - - private NetworkTypeValues() {} - } - - private SemanticAttributes() {} -} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/ServerAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/ServerAttributes.java new file mode 100644 index 0000000..4668cce --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/ServerAttributes.java @@ -0,0 +1,48 @@ +/* + * 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/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class ServerAttributes { + + /** + * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix + * domain socket name. + * + *

Notes: + * + *

    + *
  • When observed from the client side, and when communicating through an intermediary, + * {@code server.address} SHOULD represent the server address behind any intermediaries, for + * example proxies, if it's available. + *
+ */ + public static final AttributeKey SERVER_ADDRESS = stringKey("server.address"); + + /** + * Server port number. + * + *

Notes: + * + *

    + *
  • When observed from the client side, and when communicating through an intermediary, + * {@code server.port} SHOULD represent the server port behind any intermediaries, for + * example proxies, if it's available. + *
+ */ + public static final AttributeKey SERVER_PORT = longKey("server.port"); + + // Enum definitions + + private ServerAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java new file mode 100644 index 0000000..d023f32 --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/UrlAttributes.java @@ -0,0 +1,63 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class UrlAttributes { + + /** The URI fragment component */ + public static final AttributeKey URL_FRAGMENT = stringKey("url.fragment"); + + /** + * Absolute URL describing a network resource according to RFC3986 + * + *

Notes: + * + *

    + *
  • For network calls, URL usually has {@code scheme://host[:port][path][?query][#fragment]} + * format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be + * included nevertheless. {@code url.full} MUST NOT contain credentials passed via URL in + * form of {@code https://username:password@www.example.com/}. In such case username and + * password SHOULD be redacted and attribute's value SHOULD be {@code + * https://REDACTED:REDACTED@www.example.com/}. {@code url.full} SHOULD capture the absolute + * URL when it is available (or can be reconstructed) and SHOULD NOT be validated or + * modified except for sanitizing purposes. + *
+ */ + public static final AttributeKey URL_FULL = stringKey("url.full"); + + /** The URI path component */ + public static final AttributeKey URL_PATH = stringKey("url.path"); + + /** + * The URI query component + * + *

Notes: + * + *

    + *
  • Sensitive content provided in query string SHOULD be scrubbed when instrumentations can + * identify it. + *
+ */ + public static final AttributeKey URL_QUERY = stringKey("url.query"); + + /** + * The URI scheme component + * identifying the used protocol. + */ + public static final AttributeKey URL_SCHEME = stringKey("url.scheme"); + + // Enum definitions + + private UrlAttributes() {} +} diff --git a/semconv/src/main/java/io/opentelemetry/semconv/UserAgentAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/UserAgentAttributes.java new file mode 100644 index 0000000..4e8008a --- /dev/null +++ b/semconv/src/main/java/io/opentelemetry/semconv/UserAgentAttributes.java @@ -0,0 +1,26 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.semconv; + +import static io.opentelemetry.api.common.AttributeKey.stringKey; + +import io.opentelemetry.api.common.AttributeKey; + +// DO NOT EDIT, this is an Auto-generated file from +// buildscripts/templates/SemanticAttributes.java.j2 +@SuppressWarnings("unused") +public final class UserAgentAttributes { + + /** + * Value of the HTTP + * User-Agent header sent by the client. + */ + public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); + + // Enum definitions + + private UserAgentAttributes() {} +} diff --git a/semconv/src/test/java/io/opentelemetry/semconv/AvailabilityTest.java b/semconv/src/test/java/io/opentelemetry/semconv/AvailabilityTest.java index d4932eb..b5e832b 100644 --- a/semconv/src/test/java/io/opentelemetry/semconv/AvailabilityTest.java +++ b/semconv/src/test/java/io/opentelemetry/semconv/AvailabilityTest.java @@ -5,8 +5,10 @@ package io.opentelemetry.semconv; -import static org.assertj.core.api.Assertions.assertThatCode; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; +import java.lang.reflect.Field; import org.junit.jupiter.api.Test; /** A placeholder test which verifies that the generated classes compile and can load. */ @@ -14,12 +16,28 @@ public class AvailabilityTest { @Test void available() { - classAvailable("io.opentelemetry.semconv.ResourceAttributes"); - classAvailable("io.opentelemetry.semconv.SemanticAttributes"); - classAvailable("io.opentelemetry.semconv.SchemaUrls"); + isValidClass("io.opentelemetry.semconv.ClientAttributes"); + isValidClass("io.opentelemetry.semconv.ErrorAttributes"); + isValidClass("io.opentelemetry.semconv.HttpAttributes"); + isValidClass("io.opentelemetry.semconv.NetworkAttributes"); + isValidClass("io.opentelemetry.semconv.ServerAttributes"); + isValidClass("io.opentelemetry.semconv.UrlAttributes"); + isValidClass("io.opentelemetry.semconv.UserAgentAttributes"); + isValidClass("io.opentelemetry.semconv.SchemaUrls"); } - private static void classAvailable(String fqcn) { - assertThatCode(() -> Class.forName(fqcn)).doesNotThrowAnyException(); + private static void isValidClass(String fqcn) { + Class clazz = null; + try { + clazz = Class.forName(fqcn); + } catch (ClassNotFoundException e) { + fail(e.getMessage()); + } + Field[] declaredFields = clazz.getDeclaredFields(); + Class[] declaredClasses = clazz.getDeclaredClasses(); + boolean hasFieldsOrInnerClasses = + (declaredFields != null && declaredFields.length > 0) + || (declaredClasses != null && declaredClasses.length > 0); + assertThat(hasFieldsOrInnerClasses).withFailMessage(() -> fqcn + " is empty").isTrue(); } }