diff --git a/buildscripts/checkstyle-suppressions.xml b/buildscripts/checkstyle-suppressions.xml index a579d8189e..1077abc3fa 100644 --- a/buildscripts/checkstyle-suppressions.xml +++ b/buildscripts/checkstyle-suppressions.xml @@ -6,4 +6,5 @@ + diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh index 2e05772f75..f3740ab318 100755 --- a/buildscripts/semantic-convention/generate.sh +++ b/buildscripts/semantic-convention/generate.sh @@ -7,7 +7,7 @@ ROOT_DIR="${SCRIPT_DIR}/../../" SEMCONV_VERSION=1.5.0 SPEC_VERSION=v$SEMCONV_VERSION SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION -GENERATOR_VERSION=0.3.1 +GENERATOR_VERSION=0.4.1 cd ${SCRIPT_DIR} diff --git a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 index c38adbc3a2..c01c3ae78c 100644 --- a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 +++ b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 @@ -64,10 +64,10 @@ public final class {{class}} { {%- for attribute in attributes if attribute.is_local and not attribute.ref %} /** - * {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} + * {{attribute.brief | render_markdown}} {%- if attribute.note %} * - * Note: {% filter escape %}{{attribute.note | to_doc_brief}}.{% endfilter %} + *

Notes: {{attribute.note | render_markdown}} {%- endif %} {%- if attribute.deprecated %} * diff --git a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java index 8400342996..666a2fc5b0 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java @@ -25,11 +25,11 @@ public final class ResourceAttributes { public static final AttributeKey CLOUD_ACCOUNT_ID = stringKey("cloud.account.id"); /** - * The geographical region the resource is running. Refer to your provider's docs to see the - * available regions, for example [AWS - * regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure - * regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google - * Cloud regions](https://cloud.google.com/about/locations). + * The geographical region the resource is running. Refer to your provider's docs to see the + * available regions, for example AWS regions, Azure regions, + * or Google Cloud regions. */ public static final AttributeKey CLOUD_REGION = stringKey("cloud.region"); @@ -37,7 +37,9 @@ public final class ResourceAttributes { * Cloud regions often have multiple, isolated locations known as zones to increase availability. * Availability zone represents the zone where the resource is running. * - *

Note: Availability zones are called "zones" on Google Cloud. + *

Notes: + * + *

Availability zones are called "zones" on Google Cloud. */ public static final AttributeKey CLOUD_AVAILABILITY_ZONE = stringKey("cloud.availability_zone"); @@ -45,33 +47,38 @@ public final class ResourceAttributes { /** * The cloud platform in use. * - *

Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + *

Notes: + * + *

The prefix of the service SHOULD match the one specified in cloud.provider. */ public static final AttributeKey CLOUD_PLATFORM = stringKey("cloud.platform"); /** - * The Amazon Resource Name (ARN) of an [ECS container - * instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + * The Amazon Resource Name (ARN) of an ECS + * container instance. */ public static final AttributeKey AWS_ECS_CONTAINER_ARN = stringKey("aws.ecs.container.arn"); /** - * The ARN of an [ECS - * cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + * The ARN of an ECS + * cluster. */ public static final AttributeKey AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); /** - * The [launch - * type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS - * task. + * 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](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + * The ARN of an ECS + * task definition. */ public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); @@ -88,8 +95,10 @@ public final class ResourceAttributes { /** * The name(s) of the AWS log group(s) an application is writing to. * - *

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

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"); @@ -97,8 +106,11 @@ public final class ResourceAttributes { /** * The Amazon Resource Name(s) (ARN) of the AWS log group(s). * - *

Note: See the [log group ARN format - * documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + *

Notes: + * + *

See the log + * group ARN format documentation. */ public static final AttributeKey> AWS_LOG_GROUP_ARNS = stringArrayKey("aws.log.group.arns"); @@ -110,10 +122,12 @@ public final class ResourceAttributes { /** * The ARN(s) of the AWS log stream(s). * - *

Note: See the [log stream ARN format - * documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - * One log group can contain several log streams, so these ARNs necessarily identify both a log - * group and a log stream. + *

Notes: + * + *

See the log + * stream ARN format documentation. One log group can contain several log streams, so these + * ARNs necessarily identify both a log group and a log stream. */ public static final AttributeKey> AWS_LOG_STREAM_ARNS = stringArrayKey("aws.log.stream.arns"); @@ -122,9 +136,9 @@ public final class ResourceAttributes { public static final AttributeKey CONTAINER_NAME = stringKey("container.name"); /** - * Container ID. Usually a UUID, as for example used to [identify Docker - * containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID - * might be abbreviated. + * 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"); @@ -138,89 +152,116 @@ public final class ResourceAttributes { public static final AttributeKey CONTAINER_IMAGE_TAG = stringKey("container.image.tag"); /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka - * deployment tier). + * Name of the deployment + * environment (aka deployment tier). */ public static final AttributeKey DEPLOYMENT_ENVIRONMENT = stringKey("deployment.environment"); /** - * A unique identifier representing the device. + * A unique identifier representing the device * - *

Note: 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](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). - * 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](https://developer.android.com/training/articles/user-data-ids) 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. + *

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 model identifier for the device. + * The model identifier for the device * - *

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

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. + * The marketing name for the device model * - *

Note: It's recommended this value represents a human readable version of the device - * model rather than a machine readable alternative. + *

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 name of the single function that this runtime instance executes. * - *

Note: 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.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) - * span attributes). + *

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.namespace/code.function span attributes). */ public static final AttributeKey FAAS_NAME = stringKey("faas.name"); /** * The unique ID of the single function that this runtime instance executes. * - *

Note: Depending on the cloud provider, use: + *

Notes: * - *

**AWS Lambda:** The function - * [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). Take care - * not to use the "invoked ARN" directly but replace any [alias - * suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the - * resolved function version, as the same runtime instance may be invokable with multiple - * different aliases. **GCP:** The [URI of the - * resource](https://cloud.google.com/iam/docs/full-resource-names) **Azure:** The [Fully - * Qualified Resource - * ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). + *

Depending on the cloud provider, use: + * + *

+ * + *

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

* *

On some providers, it may not be possible to determine the full ID at startup, which is why * this field cannot be made required. For example, on AWS the account ID part of the ARN is not * available without calling another AWS API which may be deemed too slow for a short-running - * lambda function. As an alternative, consider setting `faas.id` as a span attribute instead. + * lambda function. As an alternative, consider setting faas.id as a span attribute + * instead. */ public static final AttributeKey FAAS_ID = stringKey("faas.id"); /** * The immutable version of the function being executed. * - *

Note: Depending on the cloud provider and platform, use: + *

Notes: * - *

**AWS Lambda:** The [function - * version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) (an integer - * represented as a decimal string). **Google Cloud Run:** The - * [revision](https://cloud.google.com/run/docs/managing/revisions) (i.e., the function name plus - * the revision suffix). **Google Cloud Functions:** The value of the [`K_REVISION` environment - * variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. + *

Depending on the cloud provider and platform, use: + * + *

*/ public static final AttributeKey FAAS_VERSION = stringKey("faas.version"); @@ -228,16 +269,22 @@ public final class ResourceAttributes { * The execution environment ID as a string, that will be potentially reused for other invocations * to the same function/function version. * - *

Note: * **AWS Lambda:** Use the (full) log stream name. + *

Notes: + * + *

*/ public static final AttributeKey FAAS_INSTANCE = stringKey("faas.instance"); /** * The amount of memory available to the serverless function in MiB. * - *

Note: 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 - * `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. + *

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 + * AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this information. */ public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); @@ -263,8 +310,8 @@ public final class ResourceAttributes { public static final AttributeKey HOST_IMAGE_ID = stringKey("host.image.id"); /** - * The version string of the VM image as defined in [Version - * Attributes](README.md#version-attributes). + * The version string of the VM image as defined in Version + * Attributes. */ public static final AttributeKey HOST_IMAGE_VERSION = stringKey("host.image.version"); @@ -329,8 +376,8 @@ public final class ResourceAttributes { public static final AttributeKey OS_TYPE = stringKey("os.type"); /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` - * or `lsb_release -a` commands. + * Human readable (not intended to be parsed) OS version information, like e.g. reported by + * ver or lsb_release -a commands. */ public static final AttributeKey OS_DESCRIPTION = stringKey("os.description"); @@ -338,8 +385,8 @@ public final class ResourceAttributes { public static final AttributeKey OS_NAME = stringKey("os.name"); /** - * The version string of the operating system as defined in [Version - * Attributes](../../resource/semantic_conventions/README.md#version-attributes). + * The version string of the operating system as defined in Version Attributes. */ public static final AttributeKey OS_VERSION = stringKey("os.version"); @@ -347,38 +394,40 @@ public final class ResourceAttributes { public static final AttributeKey PROCESS_PID = longKey("process.pid"); /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in - * `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. + * The name of the process executable. On Linux based systems, can be set to the Name + * in proc/[pid]/status. On Windows, can be set to the base name of + * 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 - * `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. + * proc/[pid]/exe. On Windows, can be set to the result of + * GetProcessImageFileNameW. */ public static final AttributeKey PROCESS_EXECUTABLE_PATH = stringKey("process.executable.path"); /** * The command used to launch the process (i.e. the command name). On Linux based systems, can be - * set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter - * extracted from `GetCommandLineW`. + * set to the zeroth string in proc/[pid]/cmdline. On Windows, can be set to the + * first parameter extracted from GetCommandLineW. */ public static final AttributeKey PROCESS_COMMAND = stringKey("process.command"); /** * 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 `GetCommandLineW`. Do not set this if you have to - * assemble it just for monitoring; use `process.command_args` instead. + * On Windows, can be set to the result of GetCommandLineW. Do not set this if you + * have to assemble it just for monitoring; use process.command_args instead. */ public static final AttributeKey PROCESS_COMMAND_LINE = stringKey("process.command_line"); /** * 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 `proc/[pid]/cmdline`. For libc-based - * executables, this would be the full argv vector passed to `main`. + * to the list of null-delimited strings extracted from proc/[pid]/cmdline. For + * libc-based executables, this would be the full argv vector passed to main. */ public static final AttributeKey> PROCESS_COMMAND_ARGS = stringArrayKey("process.command_args"); @@ -408,37 +457,45 @@ public final class ResourceAttributes { /** * Logical name of the service. * - *

Note: MUST be the same for all instances of horizontally scaled services. If the value was - * not specified, SDKs MUST fallback to `unknown_service:` concatenated with - * [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If - * `process.executable.name` is not available, the value MUST be set to `unknown_service`. + *

Notes: + * + *

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

Note: 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. `service.name` is expected to be unique - * within the same namespace. If `service.namespace` is not specified in the Resource then - * `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. + *

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. service.name is expected to be unique + * within the same namespace. If service.namespace is not specified in the Resource + * then 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 string ID of the service instance. * - *

Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in - * other words `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). + *

Notes: + * + *

MUST be unique for each instance of the same service.namespace,service.name + * pair (in other words 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"); diff --git a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java index cb61ca55ea..eac439de86 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java @@ -21,10 +21,13 @@ public final class SemanticAttributes { public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.5.0"; /** - * The full invoked ARN as provided on the `Context` passed to the function - * (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). + * The full invoked ARN as provided on the Context passed to the function ( + * Lambda-Runtime-Invoked-Function-Arn header on the /runtime/invocation/next + * applicable). * - *

Note: This may be different from `faas.id` if an alias is involved. + *

Notes: + * + *

This may be different from faas.id if an alias is involved. */ public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = stringKey("aws.lambda.invoked_arn"); @@ -45,53 +48,64 @@ public final class SemanticAttributes { public static final AttributeKey DB_USER = stringKey("db.user"); /** - * The fully-qualified class name of the [Java Database Connectivity - * (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. + * 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"); /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, - * 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). + * If no tech-specific attribute is + * defined, 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). * - *

Note: In some SQL databases, the database name to be used is called "schema name". + *

Notes: + * + *

In some SQL databases, the database name to be used is called "schema name". */ public static final AttributeKey DB_NAME = stringKey("db.name"); /** * The database statement being executed. * - *

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

Notes: + * + *

The value may be sanitized to exclude sensitive information. */ public static final AttributeKey DB_STATEMENT = stringKey("db.statement"); /** - * The name of the operation being executed, e.g. the [MongoDB command - * name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as - * `findAndModify`, or the SQL keyword. + * The name of the operation being executed, e.g. the MongoDB command + * name such as findAndModify, or the SQL keyword. * - *

Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side - * parsing of `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. + *

Notes: + * + *

When setting this to an SQL keyword, it is not recommended to attempt any client-side + * parsing of 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 Microsoft SQL Server [instance - * name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) - * connecting to. This name is used to determine the port of a named instance. + * The Microsoft SQL Server instance + * name connecting to. This name is used to determine the port of a named instance. * - *

Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but - * still recommended if non-standard). + *

Notes: + * + *

If setting a db.mssql.instance_name, net.peer.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 name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. + * The name of the keyspace being accessed. To be used instead of the generic db.name + * attribute. */ public static final AttributeKey DB_CASSANDRA_KEYSPACE = stringKey("db.cassandra.keyspace"); @@ -100,8 +114,8 @@ public final class SemanticAttributes { public static final AttributeKey DB_CASSANDRA_PAGE_SIZE = longKey("db.cassandra.page_size"); /** - * The consistency level of the query. Based on consistency values from - * [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + * 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"); @@ -110,8 +124,10 @@ public final class SemanticAttributes { * The name of the primary table that the operation is acting upon, including the schema name (if * applicable). * - *

Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It - * is not recommended to attempt any client-side parsing of `db.statement` just to get this + *

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 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. @@ -123,8 +139,8 @@ public final class SemanticAttributes { booleanKey("db.cassandra.idempotence"); /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not - * executed speculatively. + * The number of times a query was speculatively executed. Not set or 0 if the query + * was not executed speculatively. */ public static final AttributeKey DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = longKey("db.cassandra.speculative_execution_count"); @@ -138,20 +154,20 @@ public final class SemanticAttributes { stringKey("db.cassandra.coordinator.dc"); /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used - * instead of the generic `db.name` attribute. + * The HBase namespace being accessed. + * To be used instead of the generic db.name attribute. */ public static final AttributeKey DB_HBASE_NAMESPACE = stringKey("db.hbase.namespace"); /** - * The index of the database being accessed as used in the [`SELECT` - * command](https://redis.io/commands/select), provided as an integer. To be used instead of the - * generic `db.name` attribute. + * The index of the database being accessed as used in the SELECT command, provided as an + * integer. To be used instead of the generic 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 `db.name`. */ + /** The collection being accessed within the database stated in db.name. */ public static final AttributeKey DB_MONGODB_COLLECTION = stringKey("db.mongodb.collection"); @@ -159,10 +175,12 @@ public final class SemanticAttributes { * The name of the primary table that the operation is acting upon, including the schema name (if * applicable). * - *

Note: It is not recommended to attempt any client-side parsing of `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. + *

Notes: + * + *

It is not recommended to attempt any client-side parsing of 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"); @@ -185,19 +203,21 @@ public final class SemanticAttributes { * 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. * - *

Note: 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 `__exit__` method in Python) but will usually be caught at the point of recording + *

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 + * __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](#exception-end-example). + * 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 - * `exception.escaped` attribute was not set or set to false, since the event might have been + *

It follows that an exception may still escape the scope of the span even if the + * 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"); @@ -220,9 +240,9 @@ public final class SemanticAttributes { stringKey("faas.document.operation"); /** - * A string containing the time when the data was accessed in the [ISO - * 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in - * [UTC](https://www.w3.org/TR/NOTE-datetime). + * 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"); @@ -233,15 +253,16 @@ public final class SemanticAttributes { public static final AttributeKey FAAS_DOCUMENT_NAME = stringKey("faas.document.name"); /** - * A string containing the function invocation time in the [ISO - * 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in - * [UTC](https://www.w3.org/TR/NOTE-datetime). + * 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 string containing the schedule period as [Cron - * Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + * A string containing the schedule period as Cron + * Expression. */ public static final AttributeKey FAAS_CRON = stringKey("faas.cron"); @@ -254,14 +275,19 @@ public final class SemanticAttributes { /** * The name of the invoked function. * - *

Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. + *

Notes: + * + *

SHOULD be equal to the 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. * - *

Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + *

Notes: + * + *

SHOULD be equal to the cloud.provider resource attribute of the invoked + * function. */ public static final AttributeKey FAAS_INVOKED_PROVIDER = stringKey("faas.invoked_provider"); @@ -269,7 +295,9 @@ public final class SemanticAttributes { /** * The cloud region of the invoked function. * - *

Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. + *

Notes: + * + *

SHOULD be equal to the cloud.region resource attribute of the invoked function. */ public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); @@ -277,8 +305,8 @@ public final class SemanticAttributes { public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); /** - * Remote address of the peer (dotted decimal for IPv4 or - * [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). + * Remote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6) */ public static final AttributeKey NET_PEER_IP = stringKey("net.peer.ip"); @@ -288,26 +316,26 @@ public final class SemanticAttributes { /** Remote hostname or similar, see note below. */ public static final AttributeKey NET_PEER_NAME = stringKey("net.peer.name"); - /** Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. */ + /** Like net.peer.ip but for the host IP. Useful in case of a multi-IP host. */ public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); - /** Like `net.peer.port` but for the host port. */ + /** Like net.peer.port but for the host port. */ public static final AttributeKey NET_HOST_PORT = longKey("net.host.port"); /** Local hostname or similar, see note below. */ public static final AttributeKey NET_HOST_NAME = stringKey("net.host.name"); /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote - * service. SHOULD be equal to the actual `service.name` resource attribute of the remote service - * if any. + * The service.name + * of the remote service. SHOULD be equal to the actual 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](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request - * from outside the system. + * 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"); @@ -319,29 +347,29 @@ public final class SemanticAttributes { /** * 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](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML - * 2.0 - * Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + * 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"); - /** Current "managed" thread ID (as opposed to OS thread ID). */ + /** 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"); /** - * The method or function name, or equivalent (usually rightmost part of the code unit's - * name). + * 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 "namespace" within which `code.function` is defined. Usually the qualified class or - * module name, such that `code.namespace` + some separator + `code.function` form a unique - * identifier for the code unit. + * The "namespace" within which code.function is defined. Usually the + * qualified class or module name, such that code.namespace + some separator + + * code.function form a unique identifier for the code unit. */ public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace"); @@ -352,8 +380,8 @@ public final class SemanticAttributes { public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath"); /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the - * code unit named in `code.function`. + * The line number in code.filepath best representing the operation. It SHOULD point + * within the code unit named in code.function. */ public static final AttributeKey CODE_LINENO = longKey("code.lineno"); @@ -361,12 +389,15 @@ public final class SemanticAttributes { public static final AttributeKey HTTP_METHOD = stringKey("http.method"); /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the - * fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. + * Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment]. + * Usually the fragment is not transmitted over HTTP, but if it is known, it should be included + * nevertheless. * - *

Note: `http.url` MUST NOT contain credentials passed via URL in form of - * `https://username:password@www.example.com/`. In such case the attribute's value should be - * `https://www.example.com/`. + *

Notes: + * + *

http.url MUST NOT contain credentials passed via URL in form of + * https://username:password@www.example.com/. In such case the attribute's value should be + * https://www.example.com/. */ public static final AttributeKey HTTP_URL = stringKey("http.url"); @@ -374,36 +405,39 @@ public final class SemanticAttributes { public static final AttributeKey HTTP_TARGET = stringKey("http.target"); /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). When the - * header is empty or not present, this attribute should be the same. + * The value of the HTTP host + * header. When the header is empty or not present, this attribute should be the same. */ public static final AttributeKey HTTP_HOST = stringKey("http.host"); /** The URI scheme identifying the used protocol. */ public static final AttributeKey HTTP_SCHEME = stringKey("http.scheme"); - /** [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). */ + /** HTTP response status code. */ public static final AttributeKey HTTP_STATUS_CODE = longKey("http.status_code"); /** * Kind of HTTP protocol used. * - *

Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if - * `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + *

Notes: + * + *

If net.transport is not specified, it can be assumed to be IP.TCP + * except if http.flavor is QUIC, in which case IP.UDP is + * assumed. */ public static final AttributeKey HTTP_FLAVOR = stringKey("http.flavor"); /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent - * by the client. + * Value of the HTTP User-Agent + * header sent by the client. */ public static final AttributeKey HTTP_USER_AGENT = stringKey("http.user_agent"); /** * 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](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using - * transport encoding, this should be the compressed size. + * 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_CONTENT_LENGTH = longKey("http.request_content_length"); @@ -417,9 +451,9 @@ public final class SemanticAttributes { /** * 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](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using - * transport encoding, this should be the compressed size. + * 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_CONTENT_LENGTH = longKey("http.response_content_length"); @@ -433,11 +467,13 @@ public final class SemanticAttributes { /** * The primary server name of the matched virtual host. This should be obtained via configuration. - * If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` - * should be used instead). + * If no such configuration can be obtained, this attribute MUST NOT be set ( net.host.name + * should be used instead). * - *

Note: `http.url` is usually not readily available on the server side but would have to be - * assembled in a cumbersome and sometimes lossy process from other information (see e.g. + *

Notes: + * + *

http.url is usually not readily available on the server side but would have to + * be assembled in a cumbersome and sometimes lossy process from other information (see e.g. * open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that * is available. */ @@ -447,96 +483,105 @@ public final class SemanticAttributes { public static final AttributeKey HTTP_ROUTE = stringKey("http.route"); /** - * The IP address of the original client behind all proxies, if known (e.g. from - * [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). + * The IP address of the original client behind all proxies, if known (e.g. from X-Forwarded-For). * - *

Note: This is not necessarily the same as `net.peer.ip`, which would identify the + *

Notes: + * + *

This is not necessarily the same as net.peer.ip, which would identify the * network-level peer, which may be a proxy. */ public static final AttributeKey HTTP_CLIENT_IP = stringKey("http.client_ip"); - /** The keys in the `RequestItems` object field. */ + /** The keys in the RequestItems object field. */ public static final AttributeKey> AWS_DYNAMODB_TABLE_NAMES = stringArrayKey("aws.dynamodb.table_names"); - /** The JSON-serialized value of each item in the `ConsumedCapacity` response field. */ + /** The JSON-serialized value of each item in the ConsumedCapacity response field. */ public static final AttributeKey> AWS_DYNAMODB_CONSUMED_CAPACITY = stringArrayKey("aws.dynamodb.consumed_capacity"); - /** The JSON-serialized value of the `ItemCollectionMetrics` response field. */ + /** The JSON-serialized value of the ItemCollectionMetrics response field. */ public static final AttributeKey AWS_DYNAMODB_ITEM_COLLECTION_METRICS = stringKey("aws.dynamodb.item_collection_metrics"); - /** The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. */ + /** The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. */ public static final AttributeKey AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = doubleKey("aws.dynamodb.provisioned_read_capacity"); - /** The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. */ + /** The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. */ public static final AttributeKey AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = doubleKey("aws.dynamodb.provisioned_write_capacity"); - /** The value of the `ConsistentRead` request parameter. */ + /** The value of the ConsistentRead request parameter. */ public static final AttributeKey AWS_DYNAMODB_CONSISTENT_READ = booleanKey("aws.dynamodb.consistent_read"); - /** The value of the `ProjectionExpression` request parameter. */ + /** The value of the ProjectionExpression request parameter. */ public static final AttributeKey AWS_DYNAMODB_PROJECTION = stringKey("aws.dynamodb.projection"); - /** The value of the `Limit` request parameter. */ + /** The value of the Limit request parameter. */ public static final AttributeKey AWS_DYNAMODB_LIMIT = longKey("aws.dynamodb.limit"); - /** The value of the `AttributesToGet` request parameter. */ + /** The value of the AttributesToGet request parameter. */ public static final AttributeKey> AWS_DYNAMODB_ATTRIBUTES_TO_GET = stringArrayKey("aws.dynamodb.attributes_to_get"); - /** The value of the `IndexName` request parameter. */ + /** The value of the IndexName request parameter. */ public static final AttributeKey AWS_DYNAMODB_INDEX_NAME = stringKey("aws.dynamodb.index_name"); - /** The value of the `Select` request parameter. */ + /** The value of the Select request parameter. */ public static final AttributeKey AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select"); - /** The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. */ + /** + * The JSON-serialized value of each item of the 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 `LocalSecondaryIndexes` request field. */ + /** + * The JSON-serialized value of each item of the LocalSecondaryIndexes request field. + */ public static final AttributeKey> AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = stringArrayKey("aws.dynamodb.local_secondary_indexes"); - /** The value of the `ExclusiveStartTableName` request parameter. */ + /** The value of the 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 `TableNames` response parameter. */ + /** The the number of items in the TableNames response parameter. */ public static final AttributeKey AWS_DYNAMODB_TABLE_COUNT = longKey("aws.dynamodb.table_count"); - /** The value of the `ScanIndexForward` request parameter. */ + /** The value of the ScanIndexForward request parameter. */ public static final AttributeKey AWS_DYNAMODB_SCAN_FORWARD = booleanKey("aws.dynamodb.scan_forward"); - /** The value of the `Segment` request parameter. */ + /** The value of the Segment request parameter. */ public static final AttributeKey AWS_DYNAMODB_SEGMENT = longKey("aws.dynamodb.segment"); - /** The value of the `TotalSegments` request parameter. */ + /** The value of the TotalSegments request parameter. */ public static final AttributeKey AWS_DYNAMODB_TOTAL_SEGMENTS = longKey("aws.dynamodb.total_segments"); - /** The value of the `Count` response parameter. */ + /** The value of the Count response parameter. */ public static final AttributeKey AWS_DYNAMODB_COUNT = longKey("aws.dynamodb.count"); - /** The value of the `ScannedCount` response parameter. */ + /** The value of the ScannedCount response parameter. */ public static final AttributeKey AWS_DYNAMODB_SCANNED_COUNT = longKey("aws.dynamodb.scanned_count"); - /** The JSON-serialized value of each item in the `AttributeDefinitions` request field. */ + /** + * The JSON-serialized value of each item in the 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 `GlobalSecondaryIndexUpdates` request field. + * The JSON-serialized value of each item in the the GlobalSecondaryIndexUpdates + * request field. */ public static final AttributeKey> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = stringArrayKey("aws.dynamodb.global_secondary_index_updates"); @@ -551,7 +596,7 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_DESTINATION = stringKey("messaging.destination"); - /** The kind of message destination. */ + /** The kind of message destination */ public static final AttributeKey MESSAGING_DESTINATION_KIND = stringKey("messaging.destination_kind"); @@ -575,8 +620,8 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_MESSAGE_ID = stringKey("messaging.message_id"); /** - * The [conversation ID](#conversations) identifying the conversation to which the message - * belongs, represented as a string. Sometimes called "Correlation ID". + * The conversation ID identifying the conversation to which the + * message belongs, represented as a string. Sometimes called "Correlation ID". */ public static final AttributeKey MESSAGING_CONVERSATION_ID = stringKey("messaging.conversation_id"); @@ -593,9 +638,10 @@ public final class SemanticAttributes { longKey("messaging.message_payload_compressed_size_bytes"); /** - * A string identifying the kind of message consumption as defined in the [Operation - * names](#operation-names) section above. If the operation is "send", this attribute MUST - * NOT be set, since the operation can be inferred from the span kind in that case. + * A string identifying the kind of message consumption as defined in the Operation names section above. If the operation is + * "send", this attribute MUST NOT be set, since the operation can be inferred from the + * span kind in that case. */ public static final AttributeKey MESSAGING_OPERATION = stringKey("messaging.operation"); @@ -604,13 +650,14 @@ public final class SemanticAttributes { stringKey("messaging.rabbitmq.routing_key"); /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on - * the same partition. They differ from `messaging.message_id` in that they're not unique. If - * the key is `null`, the attribute MUST NOT be set. + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the + * same partition. They differ from messaging.message_id in that they're not unique. + * If the key is null, the attribute MUST NOT be set. * - *

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

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"); @@ -640,11 +687,13 @@ public final class SemanticAttributes { /** * The full (logical) name of the service being called, including its package name, if applicable. * - *

Note: 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.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). + *

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.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"); @@ -652,37 +701,40 @@ public final class SemanticAttributes { * The name of the (logical) method being called, must be equal to the $method part in the span * name. * - *

Note: 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.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). + *

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.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 [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the - * gRPC request. + * The numeric status + * code of the gRPC request. */ public static final AttributeKey RPC_GRPC_STATUS_CODE = longKey("rpc.grpc.status_code"); /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not - * specify this, the value can be omitted. + * Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 + * does not specify this, the value can be omitted. */ public static final AttributeKey RPC_JSONRPC_VERSION = stringKey("rpc.jsonrpc.version"); /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or - * missing (for notifications), value is expected to be cast to string for simplicity. Use empty - * string in case of `null` value. Omit entirely if this is a notification. + * id property of request or response. Since protocol allows id to be int, string, + * null or missing (for notifications), value is expected to be cast to string for + * simplicity. Use empty string in case of null value. Omit entirely if this is a + * notification. */ public static final AttributeKey RPC_JSONRPC_REQUEST_ID = stringKey("rpc.jsonrpc.request_id"); - /** `error.code` property of response if it is an error response. */ + /** error.code property of response if it is an error response. */ public static final AttributeKey RPC_JSONRPC_ERROR_CODE = longKey("rpc.jsonrpc.error_code"); - /** `error.message` property of response if it is an error response. */ + /** error.message property of response if it is an error response. */ public static final AttributeKey RPC_JSONRPC_ERROR_MESSAGE = stringKey("rpc.jsonrpc.error_message");