diff --git a/CHANGELOG.md b/CHANGELOG.md index e1d708cc..4a6f4f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ ## Unreleased +* Bump to semantic-conventions v1.31.0 + ([#189](https://github.com/open-telemetry/semantic-conventions-java/pull/189))) +* Harden GitHub Actions + ([#152](https://github.com/open-telemetry/semantic-conventions-java/pull/152), + [#153](https://github.com/open-telemetry/semantic-conventions-java/pull/153), + [#155](https://github.com/open-telemetry/semantic-conventions-java/pull/155)) +* Add OSSF scorecard workflow + ([#156](https://github.com/open-telemetry/semantic-conventions-java/pull/156)) +* Add codeql + ([#157](https://github.com/open-telemetry/semantic-conventions-java/pull/157)) +* Restrict token permissions + ([#161](https://github.com/open-telemetry/semantic-conventions-java/pull/161)) +* Run gradle wrapper check all the time + ([#159](https://github.com/open-telemetry/semantic-conventions-java/pull/159)) +* Add FOSSA license scanning + ([#163](https://github.com/open-telemetry/semantic-conventions-java/pull/163)) +* Update to weaver 0.13.2 and enable javadoc validation + ([#174](https://github.com/open-telemetry/semantic-conventions-java/pull/174)) + ## Version 1.30.0 (2025-02-18) See [1.30.0-rc.1](#version-1300-rc1-2025-01-27). No additional changes. diff --git a/build.gradle.kts b/build.gradle.kts index 5a6b3ce2..4218c00f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,9 +11,10 @@ val snapshot = true // end // The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes -var semanticConventionsVersion = "1.30.0" +var semanticConventionsVersion = "1.31.0" val schemaUrlVersions = listOf( semanticConventionsVersion, + "1.30.0", "1.29.0", "1.28.0", "1.27.0", diff --git a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt index 0805b2d3..f15ba065 100644 --- a/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt +++ b/docs/apidiffs/current_vs_latest/opentelemetry-semconv.txt @@ -1,4 +1,4 @@ -Comparing source compatibility of opentelemetry-semconv-1.30.0-SNAPSHOT.jar against +Comparing source compatibility of opentelemetry-semconv-1.31.0-SNAPSHOT.jar against +++ NEW CLASS: PUBLIC(+) FINAL(+) io.opentelemetry.semconv.AttributeKeyTemplate (not serializable) +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. GENERIC TEMPLATES: +++ T:java.lang.Object @@ -118,6 +118,7 @@ Comparing source compatibility of opentelemetry-semconv-1.30.0-SNAPSHOT.jar agai +++ NEW SUPERCLASS: java.lang.Object +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_24_0 +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_30_0 + +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_31_0 +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_29_0 +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_28_0 +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_27_0 diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java index 48e44da8..65815c3c 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AndroidIncubatingAttributes.java @@ -13,6 +13,17 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class AndroidIncubatingAttributes { + /** + * This attribute represents the state of the application. + * + *

Notes: + * + *

The Android lifecycle states are defined in Activity + * lifecycle callbacks, and from which the {@code OS identifiers} are derived. + */ + public static final AttributeKey ANDROID_APP_STATE = stringKey("android.app.state"); + /** * Uniquely identifies the framework API revision offered by a version ({@code os.version}) of the * android operating system. More information can be found ANDROID_OS_API_LEVEL = stringKey("android.os.api_level"); /** - * Deprecated use the {@code device.app.lifecycle} event definition including {@code - * android.state} as a payload field instead. + * Deprecated. Use {@code android.app.state} instead. * *

Notes: * @@ -30,15 +40,38 @@ public final class AndroidIncubatingAttributes { * href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity * lifecycle callbacks, and from which the {@code OS identifiers} are derived. * - * @deprecated Replaced by {@code device.app.lifecycle}. + * @deprecated Renamed to {@code android.app.state} */ @Deprecated public static final AttributeKey ANDROID_STATE = stringKey("android.state"); // Enum definitions + /** Values for {@link #ANDROID_APP_STATE}. */ + public static final class AndroidAppStateIncubatingValues { + /** + * 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 AndroidAppStateIncubatingValues() {} + } + /** * Values for {@link #ANDROID_STATE} * - * @deprecated Replaced by {@code device.app.lifecycle}. + * @deprecated Renamed to {@code android.app.state} */ @Deprecated public static final class AndroidStateIncubatingValues { diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java index 5d27227f..588c562f 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CicdIncubatingAttributes.java @@ -26,6 +26,13 @@ public final class CicdIncubatingAttributes { public static final AttributeKey CICD_PIPELINE_RUN_STATE = stringKey("cicd.pipeline.run.state"); + /** + * The URL of the pipeline run, providing the + * complete address in order to locate and identify the pipeline run. + */ + public static final AttributeKey CICD_PIPELINE_RUN_URL_FULL = + stringKey("cicd.pipeline.run.url.full"); + /** * The human readable name of a task within a pipeline. Task here most closely aligns with a computing process in a pipeline. @@ -39,8 +46,8 @@ public final class CicdIncubatingAttributes { stringKey("cicd.pipeline.task.run.id"); /** - * The URL of the pipeline run providing the complete - * address in order to locate and identify the pipeline run. + * The URL of the pipeline task run, providing the + * complete address in order to locate and identify the pipeline task run. */ public static final AttributeKey CICD_PIPELINE_TASK_RUN_URL_FULL = stringKey("cicd.pipeline.task.run.url.full"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java index 6e747fb2..2a7e1ef1 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CloudIncubatingAttributes.java @@ -58,8 +58,7 @@ public final class CloudIncubatingAttributes { * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN on * AWS, a fully * qualified resource ID on Azure, a full resource - * name on GCP) + * href="https://google.aip.dev/122#full-resource-names">full resource name on GCP) * *

Notes: * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java index 8fa89d91..d4674a3e 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CodeIncubatingAttributes.java @@ -33,8 +33,12 @@ public final class CodeIncubatingAttributes { */ public static final AttributeKey CODE_FILE_PATH = stringKey("code.file.path"); - /** Deprecated, use {@code code.file.path} instead */ - public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); + /** + * Deprecated, use {@code code.file.path} instead + * + * @deprecated Replaced by {@code code.file.path} + */ + @Deprecated public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); /** * Deprecated, use {@code code.function.name} instead @@ -44,7 +48,30 @@ public final class CodeIncubatingAttributes { @Deprecated public static final AttributeKey CODE_FUNCTION = stringKey("code.function"); /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). + * The method or function fully-qualified name without arguments. The value should fit the natural + * representation of the language runtime, which is also likely the same used within {@code + * code.stacktrace} attribute value. + * + *

Notes: + * + *

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

Examples: + * + *

*/ public static final AttributeKey CODE_FUNCTION_NAME = stringKey("code.function.name"); @@ -62,15 +89,18 @@ public final class CodeIncubatingAttributes { @Deprecated public static final AttributeKey CODE_LINENO = longKey("code.lineno"); /** - * The "namespace" within which {@code code.function.name} is defined. Usually the qualified class - * or module name, such that {@code code.namespace} + some separator + {@code code.function.name} - * form a unique identifier for the code unit. + * Deprecated, namespace is now included into {@code code.function.name} + * + * @deprecated Value should be included in {@code code.function.name} which is expected to be a + * fully-qualified name. */ - public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); + @Deprecated public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); /** * 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. + * representation is identical to {@code + * exception.stacktrace}. */ public static final AttributeKey CODE_STACKTRACE = stringKey("code.stacktrace"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java index 88a7c56e..834f27eb 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/CpuIncubatingAttributes.java @@ -5,6 +5,7 @@ package io.opentelemetry.semconv.incubating; +import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import io.opentelemetry.api.common.AttributeKey; @@ -13,6 +14,9 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class CpuIncubatingAttributes { + /** The logical CPU number [0..n-1] */ + public static final AttributeKey CPU_LOGICAL_NUMBER = longKey("cpu.logical_number"); + /** The mode of the CPU */ public static final AttributeKey CPU_MODE = stringKey("cpu.mode"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java index d0c6bafb..04766c82 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java @@ -122,8 +122,8 @@ public final class DbIncubatingAttributes { *

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

The collection name SHOULD NOT be extracted from {@code db.query.text}, unless the query - * format is known to only ever have a single collection name present. + *

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

For batch operations, if the individual operations are known to have the same collection * name then that collection name SHOULD be used. @@ -339,8 +339,8 @@ public final class DbIncubatingAttributes { *

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

The operation name SHOULD NOT be extracted from {@code db.query.text}, unless the query - * format is known to only ever have a single operation name present. + *

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

For batch operations, if the individual operations are known to have the same operation name * then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code @@ -383,8 +383,8 @@ public final class DbIncubatingAttributes { * database calls involving complex queries. Summary may be available to the instrumentation * through instrumentation hooks or other means. If it is not available, instrumentations that * support query parsing SHOULD generate a summary following Generating - * query summary section. + * href="../database/database-spans.md#generating-a-summary-of-the-query-text">Generating query + * summary section. */ public static final AttributeKey DB_QUERY_SUMMARY = stringKey("db.query.summary"); @@ -394,7 +394,7 @@ public final class DbIncubatingAttributes { *

Notes: * *

For sanitization see Sanitization of {@code + * href="../database/database-spans.md#sanitization-of-dbquerytext">Sanitization of {@code * db.query.text}. For batch operations, if the individual operations are known to have the * same query text then that query text SHOULD be used, otherwise all of the individual query * texts SHOULD be concatenated with separator {@code ; } or some other database system specific diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java index ecdcb642..704dcc11 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/EnduserIncubatingAttributes.java @@ -14,11 +14,36 @@ @SuppressWarnings("unused") public final class EnduserIncubatingAttributes { /** - * Deprecated, use {@code user.id} instead. + * Unique identifier of an end user in the system. It maybe a username, email address, or other + * identifier. * - * @deprecated Replaced by {@code user.id} attribute. + *

Notes: + * + *

Unique identifier of an end user in the system. + * + *

+ * + * [!Warning] This field contains sensitive (PII) information. + * + *
+ */ + public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); + + /** + * Pseudonymous identifier of an end user. This identifier should be a random value that is not + * directly linked or associated with the end user's actual identity. + * + *

Notes: + * + *

Pseudonymous identifier of an end user. + * + *

+ * + * [!Warning] This field contains sensitive (linkable PII) information. + * + *
*/ - @Deprecated public static final AttributeKey ENDUSER_ID = stringKey("enduser.id"); + public static final AttributeKey ENDUSER_PSEUDO_ID = stringKey("enduser.pseudo.id"); /** * Deprecated, use {@code user.roles} instead. diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java index ff9fddd6..682a1ae7 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/GenAiIncubatingAttributes.java @@ -17,6 +17,16 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class GenAiIncubatingAttributes { + /** Free-form description of the GenAI agent provided by the application. */ + public static final AttributeKey GEN_AI_AGENT_DESCRIPTION = + stringKey("gen_ai.agent.description"); + + /** The unique identifier of the GenAI agent. */ + public static final AttributeKey GEN_AI_AGENT_ID = stringKey("gen_ai.agent.id"); + + /** Human-readable name of the GenAI agent provided by the application. */ + public static final AttributeKey GEN_AI_AGENT_NAME = stringKey("gen_ai.agent.name"); + /** * Deprecated, use Event API to report completions contents. * @@ -25,7 +35,12 @@ public final class GenAiIncubatingAttributes { @Deprecated public static final AttributeKey GEN_AI_COMPLETION = stringKey("gen_ai.completion"); - /** The response format that is requested. */ + /** + * Deprecated, use {@code gen_ai.output.type}. + * + * @deprecated Replaced by {@code gen_ai.output.type}. + */ + @Deprecated public static final AttributeKey GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT = stringKey("gen_ai.openai.request.response_format"); @@ -63,6 +78,19 @@ public final class GenAiIncubatingAttributes { public static final AttributeKey GEN_AI_OPERATION_NAME = stringKey("gen_ai.operation.name"); + /** + * Represents the content type requested by the client. + * + *

Notes: + * + *

This attribute SHOULD be used when the client requests output of a specific type. The model + * may return zero or more outputs of this type. This attribute specifies the output modality and + * not the actual output format. For example, if an image is requested, the actual output could be + * a URL pointing to an image file. Additional output format details may be recorded in the future + * in the {@code gen_ai.output.{type}.*} attributes. + */ + public static final AttributeKey GEN_AI_OUTPUT_TYPE = stringKey("gen_ai.output.type"); + /** * Deprecated, use Event API to report prompt contents. * @@ -70,6 +98,10 @@ public final class GenAiIncubatingAttributes { */ @Deprecated public static final AttributeKey GEN_AI_PROMPT = stringKey("gen_ai.prompt"); + /** The target number of candidate completions to return. */ + public static final AttributeKey GEN_AI_REQUEST_CHOICE_COUNT = + longKey("gen_ai.request.choice.count"); + /** * The encoding formats requested in an embeddings operation, if specified. * @@ -149,6 +181,28 @@ public final class GenAiIncubatingAttributes { /** The type of token being counted. */ public static final AttributeKey GEN_AI_TOKEN_TYPE = stringKey("gen_ai.token.type"); + /** The tool call identifier. */ + public static final AttributeKey GEN_AI_TOOL_CALL_ID = stringKey("gen_ai.tool.call.id"); + + /** Name of the tool utilized by the agent. */ + public static final AttributeKey GEN_AI_TOOL_NAME = stringKey("gen_ai.tool.name"); + + /** + * Type of the tool utilized by the agent + * + *

Notes: + * + *

Extension: A tool executed on the agent-side to directly call external APIs, bridging the + * gap between the agent and real-world systems. Agent-side operations involve actions that are + * performed by the agent on the server or within the agent's controlled environment. Function: A + * tool executed on the client-side, where the agent generates parameters for a predefined + * function, and the client executes the logic. Client-side operations are actions taken on the + * user's end or within the client application. Datastore: A tool used by the agent to access and + * query structured or unstructured external data for retrieval-augmented tasks or knowledge + * updates. + */ + public static final AttributeKey GEN_AI_TOOL_TYPE = stringKey("gen_ai.tool.type"); + /** * Deprecated, use {@code gen_ai.usage.output_tokens} instead. * @@ -176,7 +230,12 @@ public final class GenAiIncubatingAttributes { longKey("gen_ai.usage.prompt_tokens"); // Enum definitions - /** Values for {@link #GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT}. */ + /** + * Values for {@link #GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT} + * + * @deprecated Replaced by {@code gen_ai.output.type}. + */ + @Deprecated public static final class GenAiOpenaiRequestResponseFormatIncubatingValues { /** Text response format */ public static final String TEXT = "text"; @@ -223,9 +282,32 @@ public static final class GenAiOperationNameIncubatingValues { */ public static final String EMBEDDINGS = "embeddings"; + /** Create GenAI agent */ + public static final String CREATE_AGENT = "create_agent"; + + /** Execute a tool */ + public static final String EXECUTE_TOOL = "execute_tool"; + private GenAiOperationNameIncubatingValues() {} } + /** Values for {@link #GEN_AI_OUTPUT_TYPE}. */ + public static final class GenAiOutputTypeIncubatingValues { + /** Plain text */ + public static final String TEXT = "text"; + + /** JSON object with known or unknown schema */ + public static final String JSON = "json"; + + /** Image */ + public static final String IMAGE = "image"; + + /** Speech */ + public static final String SPEECH = "speech"; + + private GenAiOutputTypeIncubatingValues() {} + } + /** Values for {@link #GEN_AI_SYSTEM}. */ public static final class GenAiSystemIncubatingValues { /** OpenAI */ @@ -281,6 +363,9 @@ public static final class GenAiTokenTypeIncubatingValues { /** Output tokens (completion, response, etc.) */ public static final String COMPLETION = "output"; + /** Output tokens (completion, response, etc.) */ + public static final String OUTPUT = "output"; + private GenAiTokenTypeIncubatingValues() {} } diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java index c05fb4d8..874356f6 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/K8sIncubatingAttributes.java @@ -83,6 +83,12 @@ public final class K8sIncubatingAttributes { /** The UID of the Deployment. */ public static final AttributeKey K8S_DEPLOYMENT_UID = stringKey("k8s.deployment.uid"); + /** The name of the horizontal pod autoscaler. */ + public static final AttributeKey K8S_HPA_NAME = stringKey("k8s.hpa.name"); + + /** The UID of the horizontal pod autoscaler. */ + public static final AttributeKey K8S_HPA_UID = stringKey("k8s.hpa.uid"); + /** The name of the Job. */ public static final AttributeKey K8S_JOB_NAME = stringKey("k8s.job.name"); @@ -144,6 +150,22 @@ public final class K8sIncubatingAttributes { /** The UID of the ReplicaSet. */ public static final AttributeKey K8S_REPLICASET_UID = stringKey("k8s.replicaset.uid"); + /** The name of the replication controller. */ + public static final AttributeKey K8S_REPLICATIONCONTROLLER_NAME = + stringKey("k8s.replicationcontroller.name"); + + /** The UID of the replication controller. */ + public static final AttributeKey K8S_REPLICATIONCONTROLLER_UID = + stringKey("k8s.replicationcontroller.uid"); + + /** The name of the resource quota. */ + public static final AttributeKey K8S_RESOURCEQUOTA_NAME = + stringKey("k8s.resourcequota.name"); + + /** The UID of the resource quota. */ + public static final AttributeKey K8S_RESOURCEQUOTA_UID = + stringKey("k8s.resourcequota.uid"); + /** The name of the StatefulSet. */ public static final AttributeKey K8S_STATEFULSET_NAME = stringKey("k8s.statefulset.name"); 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 index 5c3f09cb..29784b84 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OciIncubatingAttributes.java @@ -23,7 +23,7 @@ public final class OciIncubatingAttributes { * Image Manifest Specification, and specifically the Digest * property. An example can be found in Example + * href="https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest">Example * Image Manifest. */ public static final AttributeKey OCI_MANIFEST_DIGEST = stringKey("oci.manifest.digest"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java index 0213e1da..60a1e330 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/OtelIncubatingAttributes.java @@ -13,6 +13,43 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class OtelIncubatingAttributes { + /** + * A name uniquely identifying the instance of the OpenTelemetry component within its containing + * SDK instance. + * + *

Notes: + * + *

Implementations SHOULD ensure a low cardinality for this attribute, even across application + * or SDK restarts. E.g. implementations MUST NOT use UUIDs as values for this attribute. + * + *

Implementations MAY achieve these goals by following a {@code + * /} pattern, e.g. {@code batching_span_processor/0}. + * Hereby {@code otel.component.type} refers to the corresponding attribute value of the + * component. + * + *

The value of {@code instance-counter} MAY be automatically assigned by the component and + * uniqueness within the enclosing SDK instance MUST be guaranteed. For example, {@code + * } MAY be implemented by using a monotonically increasing counter (starting + * with {@code 0}), which is incremented every time an instance of the given component type is + * started. + * + *

With this implementation, for example the first Batching Span Processor would have {@code + * batching_span_processor/0} as {@code otel.component.name}, the second one {@code + * batching_span_processor/1} and so on. These values will therefore be reused in the case of an + * application restart. + */ + public static final AttributeKey OTEL_COMPONENT_NAME = stringKey("otel.component.name"); + + /** + * A name identifying the type of the OpenTelemetry component. + * + *

Notes: + * + *

If none of the standardized values apply, implementations SHOULD use the language-defined + * name of the type. E.g. for Java the fully qualified classname SHOULD be used in this case. + */ + public static final AttributeKey OTEL_COMPONENT_TYPE = stringKey("otel.component.type"); + /** * Deprecated. Use the {@code otel.scope.name} attribute * @@ -47,6 +84,10 @@ public final class OtelIncubatingAttributes { @Deprecated public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); + /** The result value of the sampler for this span */ + public static final AttributeKey OTEL_SPAN_SAMPLING_RESULT = + stringKey("otel.span.sampling_result"); + /** * Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET. * @@ -67,6 +108,40 @@ public final class OtelIncubatingAttributes { stringKey("otel.status_description"); // Enum definitions + /** Values for {@link #OTEL_COMPONENT_TYPE}. */ + public static final class OtelComponentTypeIncubatingValues { + /** The builtin SDK Batching Span Processor */ + public static final String BATCHING_SPAN_PROCESSOR = "batching_span_processor"; + + /** The builtin SDK Simple Span Processor */ + public static final String SIMPLE_SPAN_PROCESSOR = "simple_span_processor"; + + /** OTLP span exporter over gRPC with protobuf serialization */ + public static final String OTLP_GRPC_SPAN_EXPORTER = "otlp_grpc_span_exporter"; + + /** OTLP span exporter over HTTP with protobuf serialization */ + public static final String OTLP_HTTP_SPAN_EXPORTER = "otlp_http_span_exporter"; + + /** OTLP span exporter over HTTP with JSON serialization */ + public static final String OTLP_HTTP_JSON_SPAN_EXPORTER = "otlp_http_json_span_exporter"; + + private OtelComponentTypeIncubatingValues() {} + } + + /** Values for {@link #OTEL_SPAN_SAMPLING_RESULT}. */ + public static final class OtelSpanSamplingResultIncubatingValues { + /** The span is not sampled and not recording */ + public static final String DROP = "DROP"; + + /** The span is not sampled, but recording */ + public static final String RECORD_ONLY = "RECORD_ONLY"; + + /** The span is sampled and recording */ + public static final String RECORD_AND_SAMPLE = "RECORD_AND_SAMPLE"; + + private OtelSpanSamplingResultIncubatingValues() {} + } + /** * Values for {@link #OTEL_STATUS_CODE}. * diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java index 4d671a95..d7eb82b6 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ProcessIncubatingAttributes.java @@ -91,9 +91,9 @@ public final class ProcessIncubatingAttributes { stringKey("process.executable.build_id.profiling"); /** - * 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}. + * The name of the process executable. On Linux based systems, this SHOULD be set to the base name + * of the target of {@code /proc/[pid]/exe}. On Windows, this SHOULD be set to the base name of + * {@code GetProcessImageFileNameW}. */ public static final AttributeKey PROCESS_EXECUTABLE_NAME = stringKey("process.executable.name"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java index 718ec6df..56ecc1b4 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/RpcIncubatingAttributes.java @@ -18,7 +18,7 @@ @SuppressWarnings("unused") public final class RpcIncubatingAttributes { /** - * The error codes of the Connect + * The error codes of the Connect * request. Error codes are always string values. */ public static final AttributeKey RPC_CONNECT_RPC_ERROR_CODE = diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java index faeacac4..91084343 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/SystemIncubatingAttributes.java @@ -14,7 +14,7 @@ // buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2 @SuppressWarnings("unused") public final class SystemIncubatingAttributes { - /** The logical CPU number [0..n-1] */ + /** Deprecated, use {@code cpu.logical_number} instead. */ public static final AttributeKey SYSTEM_CPU_LOGICAL_NUMBER = longKey("system.cpu.logical_number"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java index b8fd423e..b66f4d21 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/TlsIncubatingAttributes.java @@ -117,15 +117,15 @@ public final class TlsIncubatingAttributes { /** * Normalized lowercase protocol name parsed from original string of the negotiated SSL/TLS - * protocol version + * href="https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values">SSL/TLS protocol + * version */ public static final AttributeKey TLS_PROTOCOL_NAME = stringKey("tls.protocol.name"); /** * Numeric part of the version parsed from the original string of the negotiated SSL/TLS - * protocol version + * href="https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values">SSL/TLS protocol + * version */ public static final AttributeKey TLS_PROTOCOL_VERSION = stringKey("tls.protocol.version"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java index 73a41fde..64ddb29d 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UrlIncubatingAttributes.java @@ -162,7 +162,7 @@ public final class UrlIncubatingAttributes { * *

Notes: * - *

This value can be determined precisely with the public + *

This value can be determined precisely with the public * suffix list. For example, the registered domain for {@code foo.example.com} is {@code * example.com}. Trying to approximate this by simply taking the last two labels will not work * well for TLDs such as {@code co.uk}. @@ -205,7 +205,7 @@ public final class UrlIncubatingAttributes { * *

Notes: * - *

This value can be determined precisely with the public + *

This value can be determined precisely with the public * suffix list. */ public static final AttributeKey URL_TOP_LEVEL_DOMAIN = stringKey("url.top_level_domain"); diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java index bb1bae47..37fda492 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/UserAgentIncubatingAttributes.java @@ -35,6 +35,28 @@ public final class UserAgentIncubatingAttributes { @Deprecated public static final AttributeKey USER_AGENT_ORIGINAL = stringKey("user_agent.original"); + /** + * Human readable operating system name. + * + *

Notes: + * + *

For mapping user agent strings to OS names, libraries such as ua-parser can be utilized. + */ + public static final AttributeKey USER_AGENT_OS_NAME = stringKey("user_agent.os.name"); + + /** + * The version string of the operating system as defined in Version Attributes. + * + *

Notes: + * + *

For mapping user agent strings to OS versions, libraries such as ua-parser can be utilized. + */ + public static final AttributeKey USER_AGENT_OS_VERSION = + stringKey("user_agent.os.version"); + /** * Specifies the category of synthetic traffic, such as tests or bots. * diff --git a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java index b8a82681..8cef5029 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/SchemaUrls.java @@ -7,6 +7,7 @@ public final class SchemaUrls { + public static final String V1_31_0 = "https://opentelemetry.io/schemas/1.31.0"; public static final String V1_30_0 = "https://opentelemetry.io/schemas/1.30.0"; public static final String V1_29_0 = "https://opentelemetry.io/schemas/1.29.0"; public static final String V1_28_0 = "https://opentelemetry.io/schemas/1.28.0";