diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/code_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/code_attributes.hrl new file mode 100644 index 000000000..9dd939735 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/code_attributes.hrl @@ -0,0 +1,39 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. +%% +-define(CODE_COLUMN_NUMBER, 'code.column.number'). + + +%% The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. +%% +-define(CODE_FILE_PATH, 'code.file.path'). + + +%% The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. +%% +-define(CODE_FUNCTION_NAME, 'code.function.name'). + + +%% The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. +%% +-define(CODE_LINE_NUMBER, 'code.line.number'). + + +%% A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity. +%% +-define(CODE_STACKTRACE, 'code.stacktrace'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/db_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/db_attributes.hrl new file mode 100644 index 000000000..b1b7f070c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/attributes/db_attributes.hrl @@ -0,0 +1,137 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name of a collection (table, container) within the database. +-define(DB_COLLECTION_NAME, 'db.collection.name'). + + +%% The name of the database, fully qualified within the server address and port. +%% +-define(DB_NAMESPACE, 'db.namespace'). + + +%% The number of queries included in a batch operation. +-define(DB_OPERATION_BATCH_SIZE, 'db.operation.batch.size'). + + +%% The name of the operation or command being executed. +%% +-define(DB_OPERATION_NAME, 'db.operation.name'). + + +%% Low cardinality summary of a database query. +%% +-define(DB_QUERY_SUMMARY, 'db.query.summary'). + + +%% The database query being executed. +%% +-define(DB_QUERY_TEXT, 'db.query.text'). + + +%% Database response status code. +-define(DB_RESPONSE_STATUS_CODE, 'db.response.status_code'). + + +%% The name of a stored procedure within the database. +-define(DB_STORED_PROCEDURE_NAME, 'db.stored_procedure.name'). + + +%% The database management system (DBMS) product as identified by the client instrumentation. +-define(DB_SYSTEM_NAME, 'db.system.name'). + +-define(DB_SYSTEM_NAME_VALUES_OTHER_SQL, 'other_sql'). + +-define(DB_SYSTEM_NAME_VALUES_SOFTWAREAG_ADABAS, 'softwareag.adabas'). + +-define(DB_SYSTEM_NAME_VALUES_ACTIAN_INGRES, 'actian.ingres'). + +-define(DB_SYSTEM_NAME_VALUES_AWS_DYNAMODB, 'aws.dynamodb'). + +-define(DB_SYSTEM_NAME_VALUES_AWS_REDSHIFT, 'aws.redshift'). + +-define(DB_SYSTEM_NAME_VALUES_AZURE_COSMOSDB, 'azure.cosmosdb'). + +-define(DB_SYSTEM_NAME_VALUES_INTERSYSTEMS_CACHE, 'intersystems.cache'). + +-define(DB_SYSTEM_NAME_VALUES_CASSANDRA, 'cassandra'). + +-define(DB_SYSTEM_NAME_VALUES_CLICKHOUSE, 'clickhouse'). + +-define(DB_SYSTEM_NAME_VALUES_COCKROACHDB, 'cockroachdb'). + +-define(DB_SYSTEM_NAME_VALUES_COUCHBASE, 'couchbase'). + +-define(DB_SYSTEM_NAME_VALUES_COUCHDB, 'couchdb'). + +-define(DB_SYSTEM_NAME_VALUES_DERBY, 'derby'). + +-define(DB_SYSTEM_NAME_VALUES_ELASTICSEARCH, 'elasticsearch'). + +-define(DB_SYSTEM_NAME_VALUES_FIREBIRDSQL, 'firebirdsql'). + +-define(DB_SYSTEM_NAME_VALUES_GCP_SPANNER, 'gcp.spanner'). + +-define(DB_SYSTEM_NAME_VALUES_GEODE, 'geode'). + +-define(DB_SYSTEM_NAME_VALUES_H2DATABASE, 'h2database'). + +-define(DB_SYSTEM_NAME_VALUES_HBASE, 'hbase'). + +-define(DB_SYSTEM_NAME_VALUES_HIVE, 'hive'). + +-define(DB_SYSTEM_NAME_VALUES_HSQLDB, 'hsqldb'). + +-define(DB_SYSTEM_NAME_VALUES_IBM_DB2, 'ibm.db2'). + +-define(DB_SYSTEM_NAME_VALUES_IBM_INFORMIX, 'ibm.informix'). + +-define(DB_SYSTEM_NAME_VALUES_IBM_NETEZZA, 'ibm.netezza'). + +-define(DB_SYSTEM_NAME_VALUES_INFLUXDB, 'influxdb'). + +-define(DB_SYSTEM_NAME_VALUES_INSTANTDB, 'instantdb'). + +-define(DB_SYSTEM_NAME_VALUES_MARIADB, 'mariadb'). + +-define(DB_SYSTEM_NAME_VALUES_MEMCACHED, 'memcached'). + +-define(DB_SYSTEM_NAME_VALUES_MONGODB, 'mongodb'). + +-define(DB_SYSTEM_NAME_VALUES_MICROSOFT_SQL_SERVER, 'microsoft.sql_server'). + +-define(DB_SYSTEM_NAME_VALUES_MYSQL, 'mysql'). + +-define(DB_SYSTEM_NAME_VALUES_NEO4J, 'neo4j'). + +-define(DB_SYSTEM_NAME_VALUES_OPENSEARCH, 'opensearch'). + +-define(DB_SYSTEM_NAME_VALUES_ORACLE_DB, 'oracle.db'). + +-define(DB_SYSTEM_NAME_VALUES_POSTGRESQL, 'postgresql'). + +-define(DB_SYSTEM_NAME_VALUES_REDIS, 'redis'). + +-define(DB_SYSTEM_NAME_VALUES_SAP_HANA, 'sap.hana'). + +-define(DB_SYSTEM_NAME_VALUES_SAP_MAXDB, 'sap.maxdb'). + +-define(DB_SYSTEM_NAME_VALUES_SQLITE, 'sqlite'). + +-define(DB_SYSTEM_NAME_VALUES_TERADATA, 'teradata'). + +-define(DB_SYSTEM_NAME_VALUES_TRINO, 'trino'). + diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl index fee6dd174..2f2fb7e9e 100644 --- a/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl @@ -13,8 +13,9 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - -%% 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. +%% @deprecated It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. +%% +%% Indicates that the exception is escaping the scope of the span. %% -define(EXCEPTION_ESCAPED, 'exception.escaped'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl index 014d1d705..46459a580 100644 --- a/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/attributes/http_attributes.hrl @@ -40,6 +40,8 @@ -define(HTTP_REQUEST_METHOD_VALUES_TRACE, 'TRACE'). +-define(HTTP_REQUEST_METHOD_VALUES_QUERY, 'QUERY'). + -define(HTTP_REQUEST_METHOD_VALUES_OTHER, '_OTHER'). @@ -62,6 +64,6 @@ -define(HTTP_RESPONSE_STATUS_CODE, 'http.response.status_code'). -%% The matched route, that is, the path template in the format used by the respective server framework. +%% The matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders. %% -define(HTTP_ROUTE, 'http.route'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl index 2bc501ca8..25b36f361 100644 --- a/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl @@ -30,7 +30,7 @@ -define(NETWORK_PEER_PORT, 'network.peer.port'). -%% [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. +%% [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. -define(NETWORK_PROTOCOL_NAME, 'network.protocol.name'). @@ -38,7 +38,7 @@ -define(NETWORK_PROTOCOL_VERSION, 'network.protocol.version'). -%% [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). +%% [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). %% -define(NETWORK_TRANSPORT, 'network.transport'). @@ -54,7 +54,7 @@ -%% [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. +%% [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. -define(NETWORK_TYPE, 'network.type'). -define(NETWORK_TYPE_VALUES_IPV4, 'ipv4'). diff --git a/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl index 5a9422ad5..393f9ff40 100644 --- a/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl @@ -14,11 +14,21 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The string ID of the service instance. +%% +-define(SERVICE_INSTANCE_ID, 'service.instance.id'). + + %% Logical name of the service. %% -define(SERVICE_NAME, 'service.name'). -%% The version string of the service API or implementation. The format is not defined by these conventions. +%% A namespace for `service.name`. +%% +-define(SERVICE_NAMESPACE, 'service.namespace'). + + +%% The version string of the service component. The format is not defined by these conventions. %% -define(SERVICE_VERSION, 'service.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/app_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/app_attributes.hrl new file mode 100644 index 000000000..745809151 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/app_attributes.hrl @@ -0,0 +1,62 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Unique identifier for a particular build or compilation of the application. +-define(APP_BUILD_ID, 'app.build_id'). + + +%% A unique identifier representing the installation of an application on a specific device +%% +-define(APP_INSTALLATION_ID, 'app.installation.id'). + + +%% A number of frame renders that experienced jank. +-define(APP_JANK_FRAME_COUNT, 'app.jank.frame_count'). + + +%% The time period, in seconds, for which this jank is being reported. +-define(APP_JANK_PERIOD, 'app.jank.period'). + + +%% The minimum rendering threshold for this jank, in seconds. +-define(APP_JANK_THRESHOLD, 'app.jank.threshold'). + + +%% The x (horizontal) coordinate of a screen coordinate, in screen pixels. +-define(APP_SCREEN_COORDINATE_X, 'app.screen.coordinate.x'). + + +%% The y (vertical) component of a screen coordinate, in screen pixels. +%% +-define(APP_SCREEN_COORDINATE_Y, 'app.screen.coordinate.y'). + + +%% An identifier that uniquely differentiates this screen from other screens in the same application. +%% +-define(APP_SCREEN_ID, 'app.screen.id'). + + +%% The name of an application screen. +-define(APP_SCREEN_NAME, 'app.screen.name'). + + +%% An identifier that uniquely differentiates this widget from other widgets in the same application. +%% +-define(APP_WIDGET_ID, 'app.widget.id'). + + +%% The name of an application widget. +-define(APP_WIDGET_NAME, 'app.widget.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl index ca4cc4d14..ea9af4f13 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl @@ -19,7 +19,7 @@ -define(ARTIFACT_ATTESTATION_FILENAME, 'artifact.attestation.filename'). -%% The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). +%% The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the [software attestation space](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**. %% -define(ARTIFACT_ATTESTATION_HASH, 'artifact.attestation.hash'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl index 219b9082a..1a3a1fddc 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl @@ -14,6 +14,16 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages. +%% +-define(AWS_BEDROCK_GUARDRAIL_ID, 'aws.bedrock.guardrail.id'). + + +%% The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts. +%% +-define(AWS_BEDROCK_KNOWLEDGE_BASE_ID, 'aws.bedrock.knowledge_base.id'). + + %% The JSON-serialized value of each item in the `AttributeDefinitions` request field. -define(AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, 'aws.dynamodb.attribute_definitions'). @@ -147,11 +157,25 @@ -define(AWS_EKS_CLUSTER_ARN, 'aws.eks.cluster.arn'). +%% The AWS extended request ID as returned in the response header `x-amz-id-2`. +-define(AWS_EXTENDED_REQUEST_ID, 'aws.extended_request_id'). + + +%% The name of the AWS Kinesis [stream](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) the request refers to. Corresponds to the `--stream-name` parameter of the Kinesis [describe-stream](https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html) operation. +%% +-define(AWS_KINESIS_STREAM_NAME, 'aws.kinesis.stream_name'). + + %% 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). %% -define(AWS_LAMBDA_INVOKED_ARN, 'aws.lambda.invoked_arn'). +%% The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. +%% +-define(AWS_LAMBDA_RESOURCE_MAPPING_ID, 'aws.lambda.resource_mapping.id'). + + %% The Amazon Resource Name(s) (ARN) of the AWS log group(s). %% -define(AWS_LOG_GROUP_ARNS, 'aws.log.group.arns'). @@ -172,7 +196,7 @@ -define(AWS_LOG_STREAM_NAMES, 'aws.log.stream.names'). -%% The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +%% The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. -define(AWS_REQUEST_ID, 'aws.request_id'). @@ -198,3 +222,28 @@ %% Upload ID that identifies the multipart upload. -define(AWS_S3_UPLOAD_ID, 'aws.s3.upload_id'). + + +%% The ARN of the Secret stored in the Secrets Mangger +%% +-define(AWS_SECRETSMANAGER_SECRET_ARN, 'aws.secretsmanager.secret.arn'). + + +%% The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel. +%% +-define(AWS_SNS_TOPIC_ARN, 'aws.sns.topic.arn'). + + +%% The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue Service (SQS) and is used to access the queue and perform actions on it. +%% +-define(AWS_SQS_QUEUE_URL, 'aws.sqs.queue.url'). + + +%% The ARN of the AWS Step Functions Activity. +%% +-define(AWS_STEP_FUNCTIONS_ACTIVITY_ARN, 'aws.step_functions.activity.arn'). + + +%% The ARN of the AWS Step Functions State Machine. +%% +-define(AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN, 'aws.step_functions.state_machine.arn'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl index 7038ced43..53f6bd25d 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/azure_attributes.hrl @@ -13,6 +13,66 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +%% @deprecated Replaced by `azure.resource_provider.namespace`. +%% Deprecated, use `azure.resource_provider.namespace` instead. +%% +-define(AZ_NAMESPACE, 'az.namespace'). -%% The unique identifier of the service request. It's generated by the Azure service and returned with the response. +%% @deprecated Replaced by `azure.service.request.id`. +%% Deprecated, use `azure.service.request.id` instead. -define(AZ_SERVICE_REQUEST_ID, 'az.service_request_id'). + + +%% The unique identifier of the client instance. +-define(AZURE_CLIENT_ID, 'azure.client.id'). + + +%% Cosmos client connection mode. +-define(AZURE_COSMOSDB_CONNECTION_MODE, 'azure.cosmosdb.connection.mode'). + +-define(AZURE_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY, 'gateway'). + +-define(AZURE_COSMOSDB_CONNECTION_MODE_VALUES_DIRECT, 'direct'). + + + +%% Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL, 'azure.cosmosdb.consistency.level'). + +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_STRONG, 'Strong'). + +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_BOUNDED_STALENESS, 'BoundedStaleness'). + +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_SESSION, 'Session'). + +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_EVENTUAL, 'Eventual'). + +-define(AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_CONSISTENT_PREFIX, 'ConsistentPrefix'). + + + +%% List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. +%% +-define(AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS, 'azure.cosmosdb.operation.contacted_regions'). + + +%% The number of request units consumed by the operation. +%% +-define(AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE, 'azure.cosmosdb.operation.request_charge'). + + +%% Request payload size in bytes. +-define(AZURE_COSMOSDB_REQUEST_BODY_SIZE, 'azure.cosmosdb.request.body.size'). + + +%% Cosmos DB sub status code. +-define(AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE, 'azure.cosmosdb.response.sub_status_code'). + + +%% [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. +%% +-define(AZURE_RESOURCE_PROVIDER_NAMESPACE, 'azure.resource_provider.namespace'). + + +%% The unique identifier of the service request. It's generated by the Azure service and returned with the response. +-define(AZURE_SERVICE_REQUEST_ID, 'azure.service.request.id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cassandra_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cassandra_attributes.hrl new file mode 100644 index 000000000..4e940d20a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cassandra_attributes.hrl @@ -0,0 +1,67 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% 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). +%% +-define(CASSANDRA_CONSISTENCY_LEVEL, 'cassandra.consistency.level'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL, 'all'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_EACH_QUORUM, 'each_quorum'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_QUORUM, 'quorum'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_QUORUM, 'local_quorum'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_ONE, 'one'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_TWO, 'two'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_THREE, 'three'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_ONE, 'local_one'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_ANY, 'any'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_SERIAL, 'serial'). + +-define(CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_SERIAL, 'local_serial'). + + + +%% The data center of the coordinating node for a query. +%% +-define(CASSANDRA_COORDINATOR_DC, 'cassandra.coordinator.dc'). + + +%% The ID of the coordinating node for a query. +%% +-define(CASSANDRA_COORDINATOR_ID, 'cassandra.coordinator.id'). + + +%% The fetch size used for paging, i.e. how many rows will be returned at once. +%% +-define(CASSANDRA_PAGE_SIZE, 'cassandra.page.size'). + + +%% Whether or not the query is idempotent. +%% +-define(CASSANDRA_QUERY_IDEMPOTENT, 'cassandra.query.idempotent'). + + +%% The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. +%% +-define(CASSANDRA_SPECULATIVE_EXECUTION_COUNT, 'cassandra.speculative_execution.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl index 76a45ed43..d8504c0eb 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl @@ -14,17 +14,64 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The kind of action a pipeline run is performing. +%% +-define(CICD_PIPELINE_ACTION_NAME, 'cicd.pipeline.action.name'). + +-define(CICD_PIPELINE_ACTION_NAME_VALUES_BUILD, 'BUILD'). + +-define(CICD_PIPELINE_ACTION_NAME_VALUES_RUN, 'RUN'). + +-define(CICD_PIPELINE_ACTION_NAME_VALUES_SYNC, 'SYNC'). + + + %% The human readable name of the pipeline within a CI/CD system. %% -define(CICD_PIPELINE_NAME, 'cicd.pipeline.name'). +%% The result of a pipeline run. +%% +-define(CICD_PIPELINE_RESULT, 'cicd.pipeline.result'). + +-define(CICD_PIPELINE_RESULT_VALUES_SUCCESS, 'success'). + +-define(CICD_PIPELINE_RESULT_VALUES_FAILURE, 'failure'). + +-define(CICD_PIPELINE_RESULT_VALUES_ERROR, 'error'). + +-define(CICD_PIPELINE_RESULT_VALUES_TIMEOUT, 'timeout'). + +-define(CICD_PIPELINE_RESULT_VALUES_CANCELLATION, 'cancellation'). + +-define(CICD_PIPELINE_RESULT_VALUES_SKIP, 'skip'). + + + %% The unique identifier of a pipeline run within a CI/CD system. %% -define(CICD_PIPELINE_RUN_ID, 'cicd.pipeline.run.id'). -%% The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. +%% The pipeline run goes through these states during its lifecycle. +%% +-define(CICD_PIPELINE_RUN_STATE, 'cicd.pipeline.run.state'). + +-define(CICD_PIPELINE_RUN_STATE_VALUES_PENDING, 'pending'). + +-define(CICD_PIPELINE_RUN_STATE_VALUES_EXECUTING, 'executing'). + +-define(CICD_PIPELINE_RUN_STATE_VALUES_FINALIZING, 'finalizing'). + + + +%% The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. +%% +-define(CICD_PIPELINE_RUN_URL_FULL, 'cicd.pipeline.run.url.full'). + + +%% The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. %% -define(CICD_PIPELINE_TASK_NAME, 'cicd.pipeline.task.name'). @@ -34,7 +81,25 @@ -define(CICD_PIPELINE_TASK_RUN_ID, 'cicd.pipeline.task.run.id'). -%% The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. +%% The result of a task run. +%% +-define(CICD_PIPELINE_TASK_RUN_RESULT, 'cicd.pipeline.task.run.result'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_SUCCESS, 'success'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_FAILURE, 'failure'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_ERROR, 'error'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_TIMEOUT, 'timeout'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_CANCELLATION, 'cancellation'). + +-define(CICD_PIPELINE_TASK_RUN_RESULT_VALUES_SKIP, 'skip'). + + + +%% The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. %% -define(CICD_PIPELINE_TASK_RUN_URL_FULL, 'cicd.pipeline.task.run.url.full'). @@ -49,3 +114,31 @@ -define(CICD_PIPELINE_TASK_TYPE_VALUES_DEPLOY, 'deploy'). + + +%% The name of a component of the CICD system. +-define(CICD_SYSTEM_COMPONENT, 'cicd.system.component'). + + +%% The unique identifier of a worker within a CICD system. +-define(CICD_WORKER_ID, 'cicd.worker.id'). + + +%% The name of a worker within a CICD system. +-define(CICD_WORKER_NAME, 'cicd.worker.name'). + + +%% The state of a CICD worker / agent. +%% +-define(CICD_WORKER_STATE, 'cicd.worker.state'). + +-define(CICD_WORKER_STATE_VALUES_AVAILABLE, 'available'). + +-define(CICD_WORKER_STATE_VALUES_BUSY, 'busy'). + +-define(CICD_WORKER_STATE_VALUES_OFFLINE, 'offline'). + + + +%% The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. +-define(CICD_WORKER_URL_FULL, 'cicd.worker.url.full'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl index 687a9374b..a48d0f4fb 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl @@ -28,6 +28,8 @@ %% -define(CLOUD_PLATFORM, 'cloud.platform'). +-define(CLOUD_PLATFORM_VALUES_AKAMAI_CLOUD_COMPUTE, 'akamai_cloud.compute'). + -define(CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS, 'alibaba_cloud_ecs'). -define(CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_FC, 'alibaba_cloud_fc'). @@ -48,6 +50,20 @@ -define(CLOUD_PLATFORM_VALUES_AWS_OPENSHIFT, 'aws_openshift'). +-define(CLOUD_PLATFORM_VALUES_AZURE_VM, 'azure.vm'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_CONTAINER_APPS, 'azure.container_apps'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_CONTAINER_INSTANCES, 'azure.container_instances'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_AKS, 'azure.aks'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_FUNCTIONS, 'azure.functions'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_APP_SERVICE, 'azure.app_service'). + +-define(CLOUD_PLATFORM_VALUES_AZURE_OPENSHIFT, 'azure.openshift'). + -define(CLOUD_PLATFORM_VALUES_AZURE_VM, 'azure_vm'). -define(CLOUD_PLATFORM_VALUES_AZURE_CONTAINER_APPS, 'azure_container_apps'). @@ -62,6 +78,8 @@ -define(CLOUD_PLATFORM_VALUES_AZURE_OPENSHIFT, 'azure_openshift'). +-define(CLOUD_PLATFORM_VALUES_GCP_AGENT_ENGINE, 'gcp.agent_engine'). + -define(CLOUD_PLATFORM_VALUES_GCP_BARE_METAL_SOLUTION, 'gcp_bare_metal_solution'). -define(CLOUD_PLATFORM_VALUES_GCP_COMPUTE_ENGINE, 'gcp_compute_engine'). @@ -76,20 +94,30 @@ -define(CLOUD_PLATFORM_VALUES_GCP_OPENSHIFT, 'gcp_openshift'). +-define(CLOUD_PLATFORM_VALUES_HETZNER_CLOUD_SERVER, 'hetzner.cloud_server'). + -define(CLOUD_PLATFORM_VALUES_IBM_CLOUD_OPENSHIFT, 'ibm_cloud_openshift'). +-define(CLOUD_PLATFORM_VALUES_ORACLE_CLOUD_COMPUTE, 'oracle_cloud_compute'). + +-define(CLOUD_PLATFORM_VALUES_ORACLE_CLOUD_OKE, 'oracle_cloud_oke'). + -define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_CVM, 'tencent_cloud_cvm'). -define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_EKS, 'tencent_cloud_eks'). -define(CLOUD_PLATFORM_VALUES_TENCENT_CLOUD_SCF, 'tencent_cloud_scf'). +-define(CLOUD_PLATFORM_VALUES_VULTR_CLOUD_COMPUTE, 'vultr.cloud_compute'). + %% Name of the cloud provider. %% -define(CLOUD_PROVIDER, 'cloud.provider'). +-define(CLOUD_PROVIDER_VALUES_AKAMAI_CLOUD, 'akamai_cloud'). + -define(CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD, 'alibaba_cloud'). -define(CLOUD_PROVIDER_VALUES_AWS, 'aws'). @@ -100,17 +128,23 @@ -define(CLOUD_PROVIDER_VALUES_HEROKU, 'heroku'). +-define(CLOUD_PROVIDER_VALUES_HETZNER, 'hetzner'). + -define(CLOUD_PROVIDER_VALUES_IBM_CLOUD, 'ibm_cloud'). +-define(CLOUD_PROVIDER_VALUES_ORACLE_CLOUD, 'oracle_cloud'). + -define(CLOUD_PROVIDER_VALUES_TENCENT_CLOUD, 'tencent_cloud'). +-define(CLOUD_PROVIDER_VALUES_VULTR, 'vultr'). + -%% The geographical region the resource is running. +%% The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. %% -define(CLOUD_REGION, 'cloud.region'). -%% Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) +%% Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) %% -define(CLOUD_RESOURCE_ID, 'cloud.resource_id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudfoundry_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudfoundry_attributes.hrl new file mode 100644 index 000000000..82e49bcb0 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudfoundry_attributes.hrl @@ -0,0 +1,69 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The guid of the application. +%% +-define(CLOUDFOUNDRY_APP_ID, 'cloudfoundry.app.id'). + + +%% The index of the application instance. 0 when just one instance is active. +%% +-define(CLOUDFOUNDRY_APP_INSTANCE_ID, 'cloudfoundry.app.instance.id'). + + +%% The name of the application. +%% +-define(CLOUDFOUNDRY_APP_NAME, 'cloudfoundry.app.name'). + + +%% The guid of the CloudFoundry org the application is running in. +%% +-define(CLOUDFOUNDRY_ORG_ID, 'cloudfoundry.org.id'). + + +%% The name of the CloudFoundry organization the app is running in. +%% +-define(CLOUDFOUNDRY_ORG_NAME, 'cloudfoundry.org.name'). + + +%% The UID identifying the process. +%% +-define(CLOUDFOUNDRY_PROCESS_ID, 'cloudfoundry.process.id'). + + +%% The type of process. +%% +-define(CLOUDFOUNDRY_PROCESS_TYPE, 'cloudfoundry.process.type'). + + +%% The guid of the CloudFoundry space the application is running in. +%% +-define(CLOUDFOUNDRY_SPACE_ID, 'cloudfoundry.space.id'). + + +%% The name of the CloudFoundry space the application is running in. +%% +-define(CLOUDFOUNDRY_SPACE_NAME, 'cloudfoundry.space.name'). + + +%% A guid or another name describing the event source. +%% +-define(CLOUDFOUNDRY_SYSTEM_ID, 'cloudfoundry.system.id'). + + +%% A guid describing the concrete instance of the event source. +%% +-define(CLOUDFOUNDRY_SYSTEM_INSTANCE_ID, 'cloudfoundry.system.instance.id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl index 8500b126f..c5f6e6078 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/code_attributes.hrl @@ -13,32 +13,29 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - -%% The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +%% @deprecated Replaced by `code.column.number`. +%% Deprecated, use `code.column.number` %% -define(CODE_COLUMN, 'code.column'). - -%% The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). +%% @deprecated Replaced by `code.file.path`. +%% Deprecated, use `code.file.path` instead %% -define(CODE_FILEPATH, 'code.filepath'). - -%% The method or function name, or equivalent (usually rightmost part of the code unit's name). +%% @deprecated Value should be included in `code.function.name` which is expected to be a fully-qualified name. +%% +%% Deprecated, use `code.function.name` instead %% -define(CODE_FUNCTION, 'code.function'). - -%% The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. +%% @deprecated Replaced by `code.line.number`. +%% Deprecated, use `code.line.number` instead %% -define(CODE_LINENO, 'code.lineno'). - -%% 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. +%% @deprecated Value should be included in `code.function.name` which is expected to be a fully-qualified name. %% --define(CODE_NAMESPACE, '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. +%% Deprecated, namespace is now included into `code.function.name` %% --define(CODE_STACKTRACE, 'code.stacktrace'). +-define(CODE_NAMESPACE, 'code.namespace'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl index f99c32b81..030ebec20 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl @@ -19,16 +19,16 @@ -define(CONTAINER_COMMAND, 'container.command'). -%% All the command arguments (including the command/executable itself) run by the container. [2] +%% All the command arguments (including the command/executable itself) run by the container. %% -define(CONTAINER_COMMAND_ARGS, 'container.command_args'). -%% The full command run by the container as a single string representing the full command. [2] +%% The full command run by the container as a single string representing the full command. %% -define(CONTAINER_COMMAND_LINE, 'container.command_line'). -%% @deprecated Replaced by `cpu.mode` +%% @deprecated Replaced by `cpu.mode`. %% Deprecated, use `cpu.mode` instead. -define(CONTAINER_CPU_STATE, 'container.cpu.state'). @@ -40,7 +40,17 @@ -%% 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. +%% The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. +%% +-define(CONTAINER_CSI_PLUGIN_NAME, 'container.csi.plugin.name'). + + +%% The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. +%% +-define(CONTAINER_CSI_VOLUME_ID, 'container.csi.volume.id'). + + +%% Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. %% -define(CONTAINER_ID, 'container.id'). @@ -60,7 +70,7 @@ -define(CONTAINER_IMAGE_REPO_DIGESTS, 'container.image.repo_digests'). -%% Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. +%% Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. %% -define(CONTAINER_IMAGE_TAGS, 'container.image.tags'). @@ -78,7 +88,22 @@ %% -define(CONTAINER_NAME, 'container.name'). - +%% @deprecated Replaced by `container.runtime.name`. %% The container runtime managing this container. %% -define(CONTAINER_RUNTIME, 'container.runtime'). + + +%% A description about the runtime which could include, for example details about the CRI/API version being used or other customisations. +%% +-define(CONTAINER_RUNTIME_DESCRIPTION, 'container.runtime.description'). + + +%% The container runtime managing this container. +%% +-define(CONTAINER_RUNTIME_NAME, 'container.runtime.name'). + + +%% The version of the runtime of this process, as returned by the runtime without modification. +%% +-define(CONTAINER_RUNTIME_VERSION, 'container.runtime.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl index 9ed41c80d..07897238d 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl @@ -14,6 +14,10 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The logical CPU number [0..n-1] +-define(CPU_LOGICAL_NUMBER, 'cpu.logical_number'). + + %% The mode of the CPU -define(CPU_MODE, 'cpu.mode'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpython_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpython_attributes.hrl new file mode 100644 index 000000000..c49092886 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpython_attributes.hrl @@ -0,0 +1,25 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Value of the garbage collector collection generation. +-define(CPYTHON_GC_GENERATION, 'cpython.gc.generation'). + +-define(CPYTHON_GC_GENERATION_VALUES_GENERATION_0, '0'). + +-define(CPYTHON_GC_GENERATION_VALUES_GENERATION_1, '1'). + +-define(CPYTHON_GC_GENERATION_VALUES_GENERATION_2, '2'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl index 237c30255..e48dc4108 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl @@ -13,9 +13,10 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/db_attributes.hrl"). -%% 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). -%% +%% @deprecated Replaced by `cassandra.consistency.level`. +%% Deprecated, use `cassandra.consistency.level` instead. -define(DB_CASSANDRA_CONSISTENCY_LEVEL, 'db.cassandra.consistency_level'). -define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL, 'all'). @@ -41,29 +42,24 @@ -define(DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_LOCAL_SERIAL, 'local_serial'). - -%% The data center of the coordinating node for a query. -%% +%% @deprecated Replaced by `cassandra.coordinator.dc`. +%% Deprecated, use `cassandra.coordinator.dc` instead. -define(DB_CASSANDRA_COORDINATOR_DC, 'db.cassandra.coordinator.dc'). - -%% The ID of the coordinating node for a query. -%% +%% @deprecated Replaced by `cassandra.coordinator.id`. +%% Deprecated, use `cassandra.coordinator.id` instead. -define(DB_CASSANDRA_COORDINATOR_ID, 'db.cassandra.coordinator.id'). - -%% Whether or not the query is idempotent. -%% +%% @deprecated Replaced by `cassandra.query.idempotent`. +%% Deprecated, use `cassandra.query.idempotent` instead. -define(DB_CASSANDRA_IDEMPOTENCE, 'db.cassandra.idempotence'). - -%% The fetch size used for paging, i.e. how many rows will be returned at once. -%% +%% @deprecated Replaced by `cassandra.page.size`. +%% Deprecated, use `cassandra.page.size` instead. -define(DB_CASSANDRA_PAGE_SIZE, 'db.cassandra.page_size'). - -%% The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. -%% +%% @deprecated Replaced by `cassandra.speculative_execution.count`. +%% Deprecated, use `cassandra.speculative_execution.count` instead. -define(DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, 'db.cassandra.speculative_execution_count'). %% @deprecated Replaced by `db.collection.name`. @@ -97,21 +93,17 @@ -define(DB_CLIENT_CONNECTIONS_STATE_VALUES_USED, 'used'). - -%% The name of a collection (table, container) within the database. --define(DB_COLLECTION_NAME, 'db.collection.name'). - -%% @deprecated "Replaced by `server.address` and `server.port`." +%% @deprecated Replaced by `server.address` and `server.port`. %% %% Deprecated, use `server.address`, `server.port` attributes instead. -define(DB_CONNECTION_STRING, 'db.connection_string'). - -%% Unique Cosmos client instance id. +%% @deprecated Replaced by `azure.client.id`. +%% Deprecated, use `azure.client.id` instead. -define(DB_COSMOSDB_CLIENT_ID, 'db.cosmosdb.client_id'). - -%% Cosmos client connection mode. +%% @deprecated Replaced by `azure.cosmosdb.connection.mode`. +%% Deprecated, use `azure.cosmosdb.connection.mode` instead. -define(DB_COSMOSDB_CONNECTION_MODE, 'db.cosmosdb.connection_mode'). -define(DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY, 'gateway'). @@ -119,59 +111,79 @@ -define(DB_COSMOSDB_CONNECTION_MODE_VALUES_DIRECT, 'direct'). +%% @deprecated Replaced by `azure.cosmosdb.consistency.level`. +%% Deprecated, use `cosmosdb.consistency.level` instead. +-define(DB_COSMOSDB_CONSISTENCY_LEVEL, 'db.cosmosdb.consistency_level'). + +-define(DB_COSMOSDB_CONSISTENCY_LEVEL_VALUES_STRONG, 'Strong'). + +-define(DB_COSMOSDB_CONSISTENCY_LEVEL_VALUES_BOUNDED_STALENESS, 'BoundedStaleness'). + +-define(DB_COSMOSDB_CONSISTENCY_LEVEL_VALUES_SESSION, 'Session'). + +-define(DB_COSMOSDB_CONSISTENCY_LEVEL_VALUES_EVENTUAL, 'Eventual'). + +-define(DB_COSMOSDB_CONSISTENCY_LEVEL_VALUES_CONSISTENT_PREFIX, 'ConsistentPrefix'). + + %% @deprecated Replaced by `db.collection.name`. %% Deprecated, use `db.collection.name` instead. -define(DB_COSMOSDB_CONTAINER, 'db.cosmosdb.container'). - -%% CosmosDB Operation Type. +%% @deprecated Removed, no replacement at this time. +%% +%% Deprecated, no replacement at this time. -define(DB_COSMOSDB_OPERATION_TYPE, 'db.cosmosdb.operation_type'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID, 'Invalid'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_BATCH, 'batch'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_CREATE, 'Create'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_CREATE, 'create'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_PATCH, 'Patch'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_DELETE, 'delete'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ, 'Read'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE, 'execute'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ_FEED, 'ReadFeed'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE_JAVASCRIPT, 'execute_javascript'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_DELETE, 'Delete'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID, 'invalid'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_REPLACE, 'Replace'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD, 'head'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE, 'Execute'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD_FEED, 'head_feed'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY, 'Query'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_PATCH, 'patch'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD, 'Head'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY, 'query'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_HEAD_FEED, 'HeadFeed'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY_PLAN, 'query_plan'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_UPSERT, 'Upsert'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ, 'read'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_BATCH, 'Batch'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_READ_FEED, 'read_feed'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_QUERY_PLAN, 'QueryPlan'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_REPLACE, 'replace'). --define(DB_COSMOSDB_OPERATION_TYPE_VALUES_EXECUTE_JAVASCRIPT, 'ExecuteJavaScript'). +-define(DB_COSMOSDB_OPERATION_TYPE_VALUES_UPSERT, 'upsert'). +%% @deprecated Replaced by `azure.cosmosdb.operation.contacted_regions`. +%% Deprecated, use `azure.cosmosdb.operation.contacted_regions` instead. +-define(DB_COSMOSDB_REGIONS_CONTACTED, 'db.cosmosdb.regions_contacted'). -%% RU consumed for that operation +%% @deprecated Replaced by `azure.cosmosdb.operation.request_charge`. +%% Deprecated, use `azure.cosmosdb.operation.request_charge` instead. -define(DB_COSMOSDB_REQUEST_CHARGE, 'db.cosmosdb.request_charge'). - -%% Request payload size in bytes +%% @deprecated Replaced by `azure.cosmosdb.request.body.size`. +%% Deprecated, use `azure.cosmosdb.request.body.size` instead. -define(DB_COSMOSDB_REQUEST_CONTENT_LENGTH, 'db.cosmosdb.request_content_length'). - -%% Cosmos DB status code. +%% @deprecated Use `db.response.status_code` instead. +%% Deprecated, use `db.response.status_code` instead. -define(DB_COSMOSDB_STATUS_CODE, 'db.cosmosdb.status_code'). - -%% Cosmos DB sub status code. +%% @deprecated Replaced by `azure.cosmosdb.response.sub_status_code`. +%% Deprecated, use `azure.cosmosdb.response.sub_status_code` instead. -define(DB_COSMOSDB_SUB_STATUS_CODE, 'db.cosmosdb.sub_status_code'). %% @deprecated Replaced by `db.namespace`. @@ -179,21 +191,23 @@ %% -define(DB_ELASTICSEARCH_CLUSTER_NAME, 'db.elasticsearch.cluster.name'). - -%% Represents the human-readable identifier of the node/instance to which a request was routed. +%% @deprecated Replaced by `elasticsearch.node.name`. +%% Deprecated, use `elasticsearch.node.name` instead. %% -define(DB_ELASTICSEARCH_NODE_NAME, 'db.elasticsearch.node.name'). - -%% A dynamic value in the url path. +%% @deprecated Replaced by `db.operation.parameter`. +%% Deprecated, use `db.operation.parameter` instead. %% -define(DB_ELASTICSEARCH_PATH_PARTS, 'db.elasticsearch.path_parts'). -%% @deprecated Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. +%% @deprecated Removed, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. +%% %% Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. -define(DB_INSTANCE_ID, 'db.instance.id'). -%% @deprecated Removed as not used. +%% @deprecated Removed, no replacement at this time. +%% %% Removed, no replacement at this time. -define(DB_JDBC_DRIVER_CLASSNAME, 'db.jdbc.driver_classname'). @@ -201,7 +215,7 @@ %% Deprecated, use `db.collection.name` instead. -define(DB_MONGODB_COLLECTION, 'db.mongodb.collection'). -%% @deprecated Deprecated, no replacement at this time. +%% @deprecated Removed, no replacement at this time. %% Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. -define(DB_MSSQL_INSTANCE_NAME, 'db.mssql.instance_name'). @@ -209,39 +223,29 @@ %% Deprecated, use `db.namespace` instead. -define(DB_NAME, 'db.name'). - -%% The name of the database, fully qualified within the server address and port. -%% --define(DB_NAMESPACE, 'db.namespace'). - %% @deprecated Replaced by `db.operation.name`. %% Deprecated, use `db.operation.name` instead. -define(DB_OPERATION, 'db.operation'). -%% The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). --define(DB_OPERATION_BATCH_SIZE, 'db.operation.batch.size'). - - -%% The name of the operation or command being executed. +%% A database operation parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. %% --define(DB_OPERATION_NAME, 'db.operation.name'). +-define(DB_OPERATION_PARAMETER, 'db.operation.parameter'). -%% A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. +%% A database query parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. %% -define(DB_QUERY_PARAMETER, 'db.query.parameter'). - -%% The database query being executed. -%% --define(DB_QUERY_TEXT, 'db.query.text'). - -%% @deprecated Replaced by `db.namespace`. +%% @deprecated Uncategorized. %% Deprecated, use `db.namespace` instead. -define(DB_REDIS_DATABASE_INDEX, 'db.redis.database_index'). -%% @deprecated Replaced by `db.collection.name`. + +%% Number of rows returned by the operation. +-define(DB_RESPONSE_RETURNED_ROWS, 'db.response.returned_rows'). + +%% @deprecated Replaced by `db.collection.name`, but only if not extracting the value from `db.query.text`. %% Deprecated, use `db.collection.name` instead. -define(DB_SQL_TABLE, 'db.sql.table'). @@ -249,8 +253,8 @@ %% The database statement being executed. -define(DB_STATEMENT, 'db.statement'). - -%% The database management system (DBMS) product as identified by the client instrumentation. +%% @deprecated Replaced by `db.system.name`. +%% Deprecated, use `db.system.name` instead. -define(DB_SYSTEM, 'db.system'). -define(DB_SYSTEM_VALUES_OTHER_SQL, 'other_sql'). @@ -362,7 +366,7 @@ -define(DB_SYSTEM_VALUES_VERTICA, 'vertica'). -%% @deprecated No replacement at this time. +%% @deprecated Removed, no replacement at this time. %% Deprecated, no replacement at this time. -define(DB_USER, 'db.user'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl index 6c72d077c..31c32e880 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl @@ -13,8 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- -%% @deprecated Deprecated, use `deployment.environment.name` instead. -%% 'Deprecated, use `deployment.environment.name` instead.' +%% @deprecated Replaced by `deployment.environment.name`. +%% Deprecated, use `deployment.environment.name` instead. %% -define(DEPLOYMENT_ENVIRONMENT, 'deployment.environment'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl index b5399045b..9324e9b70 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl @@ -14,5 +14,9 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The list of IPv4 or IPv6 addresses resolved during DNS lookup. +-define(DNS_ANSWERS, 'dns.answers'). + + %% The name being queried. -define(DNS_QUESTION_NAME, 'dns.question.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/elasticsearch_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/elasticsearch_attributes.hrl new file mode 100644 index 000000000..d799e76af --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/elasticsearch_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Represents the human-readable identifier of the node/instance to which a request was routed. +%% +-define(ELASTICSEARCH_NODE_NAME, 'elasticsearch.node.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl index 82a015db7..96e35461f 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl @@ -13,14 +13,19 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- -%% @deprecated Replaced by `user.id` attribute. -%% Deprecated, use `user.id` instead. + +%% Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. -define(ENDUSER_ID, 'enduser.id'). -%% @deprecated Replaced by `user.roles` attribute. + +%% 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. +%% +-define(ENDUSER_PSEUDO_ID, 'enduser.pseudo.id'). + +%% @deprecated Use `user.roles` instead. %% Deprecated, use `user.roles` instead. -define(ENDUSER_ROLE, 'enduser.role'). -%% @deprecated Removed. +%% @deprecated Removed, no replacement at this time. %% Deprecated, no replacement at this time. -define(ENDUSER_SCOPE, 'enduser.scope'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/error_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/error_attributes.hrl new file mode 100644 index 000000000..33c7f016f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/error_attributes.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated Use domain-specific error message attribute. For example, use `feature_flag.error.message` for feature flag errors. +%% A message providing more detail about an error in human-readable form. +-define(ERROR_MESSAGE, 'error.message'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl index 58b4dbd1e..55db698a5 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/event_attributes.hrl @@ -13,7 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - +%% @deprecated The value of this attribute MUST now be set as the value of the EventName field on the LogRecord to indicate that the LogRecord represents an Event. +%% %% Identifies the class / type of event. %% -define(EVENT_NAME, 'event.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl index 5b59e448a..aef6d6091 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/feature_flag_attributes.hrl @@ -14,14 +14,93 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% The unique identifier of the feature flag. +%% The unique identifier for the flag evaluation context. For example, the targeting key. +%% +-define(FEATURE_FLAG_CONTEXT_ID, 'feature_flag.context.id'). + + +%% A message providing more detail about an error that occurred during feature flag evaluation in human-readable form. +%% +-define(FEATURE_FLAG_ERROR_MESSAGE, 'feature_flag.error.message'). + +%% @deprecated Replaced by `feature_flag.error.message`. +%% Deprecated, use `feature_flag.error.message` instead. +-define(FEATURE_FLAG_EVALUATION_ERROR_MESSAGE, 'feature_flag.evaluation.error.message'). + +%% @deprecated Replaced by `feature_flag.result.reason`. +%% Deprecated, use `feature_flag.result.reason` instead. +-define(FEATURE_FLAG_EVALUATION_REASON, 'feature_flag.evaluation.reason'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_STATIC, 'static'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_DEFAULT, 'default'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_TARGETING_MATCH, 'targeting_match'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_SPLIT, 'split'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_CACHED, 'cached'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_DISABLED, 'disabled'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_UNKNOWN, 'unknown'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_STALE, 'stale'). + +-define(FEATURE_FLAG_EVALUATION_REASON_VALUES_ERROR, 'error'). + + + +%% The lookup key of the feature flag. -define(FEATURE_FLAG_KEY, 'feature_flag.key'). -%% The name of the service provider that performs the flag evaluation. --define(FEATURE_FLAG_PROVIDER_NAME, 'feature_flag.provider_name'). +%% Identifies the feature flag provider. +-define(FEATURE_FLAG_PROVIDER_NAME, 'feature_flag.provider.name'). + + +%% The reason code which shows how a feature flag value was determined. +%% +-define(FEATURE_FLAG_RESULT_REASON, 'feature_flag.result.reason'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_STATIC, 'static'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_DEFAULT, 'default'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_TARGETING_MATCH, 'targeting_match'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_SPLIT, 'split'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_CACHED, 'cached'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_DISABLED, 'disabled'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_UNKNOWN, 'unknown'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_STALE, 'stale'). + +-define(FEATURE_FLAG_RESULT_REASON_VALUES_ERROR, 'error'). -%% SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. + +%% The evaluated value of the feature flag. +-define(FEATURE_FLAG_RESULT_VALUE, 'feature_flag.result.value'). + + +%% A semantic identifier for an evaluated flag value. +%% +-define(FEATURE_FLAG_RESULT_VARIANT, 'feature_flag.result.variant'). + + +%% The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. %% +-define(FEATURE_FLAG_SET_ID, 'feature_flag.set.id'). + +%% @deprecated Replaced by `feature_flag.result.variant`. +%% Deprecated, use `feature_flag.result.variant` instead. -define(FEATURE_FLAG_VARIANT, 'feature_flag.variant'). + + +%% The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. +%% +-define(FEATURE_FLAG_VERSION, 'feature_flag.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl index 0ea289945..b12df9a75 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl @@ -14,6 +14,26 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% Time when the file was last accessed, in ISO 8601 format. +%% +-define(FILE_ACCESSED, 'file.accessed'). + + +%% Array of file attributes. +%% +-define(FILE_ATTRIBUTES, 'file.attributes'). + + +%% Time when the file attributes or metadata was last changed, in ISO 8601 format. +%% +-define(FILE_CHANGED, 'file.changed'). + + +%% Time when the file was created, in ISO 8601 format. +%% +-define(FILE_CREATED, 'file.created'). + + %% Directory where the file is located. It should include the drive letter, when appropriate. %% -define(FILE_DIRECTORY, 'file.directory'). @@ -24,11 +44,51 @@ -define(FILE_EXTENSION, 'file.extension'). +%% Name of the fork. A fork is additional data associated with a filesystem object. +%% +-define(FILE_FORK_NAME, 'file.fork_name'). + + +%% Primary Group ID (GID) of the file. +%% +-define(FILE_GROUP_ID, 'file.group.id'). + + +%% Primary group name of the file. +%% +-define(FILE_GROUP_NAME, 'file.group.name'). + + +%% Inode representing the file in the filesystem. +%% +-define(FILE_INODE, 'file.inode'). + + +%% Mode of the file in octal representation. +%% +-define(FILE_MODE, 'file.mode'). + + +%% Time when the file content was last modified, in ISO 8601 format. +%% +-define(FILE_MODIFIED, 'file.modified'). + + %% Name of the file including the extension, without the directory. %% -define(FILE_NAME, 'file.name'). +%% The user ID (UID) or security identifier (SID) of the file owner. +%% +-define(FILE_OWNER_ID, 'file.owner.id'). + + +%% Username of the file owner. +%% +-define(FILE_OWNER_NAME, 'file.owner.name'). + + %% Full path to the file, including the file name. It should include the drive letter, when appropriate. %% -define(FILE_PATH, 'file.path'). @@ -37,3 +97,8 @@ %% File size in bytes. %% -define(FILE_SIZE, 'file.size'). + + +%% Path to the target of a symbolic link. +%% +-define(FILE_SYMBOLIC_LINK_TARGET_PATH, 'file.symbolic_link.target_path'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl index e361f8595..0787837ba 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl @@ -14,6 +14,168 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% The container within GCP where the AppHub application is defined. +%% +-define(GCP_APPHUB_APPLICATION_CONTAINER, 'gcp.apphub.application.container'). + + +%% The name of the application as configured in AppHub. +%% +-define(GCP_APPHUB_APPLICATION_ID, 'gcp.apphub.application.id'). + + +%% The GCP zone or region where the application is defined. +%% +-define(GCP_APPHUB_APPLICATION_LOCATION, 'gcp.apphub.application.location'). + + +%% Criticality of a service indicates its importance to the business. +%% +-define(GCP_APPHUB_SERVICE_CRITICALITY_TYPE, 'gcp.apphub.service.criticality_type'). + +-define(GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL, 'MISSION_CRITICAL'). + +-define(GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_HIGH, 'HIGH'). + +-define(GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_MEDIUM, 'MEDIUM'). + +-define(GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_LOW, 'LOW'). + + + +%% Environment of a service is the stage of a software lifecycle. +%% +-define(GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE, 'gcp.apphub.service.environment_type'). + +-define(GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION, 'PRODUCTION'). + +-define(GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_STAGING, 'STAGING'). + +-define(GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_TEST, 'TEST'). + +-define(GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_DEVELOPMENT, 'DEVELOPMENT'). + + + +%% The name of the service as configured in AppHub. +%% +-define(GCP_APPHUB_SERVICE_ID, 'gcp.apphub.service.id'). + + +%% Criticality of a workload indicates its importance to the business. +%% +-define(GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE, 'gcp.apphub.workload.criticality_type'). + +-define(GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL, 'MISSION_CRITICAL'). + +-define(GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_HIGH, 'HIGH'). + +-define(GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_MEDIUM, 'MEDIUM'). + +-define(GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_LOW, 'LOW'). + + + +%% Environment of a workload is the stage of a software lifecycle. +%% +-define(GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE, 'gcp.apphub.workload.environment_type'). + +-define(GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION, 'PRODUCTION'). + +-define(GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_STAGING, 'STAGING'). + +-define(GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_TEST, 'TEST'). + +-define(GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_DEVELOPMENT, 'DEVELOPMENT'). + + + +%% The name of the workload as configured in AppHub. +%% +-define(GCP_APPHUB_WORKLOAD_ID, 'gcp.apphub.workload.id'). + + +%% The container within GCP where the AppHub destination application is defined. +%% +-define(GCP_APPHUB_DESTINATION_APPLICATION_CONTAINER, 'gcp.apphub_destination.application.container'). + + +%% The name of the destination application as configured in AppHub. +%% +-define(GCP_APPHUB_DESTINATION_APPLICATION_ID, 'gcp.apphub_destination.application.id'). + + +%% The GCP zone or region where the destination application is defined. +%% +-define(GCP_APPHUB_DESTINATION_APPLICATION_LOCATION, 'gcp.apphub_destination.application.location'). + + +%% Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) +%% +-define(GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE, 'gcp.apphub_destination.service.criticality_type'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL, 'MISSION_CRITICAL'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_HIGH, 'HIGH'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_MEDIUM, 'MEDIUM'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_LOW, 'LOW'). + + + +%% Software lifecycle stage of a destination service as defined [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) +%% +-define(GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE, 'gcp.apphub_destination.service.environment_type'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION, 'PRODUCTION'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_STAGING, 'STAGING'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_TEST, 'TEST'). + +-define(GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_DEVELOPMENT, 'DEVELOPMENT'). + + + +%% The name of the destination service as configured in AppHub. +%% +-define(GCP_APPHUB_DESTINATION_SERVICE_ID, 'gcp.apphub_destination.service.id'). + + +%% Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) +%% +-define(GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE, 'gcp.apphub_destination.workload.criticality_type'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL, 'MISSION_CRITICAL'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_HIGH, 'HIGH'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_MEDIUM, 'MEDIUM'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_LOW, 'LOW'). + + + +%% Environment of a destination workload is the stage of a software lifecycle as provided in the [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) +%% +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE, 'gcp.apphub_destination.workload.environment_type'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION, 'PRODUCTION'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_STAGING, 'STAGING'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_TEST, 'TEST'). + +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_DEVELOPMENT, 'DEVELOPMENT'). + + + +%% The name of the destination workload as configured in AppHub. +%% +-define(GCP_APPHUB_DESTINATION_WORKLOAD_ID, 'gcp.apphub_destination.workload.id'). + + %% Identifies the Google Cloud service for which the official client library is intended. -define(GCP_CLIENT_SERVICE, 'gcp.client.service'). @@ -36,3 +198,18 @@ %% The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). %% -define(GCP_GCE_INSTANCE_NAME, 'gcp.gce.instance.name'). + + +%% The name of the Instance Group Manager (IGM) that manages this VM, if any. +%% +-define(GCP_GCE_INSTANCE_GROUP_MANAGER_NAME, 'gcp.gce.instance_group_manager.name'). + + +%% The region of a **regional** Instance Group Manager (e.g., `us-central1`). Set this **only** when the IGM is regional. +%% +-define(GCP_GCE_INSTANCE_GROUP_MANAGER_REGION, 'gcp.gce.instance_group_manager.region'). + + +%% The zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this **only** when the IGM is zonal. +%% +-define(GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE, 'gcp.gce.instance_group_manager.zone'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl index 08e4ac333..98754dac5 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gen_ai_attributes.hrl @@ -14,23 +14,181 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% The full response received from the GenAI model. +%% Free-form description of the GenAI agent provided by the application. +-define(GEN_AI_AGENT_DESCRIPTION, 'gen_ai.agent.description'). + + +%% The unique identifier of the GenAI agent. +-define(GEN_AI_AGENT_ID, 'gen_ai.agent.id'). + + +%% Human-readable name of the GenAI agent provided by the application. +-define(GEN_AI_AGENT_NAME, 'gen_ai.agent.name'). + + +%% The version of the GenAI agent. +-define(GEN_AI_AGENT_VERSION, 'gen_ai.agent.version'). + +%% @deprecated Removed, no replacement at this time. +%% Deprecated, use Event API to report completions contents. -define(GEN_AI_COMPLETION, 'gen_ai.completion'). +%% The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. +-define(GEN_AI_CONVERSATION_ID, 'gen_ai.conversation.id'). + + +%% The data source identifier. +-define(GEN_AI_DATA_SOURCE_ID, 'gen_ai.data_source.id'). + + +%% The number of dimensions the resulting output embeddings should have. +-define(GEN_AI_EMBEDDINGS_DIMENSION_COUNT, 'gen_ai.embeddings.dimension.count'). + + +%% A free-form explanation for the assigned score provided by the evaluator. +-define(GEN_AI_EVALUATION_EXPLANATION, 'gen_ai.evaluation.explanation'). + + +%% The name of the evaluation metric used for the GenAI response. +-define(GEN_AI_EVALUATION_NAME, 'gen_ai.evaluation.name'). + + +%% Human readable label for evaluation. +-define(GEN_AI_EVALUATION_SCORE_LABEL, 'gen_ai.evaluation.score.label'). + + +%% The evaluation score returned by the evaluator. +-define(GEN_AI_EVALUATION_SCORE_VALUE, 'gen_ai.evaluation.score.value'). + + +%% The chat history provided to the model as an input. +%% +-define(GEN_AI_INPUT_MESSAGES, 'gen_ai.input.messages'). + +%% @deprecated Replaced by `gen_ai.output.type`. +%% Deprecated, use `gen_ai.output.type`. +%% +-define(GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT, 'gen_ai.openai.request.response_format'). + +-define(GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT_VALUES_TEXT, 'text'). + +-define(GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT_VALUES_JSON_OBJECT, 'json_object'). + +-define(GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT_VALUES_JSON_SCHEMA, 'json_schema'). + + +%% @deprecated Replaced by `gen_ai.request.seed`. +%% Deprecated, use `gen_ai.request.seed`. +-define(GEN_AI_OPENAI_REQUEST_SEED, 'gen_ai.openai.request.seed'). + +%% @deprecated Replaced by `openai.request.service_tier`. +%% Deprecated, use `openai.request.service_tier`. +-define(GEN_AI_OPENAI_REQUEST_SERVICE_TIER, 'gen_ai.openai.request.service_tier'). + +-define(GEN_AI_OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO, 'auto'). + +-define(GEN_AI_OPENAI_REQUEST_SERVICE_TIER_VALUES_DEFAULT, 'default'). + + +%% @deprecated Replaced by `openai.response.service_tier`. +%% Deprecated, use `openai.response.service_tier`. +-define(GEN_AI_OPENAI_RESPONSE_SERVICE_TIER, 'gen_ai.openai.response.service_tier'). + +%% @deprecated Replaced by `openai.response.system_fingerprint`. +%% Deprecated, use `openai.response.system_fingerprint`. +-define(GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT, 'gen_ai.openai.response.system_fingerprint'). + + %% The name of the operation being performed. -define(GEN_AI_OPERATION_NAME, 'gen_ai.operation.name'). -define(GEN_AI_OPERATION_NAME_VALUES_CHAT, 'chat'). +-define(GEN_AI_OPERATION_NAME_VALUES_GENERATE_CONTENT, 'generate_content'). + -define(GEN_AI_OPERATION_NAME_VALUES_TEXT_COMPLETION, 'text_completion'). +-define(GEN_AI_OPERATION_NAME_VALUES_EMBEDDINGS, 'embeddings'). + +-define(GEN_AI_OPERATION_NAME_VALUES_RETRIEVAL, 'retrieval'). + +-define(GEN_AI_OPERATION_NAME_VALUES_CREATE_AGENT, 'create_agent'). + +-define(GEN_AI_OPERATION_NAME_VALUES_INVOKE_AGENT, 'invoke_agent'). + +-define(GEN_AI_OPERATION_NAME_VALUES_EXECUTE_TOOL, 'execute_tool'). + + + +%% Messages returned by the model where each message represents a specific model response (choice, candidate). +-define(GEN_AI_OUTPUT_MESSAGES, 'gen_ai.output.messages'). -%% The full prompt sent to the GenAI model. +%% Represents the content type requested by the client. +-define(GEN_AI_OUTPUT_TYPE, 'gen_ai.output.type'). + +-define(GEN_AI_OUTPUT_TYPE_VALUES_TEXT, 'text'). + +-define(GEN_AI_OUTPUT_TYPE_VALUES_JSON, 'json'). + +-define(GEN_AI_OUTPUT_TYPE_VALUES_IMAGE, 'image'). + +-define(GEN_AI_OUTPUT_TYPE_VALUES_SPEECH, 'speech'). + + +%% @deprecated Removed, no replacement at this time. +%% Deprecated, use Event API to report prompt contents. -define(GEN_AI_PROMPT, 'gen_ai.prompt'). +%% The name of the prompt that uniquely identifies it. +-define(GEN_AI_PROMPT_NAME, 'gen_ai.prompt.name'). + + +%% The Generative AI provider as identified by the client or server instrumentation. +-define(GEN_AI_PROVIDER_NAME, 'gen_ai.provider.name'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_OPENAI, 'openai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_GCP_GEN_AI, 'gcp.gen_ai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_GCP_VERTEX_AI, 'gcp.vertex_ai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_GCP_GEMINI, 'gcp.gemini'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_ANTHROPIC, 'anthropic'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_COHERE, 'cohere'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_AZURE_AI_INFERENCE, 'azure.ai.inference'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_AZURE_AI_OPENAI, 'azure.ai.openai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_IBM_WATSONX_AI, 'ibm.watsonx.ai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_AWS_BEDROCK, 'aws.bedrock'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_PERPLEXITY, 'perplexity'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_X_AI, 'x_ai'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_DEEPSEEK, 'deepseek'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_GROQ, 'groq'). + +-define(GEN_AI_PROVIDER_NAME_VALUES_MISTRAL_AI, 'mistral_ai'). + + + +%% The target number of candidate completions to return. +-define(GEN_AI_REQUEST_CHOICE_COUNT, 'gen_ai.request.choice.count'). + + +%% The encoding formats requested in an embeddings operation, if specified. +-define(GEN_AI_REQUEST_ENCODING_FORMATS, 'gen_ai.request.encoding_formats'). + + %% The frequency penalty setting for the GenAI request. -define(GEN_AI_REQUEST_FREQUENCY_PENALTY, 'gen_ai.request.frequency_penalty'). @@ -47,6 +205,10 @@ -define(GEN_AI_REQUEST_PRESENCE_PENALTY, 'gen_ai.request.presence_penalty'). +%% Requests with same seed value more likely to return same result. +-define(GEN_AI_REQUEST_SEED, 'gen_ai.request.seed'). + + %% List of sequences that the model will use to stop generating further tokens. -define(GEN_AI_REQUEST_STOP_SEQUENCES, 'gen_ai.request.stop_sequences'). @@ -75,17 +237,59 @@ -define(GEN_AI_RESPONSE_MODEL, 'gen_ai.response.model'). -%% The Generative AI product as identified by the client or server instrumentation. +%% The documents retrieved. +-define(GEN_AI_RETRIEVAL_DOCUMENTS, 'gen_ai.retrieval.documents'). + + +%% The query text used for retrieval. +-define(GEN_AI_RETRIEVAL_QUERY_TEXT, 'gen_ai.retrieval.query.text'). + +%% @deprecated Replaced by `gen_ai.provider.name`. +%% Deprecated, use `gen_ai.provider.name` instead. -define(GEN_AI_SYSTEM, 'gen_ai.system'). -define(GEN_AI_SYSTEM_VALUES_OPENAI, 'openai'). +-define(GEN_AI_SYSTEM_VALUES_GCP_GEN_AI, 'gcp.gen_ai'). + +-define(GEN_AI_SYSTEM_VALUES_GCP_VERTEX_AI, 'gcp.vertex_ai'). + +-define(GEN_AI_SYSTEM_VALUES_GCP_GEMINI, 'gcp.gemini'). + -define(GEN_AI_SYSTEM_VALUES_VERTEX_AI, 'vertex_ai'). +-define(GEN_AI_SYSTEM_VALUES_GEMINI, 'gemini'). + -define(GEN_AI_SYSTEM_VALUES_ANTHROPIC, 'anthropic'). -define(GEN_AI_SYSTEM_VALUES_COHERE, 'cohere'). +-define(GEN_AI_SYSTEM_VALUES_AZ_AI_INFERENCE, 'az.ai.inference'). + +-define(GEN_AI_SYSTEM_VALUES_AZ_AI_OPENAI, 'az.ai.openai'). + +-define(GEN_AI_SYSTEM_VALUES_AZURE_AI_INFERENCE, 'azure.ai.inference'). + +-define(GEN_AI_SYSTEM_VALUES_AZURE_AI_OPENAI, 'azure.ai.openai'). + +-define(GEN_AI_SYSTEM_VALUES_IBM_WATSONX_AI, 'ibm.watsonx.ai'). + +-define(GEN_AI_SYSTEM_VALUES_AWS_BEDROCK, 'aws.bedrock'). + +-define(GEN_AI_SYSTEM_VALUES_PERPLEXITY, 'perplexity'). + +-define(GEN_AI_SYSTEM_VALUES_XAI, 'xai'). + +-define(GEN_AI_SYSTEM_VALUES_DEEPSEEK, 'deepseek'). + +-define(GEN_AI_SYSTEM_VALUES_GROQ, 'groq'). + +-define(GEN_AI_SYSTEM_VALUES_MISTRAL_AI, 'mistral_ai'). + + + +%% The system message or instructions provided to the GenAI model separately from the chat history. +-define(GEN_AI_SYSTEM_INSTRUCTIONS, 'gen_ai.system_instructions'). %% The type of token being counted. @@ -95,8 +299,46 @@ -define(GEN_AI_TOKEN_TYPE_VALUES_COMPLETION, 'output'). +-define(GEN_AI_TOKEN_TYPE_VALUES_OUTPUT, 'output'). + + + +%% Parameters passed to the tool call. +-define(GEN_AI_TOOL_CALL_ARGUMENTS, 'gen_ai.tool.call.arguments'). + + +%% The tool call identifier. +-define(GEN_AI_TOOL_CALL_ID, 'gen_ai.tool.call.id'). + + +%% The result returned by the tool call (if any and if execution was successful). +-define(GEN_AI_TOOL_CALL_RESULT, 'gen_ai.tool.call.result'). + + +%% The list of source system tool definitions available to the GenAI agent or model. +-define(GEN_AI_TOOL_DEFINITIONS, 'gen_ai.tool.definitions'). + + +%% The tool description. +-define(GEN_AI_TOOL_DESCRIPTION, 'gen_ai.tool.description'). + + +%% Name of the tool utilized by the agent. +-define(GEN_AI_TOOL_NAME, 'gen_ai.tool.name'). + + +%% Type of the tool utilized by the agent +-define(GEN_AI_TOOL_TYPE, 'gen_ai.tool.type'). + + +%% The number of input tokens written to a provider-managed cache. +-define(GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS, 'gen_ai.usage.cache_creation.input_tokens'). + + +%% The number of input tokens served from a provider-managed cache. +-define(GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, 'gen_ai.usage.cache_read.input_tokens'). -%% @deprecated Replaced by `gen_ai.usage.output_tokens` attribute. +%% @deprecated Replaced by `gen_ai.usage.output_tokens`. %% Deprecated, use `gen_ai.usage.output_tokens` instead. -define(GEN_AI_USAGE_COMPLETION_TOKENS, 'gen_ai.usage.completion_tokens'). @@ -108,6 +350,6 @@ %% The number of tokens used in the GenAI response (completion). -define(GEN_AI_USAGE_OUTPUT_TOKENS, 'gen_ai.usage.output_tokens'). -%% @deprecated Replaced by `gen_ai.usage.input_tokens` attribute. +%% @deprecated Replaced by `gen_ai.usage.input_tokens`. %% Deprecated, use `gen_ai.usage.input_tokens` instead. -define(GEN_AI_USAGE_PROMPT_TOKENS, 'gen_ai.usage.prompt_tokens'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/geo_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/geo_attributes.hrl new file mode 100644 index 000000000..d2b779c8a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/geo_attributes.hrl @@ -0,0 +1,64 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Two-letter code representing continent’s name. +%% +-define(GEO_CONTINENT_CODE, 'geo.continent.code'). + +-define(GEO_CONTINENT_CODE_VALUES_AF, 'AF'). + +-define(GEO_CONTINENT_CODE_VALUES_AN, 'AN'). + +-define(GEO_CONTINENT_CODE_VALUES_AS, 'AS'). + +-define(GEO_CONTINENT_CODE_VALUES_EU, 'EU'). + +-define(GEO_CONTINENT_CODE_VALUES_NA, 'NA'). + +-define(GEO_CONTINENT_CODE_VALUES_OC, 'OC'). + +-define(GEO_CONTINENT_CODE_VALUES_SA, 'SA'). + + + +%% Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)). +%% +-define(GEO_COUNTRY_ISO_CODE, 'geo.country.iso_code'). + + +%% Locality name. Represents the name of a city, town, village, or similar populated place. +%% +-define(GEO_LOCALITY_NAME, 'geo.locality.name'). + + +%% Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +%% +-define(GEO_LOCATION_LAT, 'geo.location.lat'). + + +%% Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). +%% +-define(GEO_LOCATION_LON, 'geo.location.lon'). + + +%% Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. +%% +-define(GEO_POSTAL_CODE, 'geo.postal_code'). + + +%% Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). +%% +-define(GEO_REGION_ISO_CODE, 'geo.region.iso_code'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hardware_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hardware_attributes.hrl new file mode 100644 index 000000000..16ad5daf9 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hardware_attributes.hrl @@ -0,0 +1,235 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Design capacity in Watts-hours or Amper-hours +%% +-define(HW_BATTERY_CAPACITY, 'hw.battery.capacity'). + + +%% Battery [chemistry](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html), e.g. Lithium-Ion, Nickel-Cadmium, etc. +%% +-define(HW_BATTERY_CHEMISTRY, 'hw.battery.chemistry'). + + +%% The current state of the battery +%% +-define(HW_BATTERY_STATE, 'hw.battery.state'). + +-define(HW_BATTERY_STATE_VALUES_CHARGING, 'charging'). + +-define(HW_BATTERY_STATE_VALUES_DISCHARGING, 'discharging'). + + + +%% BIOS version of the hardware component +%% +-define(HW_BIOS_VERSION, 'hw.bios_version'). + + +%% Driver version for the hardware component +%% +-define(HW_DRIVER_VERSION, 'hw.driver_version'). + + +%% Type of the enclosure (useful for modular systems) +%% +-define(HW_ENCLOSURE_TYPE, 'hw.enclosure.type'). + + +%% Firmware version of the hardware component +%% +-define(HW_FIRMWARE_VERSION, 'hw.firmware_version'). + + +%% Type of task the GPU is performing +%% +-define(HW_GPU_TASK, 'hw.gpu.task'). + +-define(HW_GPU_TASK_VALUES_DECODER, 'decoder'). + +-define(HW_GPU_TASK_VALUES_ENCODER, 'encoder'). + +-define(HW_GPU_TASK_VALUES_GENERAL, 'general'). + + + +%% An identifier for the hardware component, unique within the monitored host +%% +-define(HW_ID, 'hw.id'). + + +%% Type of limit for hardware components +%% +-define(HW_LIMIT_TYPE, 'hw.limit_type'). + +-define(HW_LIMIT_TYPE_VALUES_CRITICAL, 'critical'). + +-define(HW_LIMIT_TYPE_VALUES_DEGRADED, 'degraded'). + +-define(HW_LIMIT_TYPE_VALUES_HIGH_CRITICAL, 'high.critical'). + +-define(HW_LIMIT_TYPE_VALUES_HIGH_DEGRADED, 'high.degraded'). + +-define(HW_LIMIT_TYPE_VALUES_LOW_CRITICAL, 'low.critical'). + +-define(HW_LIMIT_TYPE_VALUES_LOW_DEGRADED, 'low.degraded'). + +-define(HW_LIMIT_TYPE_VALUES_MAX, 'max'). + +-define(HW_LIMIT_TYPE_VALUES_THROTTLED, 'throttled'). + +-define(HW_LIMIT_TYPE_VALUES_TURBO, 'turbo'). + + + +%% RAID Level of the logical disk +%% +-define(HW_LOGICAL_DISK_RAID_LEVEL, 'hw.logical_disk.raid_level'). + + +%% State of the logical disk space usage +%% +-define(HW_LOGICAL_DISK_STATE, 'hw.logical_disk.state'). + +-define(HW_LOGICAL_DISK_STATE_VALUES_USED, 'used'). + +-define(HW_LOGICAL_DISK_STATE_VALUES_FREE, 'free'). + + + +%% Type of the memory module +%% +-define(HW_MEMORY_TYPE, 'hw.memory.type'). + + +%% Descriptive model name of the hardware component +%% +-define(HW_MODEL, 'hw.model'). + + +%% An easily-recognizable name for the hardware component +%% +-define(HW_NAME, 'hw.name'). + + +%% Logical addresses of the adapter (e.g. IP address, or WWPN) +%% +-define(HW_NETWORK_LOGICAL_ADDRESSES, 'hw.network.logical_addresses'). + + +%% Physical address of the adapter (e.g. MAC address, or WWNN) +%% +-define(HW_NETWORK_PHYSICAL_ADDRESS, 'hw.network.physical_address'). + + +%% Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) +%% +-define(HW_PARENT, 'hw.parent'). + + +%% [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute of the physical disk +%% +-define(HW_PHYSICAL_DISK_SMART_ATTRIBUTE, 'hw.physical_disk.smart_attribute'). + + +%% State of the physical disk endurance utilization +%% +-define(HW_PHYSICAL_DISK_STATE, 'hw.physical_disk.state'). + +-define(HW_PHYSICAL_DISK_STATE_VALUES_REMAINING, 'remaining'). + + + +%% Type of the physical disk +%% +-define(HW_PHYSICAL_DISK_TYPE, 'hw.physical_disk.type'). + + +%% Location of the sensor +%% +-define(HW_SENSOR_LOCATION, 'hw.sensor_location'). + + +%% Serial number of the hardware component +%% +-define(HW_SERIAL_NUMBER, 'hw.serial_number'). + + +%% The current state of the component +%% +-define(HW_STATE, 'hw.state'). + +-define(HW_STATE_VALUES_DEGRADED, 'degraded'). + +-define(HW_STATE_VALUES_FAILED, 'failed'). + +-define(HW_STATE_VALUES_NEEDS_CLEANING, 'needs_cleaning'). + +-define(HW_STATE_VALUES_OK, 'ok'). + +-define(HW_STATE_VALUES_PREDICTED_FAILURE, 'predicted_failure'). + + + +%% Type of tape drive operation +%% +-define(HW_TAPE_DRIVE_OPERATION_TYPE, 'hw.tape_drive.operation_type'). + +-define(HW_TAPE_DRIVE_OPERATION_TYPE_VALUES_MOUNT, 'mount'). + +-define(HW_TAPE_DRIVE_OPERATION_TYPE_VALUES_UNMOUNT, 'unmount'). + +-define(HW_TAPE_DRIVE_OPERATION_TYPE_VALUES_CLEAN, 'clean'). + + + +%% Type of the component +%% +-define(HW_TYPE, 'hw.type'). + +-define(HW_TYPE_VALUES_BATTERY, 'battery'). + +-define(HW_TYPE_VALUES_CPU, 'cpu'). + +-define(HW_TYPE_VALUES_DISK_CONTROLLER, 'disk_controller'). + +-define(HW_TYPE_VALUES_ENCLOSURE, 'enclosure'). + +-define(HW_TYPE_VALUES_FAN, 'fan'). + +-define(HW_TYPE_VALUES_GPU, 'gpu'). + +-define(HW_TYPE_VALUES_LOGICAL_DISK, 'logical_disk'). + +-define(HW_TYPE_VALUES_MEMORY, 'memory'). + +-define(HW_TYPE_VALUES_NETWORK, 'network'). + +-define(HW_TYPE_VALUES_PHYSICAL_DISK, 'physical_disk'). + +-define(HW_TYPE_VALUES_POWER_SUPPLY, 'power_supply'). + +-define(HW_TYPE_VALUES_TAPE_DRIVE, 'tape_drive'). + +-define(HW_TYPE_VALUES_TEMPERATURE, 'temperature'). + +-define(HW_TYPE_VALUES_VOLTAGE, 'voltage'). + + + +%% Vendor name of the hardware component +%% +-define(HW_VENDOR, 'hw.vendor'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl index cf098bbb5..f5c65ae66 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl @@ -28,8 +28,8 @@ -define(HTTP_CONNECTION_STATE_VALUES_IDLE, 'idle'). -%% @deprecated Replaced by `network.protocol.name`. -%% Deprecated, use `network.protocol.name` instead. +%% @deprecated Split into `network.protocol.name` and `network.protocol.version` +%% Deprecated, use `network.protocol.name` and `network.protocol.version` instead. -define(HTTP_FLAVOR, 'http.flavor'). -define(HTTP_FLAVOR_VALUES_HTTP_1_0, '1.0'). @@ -46,6 +46,7 @@ %% @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. +%% %% Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage. -define(HTTP_HOST, 'http.host'). @@ -85,11 +86,11 @@ %% Deprecated, use `http.response.header.content-length` instead. -define(HTTP_RESPONSE_CONTENT_LENGTH, 'http.response_content_length'). -%% @deprecated Replace by `http.response.body.size`. +%% @deprecated Replaced by `http.response.body.size`. %% Deprecated, use `http.response.body.size` instead. -define(HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, 'http.response_content_length_uncompressed'). -%% @deprecated Replaced by `url.scheme` instead. +%% @deprecated Replaced by `url.scheme`. %% Deprecated, use `url.scheme` instead. -define(HTTP_SCHEME, 'http.scheme'). @@ -101,7 +102,7 @@ %% Deprecated, use `http.response.status_code` instead. -define(HTTP_STATUS_CODE, 'http.status_code'). -%% @deprecated Split to `url.path` and `url.query. +%% @deprecated Split to `url.path` and `url.query`. %% Deprecated, use `url.path` and `url.query` instead. -define(HTTP_TARGET, 'http.target'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/jsonrpc_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/jsonrpc_attributes.hrl new file mode 100644 index 000000000..ab117c6f2 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/jsonrpc_attributes.hrl @@ -0,0 +1,24 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. +%% +-define(JSONRPC_PROTOCOL_VERSION, 'jsonrpc.protocol.version'). + + +%% A string representation of the `id` property of the request and its corresponding response. +%% +-define(JSONRPC_REQUEST_ID, 'jsonrpc.request.id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl index 61ccc98da..205db8b63 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl @@ -39,6 +39,52 @@ -define(K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON, 'k8s.container.status.last_terminated_reason'). +%% The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core) +%% +-define(K8S_CONTAINER_STATUS_REASON, 'k8s.container.status.reason'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_CONTAINER_CREATING, 'ContainerCreating'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_CRASH_LOOP_BACK_OFF, 'CrashLoopBackOff'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_CREATE_CONTAINER_CONFIG_ERROR, 'CreateContainerConfigError'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_ERR_IMAGE_PULL, 'ErrImagePull'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_IMAGE_PULL_BACK_OFF, 'ImagePullBackOff'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_OOM_KILLED, 'OOMKilled'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_COMPLETED, 'Completed'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_ERROR, 'Error'). + +-define(K8S_CONTAINER_STATUS_REASON_VALUES_CONTAINER_CANNOT_RUN, 'ContainerCannotRun'). + + + +%% The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core) +%% +-define(K8S_CONTAINER_STATUS_STATE, 'k8s.container.status.state'). + +-define(K8S_CONTAINER_STATUS_STATE_VALUES_TERMINATED, 'terminated'). + +-define(K8S_CONTAINER_STATUS_STATE_VALUES_RUNNING, 'running'). + +-define(K8S_CONTAINER_STATUS_STATE_VALUES_WAITING, 'waiting'). + + + +%% The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value. +%% +-define(K8S_CRONJOB_ANNOTATION, 'k8s.cronjob.annotation'). + + +%% The label placed on the CronJob, the `` being the label name, the value being the label value. +%% +-define(K8S_CRONJOB_LABEL, 'k8s.cronjob.label'). + + %% The name of the CronJob. %% -define(K8S_CRONJOB_NAME, 'k8s.cronjob.name'). @@ -49,6 +95,16 @@ -define(K8S_CRONJOB_UID, 'k8s.cronjob.uid'). +%% The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_DAEMONSET_ANNOTATION, 'k8s.daemonset.annotation'). + + +%% The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_DAEMONSET_LABEL, 'k8s.daemonset.label'). + + %% The name of the DaemonSet. %% -define(K8S_DAEMONSET_NAME, 'k8s.daemonset.name'). @@ -59,6 +115,16 @@ -define(K8S_DAEMONSET_UID, 'k8s.daemonset.uid'). +%% The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_DEPLOYMENT_ANNOTATION, 'k8s.deployment.annotation'). + + +%% The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_DEPLOYMENT_LABEL, 'k8s.deployment.label'). + + %% The name of the Deployment. %% -define(K8S_DEPLOYMENT_NAME, 'k8s.deployment.name'). @@ -69,6 +135,51 @@ -define(K8S_DEPLOYMENT_UID, 'k8s.deployment.uid'). +%% The type of metric source for the horizontal pod autoscaler. +%% +-define(K8S_HPA_METRIC_TYPE, 'k8s.hpa.metric.type'). + + +%% The name of the horizontal pod autoscaler. +%% +-define(K8S_HPA_NAME, 'k8s.hpa.name'). + + +%% The API version of the target resource to scale for the HorizontalPodAutoscaler. +%% +-define(K8S_HPA_SCALETARGETREF_API_VERSION, 'k8s.hpa.scaletargetref.api_version'). + + +%% The kind of the target resource to scale for the HorizontalPodAutoscaler. +%% +-define(K8S_HPA_SCALETARGETREF_KIND, 'k8s.hpa.scaletargetref.kind'). + + +%% The name of the target resource to scale for the HorizontalPodAutoscaler. +%% +-define(K8S_HPA_SCALETARGETREF_NAME, 'k8s.hpa.scaletargetref.name'). + + +%% The UID of the horizontal pod autoscaler. +%% +-define(K8S_HPA_UID, 'k8s.hpa.uid'). + + +%% The size (identifier) of the K8s huge page. +%% +-define(K8S_HUGEPAGE_SIZE, 'k8s.hugepage.size'). + + +%% The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_JOB_ANNOTATION, 'k8s.job.annotation'). + + +%% The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_JOB_LABEL, 'k8s.job.label'). + + %% The name of the Job. %% -define(K8S_JOB_NAME, 'k8s.job.name'). @@ -79,11 +190,69 @@ -define(K8S_JOB_UID, 'k8s.job.uid'). +%% The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_NAMESPACE_ANNOTATION, 'k8s.namespace.annotation'). + + +%% The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_NAMESPACE_LABEL, 'k8s.namespace.label'). + + %% The name of the namespace that the pod is running in. %% -define(K8S_NAMESPACE_NAME, 'k8s.namespace.name'). +%% The phase of the K8s namespace. +%% +-define(K8S_NAMESPACE_PHASE, 'k8s.namespace.phase'). + +-define(K8S_NAMESPACE_PHASE_VALUES_ACTIVE, 'active'). + +-define(K8S_NAMESPACE_PHASE_VALUES_TERMINATING, 'terminating'). + + + +%% The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_NODE_ANNOTATION, 'k8s.node.annotation'). + + +%% The status of the condition, one of True, False, Unknown. +%% +-define(K8S_NODE_CONDITION_STATUS, 'k8s.node.condition.status'). + +-define(K8S_NODE_CONDITION_STATUS_VALUES_CONDITION_TRUE, 'true'). + +-define(K8S_NODE_CONDITION_STATUS_VALUES_CONDITION_FALSE, 'false'). + +-define(K8S_NODE_CONDITION_STATUS_VALUES_CONDITION_UNKNOWN, 'unknown'). + + + +%% The condition type of a K8s Node. +%% +-define(K8S_NODE_CONDITION_TYPE, 'k8s.node.condition.type'). + +-define(K8S_NODE_CONDITION_TYPE_VALUES_READY, 'Ready'). + +-define(K8S_NODE_CONDITION_TYPE_VALUES_DISK_PRESSURE, 'DiskPressure'). + +-define(K8S_NODE_CONDITION_TYPE_VALUES_MEMORY_PRESSURE, 'MemoryPressure'). + +-define(K8S_NODE_CONDITION_TYPE_VALUES_PID_PRESSURE, 'PIDPressure'). + +-define(K8S_NODE_CONDITION_TYPE_VALUES_NETWORK_UNAVAILABLE, 'NetworkUnavailable'). + + + +%% The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_NODE_LABEL, 'k8s.node.label'). + + %% The name of the Node. %% -define(K8S_NODE_NAME, 'k8s.node.name'). @@ -94,12 +263,22 @@ -define(K8S_NODE_UID, 'k8s.node.uid'). -%% The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. +%% The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value. %% -define(K8S_POD_ANNOTATION, 'k8s.pod.annotation'). -%% The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. +%% Specifies the hostname of the Pod. +%% +-define(K8S_POD_HOSTNAME, 'k8s.pod.hostname'). + + +%% IP address allocated to the Pod. +%% +-define(K8S_POD_IP, 'k8s.pod.ip'). + + +%% The label placed on the Pod, the `` being the label name, the value being the label value. %% -define(K8S_POD_LABEL, 'k8s.pod.label'). @@ -113,11 +292,58 @@ -define(K8S_POD_NAME, 'k8s.pod.name'). +%% The start timestamp of the Pod. +%% +-define(K8S_POD_START_TIME, 'k8s.pod.start_time'). + + +%% The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) +%% +-define(K8S_POD_STATUS_PHASE, 'k8s.pod.status.phase'). + +-define(K8S_POD_STATUS_PHASE_VALUES_PENDING, 'Pending'). + +-define(K8S_POD_STATUS_PHASE_VALUES_RUNNING, 'Running'). + +-define(K8S_POD_STATUS_PHASE_VALUES_SUCCEEDED, 'Succeeded'). + +-define(K8S_POD_STATUS_PHASE_VALUES_FAILED, 'Failed'). + +-define(K8S_POD_STATUS_PHASE_VALUES_UNKNOWN, 'Unknown'). + + + +%% The reason for the pod state. Corresponds to the `reason` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) +%% +-define(K8S_POD_STATUS_REASON, 'k8s.pod.status.reason'). + +-define(K8S_POD_STATUS_REASON_VALUES_EVICTED, 'Evicted'). + +-define(K8S_POD_STATUS_REASON_VALUES_NODE_AFFINITY, 'NodeAffinity'). + +-define(K8S_POD_STATUS_REASON_VALUES_NODE_LOST, 'NodeLost'). + +-define(K8S_POD_STATUS_REASON_VALUES_SHUTDOWN, 'Shutdown'). + +-define(K8S_POD_STATUS_REASON_VALUES_UNEXPECTED_ADMISSION_ERROR, 'UnexpectedAdmissionError'). + + + %% The UID of the Pod. %% -define(K8S_POD_UID, 'k8s.pod.uid'). +%% The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_REPLICASET_ANNOTATION, 'k8s.replicaset.annotation'). + + +%% The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_REPLICASET_LABEL, 'k8s.replicaset.label'). + + %% The name of the ReplicaSet. %% -define(K8S_REPLICASET_NAME, 'k8s.replicaset.name'). @@ -128,6 +354,119 @@ -define(K8S_REPLICASET_UID, 'k8s.replicaset.uid'). +%% The name of the replication controller. +%% +-define(K8S_REPLICATIONCONTROLLER_NAME, 'k8s.replicationcontroller.name'). + + +%% The UID of the replication controller. +%% +-define(K8S_REPLICATIONCONTROLLER_UID, 'k8s.replicationcontroller.uid'). + + +%% The name of the resource quota. +%% +-define(K8S_RESOURCEQUOTA_NAME, 'k8s.resourcequota.name'). + + +%% The name of the K8s resource a resource quota defines. +%% +-define(K8S_RESOURCEQUOTA_RESOURCE_NAME, 'k8s.resourcequota.resource_name'). + + +%% The UID of the resource quota. +%% +-define(K8S_RESOURCEQUOTA_UID, 'k8s.resourcequota.uid'). + + +%% The annotation placed on the Service, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_SERVICE_ANNOTATION, 'k8s.service.annotation'). + + +%% The address type of the service endpoint. +%% +-define(K8S_SERVICE_ENDPOINT_ADDRESS_TYPE, 'k8s.service.endpoint.address_type'). + +-define(K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUES_IPV4, 'IPv4'). + +-define(K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUES_IPV6, 'IPv6'). + +-define(K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUES_FQDN, 'FQDN'). + + + +%% The condition of the service endpoint. +%% +-define(K8S_SERVICE_ENDPOINT_CONDITION, 'k8s.service.endpoint.condition'). + +-define(K8S_SERVICE_ENDPOINT_CONDITION_VALUES_READY, 'ready'). + +-define(K8S_SERVICE_ENDPOINT_CONDITION_VALUES_SERVING, 'serving'). + +-define(K8S_SERVICE_ENDPOINT_CONDITION_VALUES_TERMINATING, 'terminating'). + + + +%% The zone of the service endpoint. +%% +-define(K8S_SERVICE_ENDPOINT_ZONE, 'k8s.service.endpoint.zone'). + + +%% The label placed on the Service, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_SERVICE_LABEL, 'k8s.service.label'). + + +%% The name of the Service. +%% +-define(K8S_SERVICE_NAME, 'k8s.service.name'). + + +%% Whether the Service publishes not-ready endpoints. +%% +-define(K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES, 'k8s.service.publish_not_ready_addresses'). + + +%% The selector key-value pair placed on the Service, the `` being the selector key, the value being the selector value. +%% +-define(K8S_SERVICE_SELECTOR, 'k8s.service.selector'). + + +%% The traffic distribution policy for the Service. +%% +-define(K8S_SERVICE_TRAFFIC_DISTRIBUTION, 'k8s.service.traffic_distribution'). + + +%% The type of the Kubernetes Service. +%% +-define(K8S_SERVICE_TYPE, 'k8s.service.type'). + +-define(K8S_SERVICE_TYPE_VALUES_CLUSTER_IP, 'ClusterIP'). + +-define(K8S_SERVICE_TYPE_VALUES_NODE_PORT, 'NodePort'). + +-define(K8S_SERVICE_TYPE_VALUES_LOAD_BALANCER, 'LoadBalancer'). + +-define(K8S_SERVICE_TYPE_VALUES_EXTERNAL_NAME, 'ExternalName'). + + + +%% The UID of the Service. +%% +-define(K8S_SERVICE_UID, 'k8s.service.uid'). + + +%% The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. +%% +-define(K8S_STATEFULSET_ANNOTATION, 'k8s.statefulset.annotation'). + + +%% The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty. +%% +-define(K8S_STATEFULSET_LABEL, 'k8s.statefulset.label'). + + %% The name of the StatefulSet. %% -define(K8S_STATEFULSET_NAME, 'k8s.statefulset.name'). @@ -136,3 +475,31 @@ %% The UID of the StatefulSet. %% -define(K8S_STATEFULSET_UID, 'k8s.statefulset.uid'). + + +%% The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. +%% +-define(K8S_STORAGECLASS_NAME, 'k8s.storageclass.name'). + + +%% The name of the K8s volume. +%% +-define(K8S_VOLUME_NAME, 'k8s.volume.name'). + + +%% The type of the K8s volume. +%% +-define(K8S_VOLUME_TYPE, 'k8s.volume.type'). + +-define(K8S_VOLUME_TYPE_VALUES_PERSISTENT_VOLUME_CLAIM, 'persistentVolumeClaim'). + +-define(K8S_VOLUME_TYPE_VALUES_CONFIG_MAP, 'configMap'). + +-define(K8S_VOLUME_TYPE_VALUES_DOWNWARD_API, 'downwardAPI'). + +-define(K8S_VOLUME_TYPE_VALUES_EMPTY_DIR, 'emptyDir'). + +-define(K8S_VOLUME_TYPE_VALUES_SECRET, 'secret'). + +-define(K8S_VOLUME_TYPE_VALUES_LOCAL, 'local'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl index ca82508eb..0a30132a7 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl @@ -13,7 +13,7 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - +%% @deprecated Replaced by `system.memory.linux.slab.state`. %% The Linux Slab memory state -define(LINUX_MEMORY_SLAB_STATE, 'linux.memory.slab.state'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl index 770f37180..6a2384e68 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl @@ -44,7 +44,7 @@ -%% The complete orignal Log Record. +%% The complete original Log Record. %% -define(LOG_RECORD_ORIGINAL, 'log.record.original'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mainframe_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mainframe_attributes.hrl new file mode 100644 index 000000000..8e03ab604 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mainframe_attributes.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Name of the logical partition that hosts a systems with a mainframe operating system. +-define(MAINFRAME_LPAR_NAME, 'mainframe.lpar.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mcp_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mcp_attributes.hrl new file mode 100644 index 000000000..c7b8d9229 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/mcp_attributes.hrl @@ -0,0 +1,81 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name of the request or notification method. +-define(MCP_METHOD_NAME, 'mcp.method.name'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_CANCELLED, 'notifications/cancelled'). + +-define(MCP_METHOD_NAME_VALUES_INITIALIZE, 'initialize'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_INITIALIZED, 'notifications/initialized'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_PROGRESS, 'notifications/progress'). + +-define(MCP_METHOD_NAME_VALUES_PING, 'ping'). + +-define(MCP_METHOD_NAME_VALUES_RESOURCES_LIST, 'resources/list'). + +-define(MCP_METHOD_NAME_VALUES_RESOURCES_TEMPLATES_LIST, 'resources/templates/list'). + +-define(MCP_METHOD_NAME_VALUES_RESOURCES_READ, 'resources/read'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_RESOURCES_LIST_CHANGED, 'notifications/resources/list_changed'). + +-define(MCP_METHOD_NAME_VALUES_RESOURCES_SUBSCRIBE, 'resources/subscribe'). + +-define(MCP_METHOD_NAME_VALUES_RESOURCES_UNSUBSCRIBE, 'resources/unsubscribe'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_RESOURCES_UPDATED, 'notifications/resources/updated'). + +-define(MCP_METHOD_NAME_VALUES_PROMPTS_LIST, 'prompts/list'). + +-define(MCP_METHOD_NAME_VALUES_PROMPTS_GET, 'prompts/get'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_PROMPTS_LIST_CHANGED, 'notifications/prompts/list_changed'). + +-define(MCP_METHOD_NAME_VALUES_TOOLS_LIST, 'tools/list'). + +-define(MCP_METHOD_NAME_VALUES_TOOLS_CALL, 'tools/call'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_TOOLS_LIST_CHANGED, 'notifications/tools/list_changed'). + +-define(MCP_METHOD_NAME_VALUES_LOGGING_SET_LEVEL, 'logging/setLevel'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_MESSAGE, 'notifications/message'). + +-define(MCP_METHOD_NAME_VALUES_SAMPLING_CREATE_MESSAGE, 'sampling/createMessage'). + +-define(MCP_METHOD_NAME_VALUES_COMPLETION_COMPLETE, 'completion/complete'). + +-define(MCP_METHOD_NAME_VALUES_ROOTS_LIST, 'roots/list'). + +-define(MCP_METHOD_NAME_VALUES_NOTIFICATIONS_ROOTS_LIST_CHANGED, 'notifications/roots/list_changed'). + +-define(MCP_METHOD_NAME_VALUES_ELICITATION_CREATE, 'elicitation/create'). + + + +%% The [version](https://modelcontextprotocol.io/specification/versioning) of the Model Context Protocol used. +-define(MCP_PROTOCOL_VERSION, 'mcp.protocol.version'). + + +%% The value of the resource uri. +-define(MCP_RESOURCE_URI, 'mcp.resource.uri'). + + +%% Identifies [MCP session](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management). +-define(MCP_SESSION_ID, 'mcp.session.id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl index 0fec8ffca..5a2538eab 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl @@ -13,8 +13,6 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- --include_lib("opentelemetry_semantic_conventions/include/attributes/messaging_attributes.hrl"). - %% The number of messages sent, received, or processed in the scope of the batching operation. -define(MESSAGING_BATCH_MESSAGE_COUNT, 'messaging.batch.message_count'). @@ -54,16 +52,15 @@ %% A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. -define(MESSAGING_DESTINATION_TEMPORARY, 'messaging.destination.temporary'). -%% @deprecated No replacement at this time. +%% @deprecated Removed. No replacement at this time. %% Deprecated, no replacement at this time. -define(MESSAGING_DESTINATION_PUBLISH_ANONYMOUS, 'messaging.destination_publish.anonymous'). -%% @deprecated No replacement at this time. +%% @deprecated Removed. No replacement at this time. %% Deprecated, no replacement at this time. -define(MESSAGING_DESTINATION_PUBLISH_NAME, 'messaging.destination_publish.name'). %% @deprecated Replaced by `messaging.consumer.group.name`. -%% %% Deprecated, use `messaging.consumer.group.name` instead. %% -define(MESSAGING_EVENTHUBS_CONSUMER_GROUP, 'messaging.eventhubs.consumer.group'). @@ -94,12 +91,11 @@ -define(MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY, 'messaging.gcp_pubsub.message.ordering_key'). %% @deprecated Replaced by `messaging.consumer.group.name`. -%% %% Deprecated, use `messaging.consumer.group.name` instead. %% -define(MESSAGING_KAFKA_CONSUMER_GROUP, 'messaging.kafka.consumer.group'). -%% @deprecated Replaced by `messaging.destination.partition.id`. +%% @deprecated Record string representation of the partition id in `messaging.destination.partition.id` attribute. %% Deprecated, use `messaging.destination.partition.id` instead. %% -define(MESSAGING_KAFKA_DESTINATION_PARTITION, 'messaging.kafka.destination.partition'). @@ -110,7 +106,6 @@ -define(MESSAGING_KAFKA_MESSAGE_KEY, 'messaging.kafka.message.key'). %% @deprecated Replaced by `messaging.kafka.offset`. -%% %% Deprecated, use `messaging.kafka.offset` instead. %% -define(MESSAGING_KAFKA_MESSAGE_OFFSET, 'messaging.kafka.message.offset'). @@ -158,10 +153,10 @@ %% -define(MESSAGING_OPERATION_TYPE, 'messaging.operation.type'). --define(MESSAGING_OPERATION_TYPE_VALUES_PUBLISH, 'publish'). - -define(MESSAGING_OPERATION_TYPE_VALUES_CREATE, 'create'). +-define(MESSAGING_OPERATION_TYPE_VALUES_SEND, 'send'). + -define(MESSAGING_OPERATION_TYPE_VALUES_RECEIVE, 'receive'). -define(MESSAGING_OPERATION_TYPE_VALUES_PROCESS, 'process'). @@ -170,6 +165,8 @@ -define(MESSAGING_OPERATION_TYPE_VALUES_DELIVER, 'deliver'). +-define(MESSAGING_OPERATION_TYPE_VALUES_PUBLISH, 'publish'). + %% RabbitMQ message routing key. @@ -241,9 +238,8 @@ %% -define(MESSAGING_ROCKETMQ_NAMESPACE, 'messaging.rocketmq.namespace'). -%% @deprecated Replaced by `messaging.servicebus.destination.subscription_name`. -%% -%% Deprecated, use `messaging.servicebus.destination.subscription_name` instead. +%% @deprecated Replaced by `messaging.destination.subscription.name`. +%% Deprecated, use `messaging.destination.subscription.name` instead. %% -define(MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME, 'messaging.servicebus.destination.subscription_name'). @@ -277,6 +273,8 @@ -define(MESSAGING_SYSTEM_VALUES_ACTIVEMQ, 'activemq'). +-define(MESSAGING_SYSTEM_VALUES_AWS_SNS, 'aws.sns'). + -define(MESSAGING_SYSTEM_VALUES_AWS_SQS, 'aws_sqs'). -define(MESSAGING_SYSTEM_VALUES_EVENTGRID, 'eventgrid'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl index 01a700e45..4a3bf32c4 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl @@ -70,7 +70,7 @@ %% Deprecated, use `network.peer.address`. -define(NET_SOCK_PEER_ADDR, 'net.sock.peer.addr'). -%% @deprecated Removed. +%% @deprecated Removed. No replacement at this time. %% Deprecated, no replacement at this time. -define(NET_SOCK_PEER_NAME, 'net.sock.peer.name'). @@ -110,6 +110,33 @@ -define(NETWORK_CARRIER_NAME, 'network.carrier.name'). +%% The state of network connection +-define(NETWORK_CONNECTION_STATE, 'network.connection.state'). + +-define(NETWORK_CONNECTION_STATE_VALUES_CLOSED, 'closed'). + +-define(NETWORK_CONNECTION_STATE_VALUES_CLOSE_WAIT, 'close_wait'). + +-define(NETWORK_CONNECTION_STATE_VALUES_CLOSING, 'closing'). + +-define(NETWORK_CONNECTION_STATE_VALUES_ESTABLISHED, 'established'). + +-define(NETWORK_CONNECTION_STATE_VALUES_FIN_WAIT_1, 'fin_wait_1'). + +-define(NETWORK_CONNECTION_STATE_VALUES_FIN_WAIT_2, 'fin_wait_2'). + +-define(NETWORK_CONNECTION_STATE_VALUES_LAST_ACK, 'last_ack'). + +-define(NETWORK_CONNECTION_STATE_VALUES_LISTEN, 'listen'). + +-define(NETWORK_CONNECTION_STATE_VALUES_SYN_RECEIVED, 'syn_received'). + +-define(NETWORK_CONNECTION_STATE_VALUES_SYN_SENT, 'syn_sent'). + +-define(NETWORK_CONNECTION_STATE_VALUES_TIME_WAIT, 'time_wait'). + + + %% This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. -define(NETWORK_CONNECTION_SUBTYPE, 'network.connection.subtype'). @@ -172,6 +199,10 @@ +%% The network interface name. +-define(NETWORK_INTERFACE_NAME, 'network.interface.name'). + + %% The network IO operation direction. -define(NETWORK_IO_DIRECTION, 'network.io.direction'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/nfs_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/nfs_attributes.hrl new file mode 100644 index 000000000..6903f54b5 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/nfs_attributes.hrl @@ -0,0 +1,23 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% NFSv4+ operation name. +-define(NFS_OPERATION_NAME, 'nfs.operation.name'). + + +%% Linux: one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable) +%% +-define(NFS_SERVER_REPCACHE_STATUS, 'nfs.server.repcache.status'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/onc_rpc_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/onc_rpc_attributes.hrl new file mode 100644 index 000000000..c472b026a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/onc_rpc_attributes.hrl @@ -0,0 +1,30 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% ONC/Sun RPC procedure name. +-define(ONC_RPC_PROCEDURE_NAME, 'onc_rpc.procedure.name'). + + +%% ONC/Sun RPC procedure number. +-define(ONC_RPC_PROCEDURE_NUMBER, 'onc_rpc.procedure.number'). + + +%% ONC/Sun RPC program name. +-define(ONC_RPC_PROGRAM_NAME, 'onc_rpc.program.name'). + + +%% ONC/Sun RPC program version. +-define(ONC_RPC_VERSION, 'onc_rpc.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openai_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openai_attributes.hrl new file mode 100644 index 000000000..1366a293d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openai_attributes.hrl @@ -0,0 +1,40 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The type of OpenAI API being used. +-define(OPENAI_API_TYPE, 'openai.api.type'). + +-define(OPENAI_API_TYPE_VALUES_CHAT_COMPLETIONS, 'chat_completions'). + +-define(OPENAI_API_TYPE_VALUES_RESPONSES, 'responses'). + + + +%% The service tier requested. May be a specific tier, default, or auto. +-define(OPENAI_REQUEST_SERVICE_TIER, 'openai.request.service_tier'). + +-define(OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO, 'auto'). + +-define(OPENAI_REQUEST_SERVICE_TIER_VALUES_DEFAULT, 'default'). + + + +%% The service tier used for the response. +-define(OPENAI_RESPONSE_SERVICE_TIER, 'openai.response.service_tier'). + + +%% A fingerprint to track any eventual change in the Generative AI environment. +-define(OPENAI_RESPONSE_SYSTEM_FINGERPRINT, 'openai.response.system_fingerprint'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openshift_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openshift_attributes.hrl new file mode 100644 index 000000000..53a117172 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/openshift_attributes.hrl @@ -0,0 +1,24 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The name of the cluster quota. +%% +-define(OPENSHIFT_CLUSTERQUOTA_NAME, 'openshift.clusterquota.name'). + + +%% The UID of the cluster quota. +%% +-define(OPENSHIFT_CLUSTERQUOTA_UID, 'openshift.clusterquota.uid'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracle_cloud_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracle_cloud_attributes.hrl new file mode 100644 index 000000000..d6ed3058b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracle_cloud_attributes.hrl @@ -0,0 +1,19 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The OCI realm identifier that indicates the isolated partition in which the tenancy and its resources reside. +%% +-define(ORACLE_CLOUD_REALM, 'oracle_cloud.realm'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracledb_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracledb_attributes.hrl new file mode 100644 index 000000000..416ccc242 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oracledb_attributes.hrl @@ -0,0 +1,39 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The database domain associated with the connection. +%% +-define(ORACLE_DB_DOMAIN, 'oracle.db.domain'). + + +%% The instance name associated with the connection in an Oracle Real Application Clusters environment. +%% +-define(ORACLE_DB_INSTANCE_NAME, 'oracle.db.instance.name'). + + +%% The database name associated with the connection. +%% +-define(ORACLE_DB_NAME, 'oracle.db.name'). + + +%% The pluggable database (PDB) name associated with the connection. +%% +-define(ORACLE_DB_PDB, 'oracle.db.pdb'). + + +%% The service name currently associated with the database connection. +%% +-define(ORACLE_DB_SERVICE, 'oracle.db.service'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl index 93a0b2514..95d1d264f 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl @@ -53,6 +53,8 @@ -define(OS_TYPE_VALUES_Z_OS, 'z_os'). +-define(OS_TYPE_VALUES_ZOS, 'zos'). + %% The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl index 135756049..68c5b89c9 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/otel_attributes.hrl @@ -13,10 +13,86 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- -%% @deprecated use the `otel.scope.name` attribute. -%% +-include_lib("opentelemetry_semantic_conventions/include/attributes/otel_attributes.hrl"). + + +%% A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. +%% +-define(OTEL_COMPONENT_NAME, 'otel.component.name'). + + +%% A name identifying the type of the OpenTelemetry component. +%% +-define(OTEL_COMPONENT_TYPE, 'otel.component.type'). + +-define(OTEL_COMPONENT_TYPE_VALUES_BATCHING_SPAN_PROCESSOR, 'batching_span_processor'). + +-define(OTEL_COMPONENT_TYPE_VALUES_SIMPLE_SPAN_PROCESSOR, 'simple_span_processor'). + +-define(OTEL_COMPONENT_TYPE_VALUES_BATCHING_LOG_PROCESSOR, 'batching_log_processor'). + +-define(OTEL_COMPONENT_TYPE_VALUES_SIMPLE_LOG_PROCESSOR, 'simple_log_processor'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_GRPC_SPAN_EXPORTER, 'otlp_grpc_span_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_SPAN_EXPORTER, 'otlp_http_span_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_JSON_SPAN_EXPORTER, 'otlp_http_json_span_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_ZIPKIN_HTTP_SPAN_EXPORTER, 'zipkin_http_span_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_GRPC_LOG_EXPORTER, 'otlp_grpc_log_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_LOG_EXPORTER, 'otlp_http_log_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_JSON_LOG_EXPORTER, 'otlp_http_json_log_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_PERIODIC_METRIC_READER, 'periodic_metric_reader'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_GRPC_METRIC_EXPORTER, 'otlp_grpc_metric_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_METRIC_EXPORTER, 'otlp_http_metric_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_OTLP_HTTP_JSON_METRIC_EXPORTER, 'otlp_http_json_metric_exporter'). + +-define(OTEL_COMPONENT_TYPE_VALUES_PROMETHEUS_HTTP_TEXT_METRIC_EXPORTER, 'prometheus_http_text_metric_exporter'). + + + +%% Identifies the class / type of event. +%% +-define(OTEL_EVENT_NAME, 'otel.event.name'). + +%% @deprecated Replaced by `otel.scope.name`. +%% Deprecated. Use the `otel.scope.name` attribute -define(OTEL_LIBRARY_NAME, 'otel.library.name'). -%% @deprecated use the `otel.scope.version` attribute. -%% +%% @deprecated Replaced by `otel.scope.version`. +%% Deprecated. Use the `otel.scope.version` attribute. -define(OTEL_LIBRARY_VERSION, 'otel.library.version'). + + +%% The schema URL of the instrumentation scope. +-define(OTEL_SCOPE_SCHEMA_URL, 'otel.scope.schema_url'). + + +%% Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) +-define(OTEL_SPAN_PARENT_ORIGIN, 'otel.span.parent.origin'). + +-define(OTEL_SPAN_PARENT_ORIGIN_VALUES_NONE, 'none'). + +-define(OTEL_SPAN_PARENT_ORIGIN_VALUES_LOCAL, 'local'). + +-define(OTEL_SPAN_PARENT_ORIGIN_VALUES_REMOTE, 'remote'). + + + +%% The result value of the sampler for this span +-define(OTEL_SPAN_SAMPLING_RESULT, 'otel.span.sampling_result'). + +-define(OTEL_SPAN_SAMPLING_RESULT_VALUES_DROP, 'DROP'). + +-define(OTEL_SPAN_SAMPLING_RESULT_VALUES_RECORD_ONLY, 'RECORD_ONLY'). + +-define(OTEL_SPAN_SAMPLING_RESULT_VALUES_RECORD_AND_SAMPLE, 'RECORD_AND_SAMPLE'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl index 3dfee4e6d..2f001a3e1 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl @@ -13,7 +13,7 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - +%% @deprecated Replaced by `service.peer.name`. %% The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. %% -define(PEER_SERVICE, 'peer.service'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pprof_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pprof_attributes.hrl new file mode 100644 index 000000000..b766db1ac --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pprof_attributes.hrl @@ -0,0 +1,69 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes. +%% +-define(PPROF_LOCATION_IS_FOLDED, 'pprof.location.is_folded'). + + +%% Indicates that there are filenames related to this mapping. +%% +-define(PPROF_MAPPING_HAS_FILENAMES, 'pprof.mapping.has_filenames'). + + +%% Indicates that there are functions related to this mapping. +%% +-define(PPROF_MAPPING_HAS_FUNCTIONS, 'pprof.mapping.has_functions'). + + +%% Indicates that there are inline frames related to this mapping. +%% +-define(PPROF_MAPPING_HAS_INLINE_FRAMES, 'pprof.mapping.has_inline_frames'). + + +%% Indicates that there are line numbers related to this mapping. +%% +-define(PPROF_MAPPING_HAS_LINE_NUMBERS, 'pprof.mapping.has_line_numbers'). + + +%% Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. +%% +-define(PPROF_PROFILE_COMMENT, 'pprof.profile.comment'). + + +%% Documentation link for this profile type. +%% +-define(PPROF_PROFILE_DOC_URL, 'pprof.profile.doc_url'). + + +%% Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. +%% +-define(PPROF_PROFILE_DROP_FRAMES, 'pprof.profile.drop_frames'). + + +%% Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. +%% +-define(PPROF_PROFILE_KEEP_FRAMES, 'pprof.profile.keep_frames'). + + +%% Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing. +%% +-define(PPROF_SCOPE_DEFAULT_SAMPLE_TYPE, 'pprof.scope.default_sample_type'). + + +%% Records the indexes of the sample types in the original profile. +%% +-define(PPROF_SCOPE_SAMPLE_TYPE_ORDER, 'pprof.scope.sample_type_order'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl index 9910359d7..70809ddd4 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl @@ -14,30 +14,35 @@ %% limitations under the License. %%%------------------------------------------------------------------------- +%% Length of the process.command_args array +%% +-define(PROCESS_ARGS_COUNT, 'process.args_count'). + + %% 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`. %% -define(PROCESS_COMMAND, 'process.command'). -%% All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. +%% 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`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. %% -define(PROCESS_COMMAND_ARGS, 'process.command_args'). -%% The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. +%% 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. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data. %% -define(PROCESS_COMMAND_LINE, 'process.command_line'). %% Specifies whether the context switches for this data point were voluntary or involuntary. --define(PROCESS_CONTEXT_SWITCH_TYPE, 'process.context_switch_type'). +-define(PROCESS_CONTEXT_SWITCH_TYPE, 'process.context_switch.type'). -define(PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY, 'voluntary'). -define(PROCESS_CONTEXT_SWITCH_TYPE_VALUES_INVOLUNTARY, 'involuntary'). -%% @deprecated Replaced by `cpu.mode` +%% @deprecated Replaced by `cpu.mode`. %% Deprecated, use `cpu.mode` instead. -define(PROCESS_CPU_STATE, 'process.cpu.state'). @@ -54,7 +59,32 @@ -define(PROCESS_CREATION_TIME, 'process.creation.time'). -%% 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`. +%% Process environment variables, `` being the environment variable name, the value being the environment variable value. +%% +-define(PROCESS_ENVIRONMENT_VARIABLE, 'process.environment_variable'). + + +%% The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). +%% +-define(PROCESS_EXECUTABLE_BUILD_ID_GNU, 'process.executable.build_id.gnu'). + + +%% The Go build ID as retrieved by `go tool buildid `. +%% +-define(PROCESS_EXECUTABLE_BUILD_ID_GO, 'process.executable.build_id.go'). + + +%% Profiling specific build ID for executables. See the OTel specification for Profiles for more information. +%% +-define(PROCESS_EXECUTABLE_BUILD_ID_HTLHASH, 'process.executable.build_id.htlhash'). + +%% @deprecated Replaced by `process.executable.build_id.htlhash`. +%% "Deprecated, use `process.executable.build_id.htlhash` instead." +%% +-define(PROCESS_EXECUTABLE_BUILD_ID_PROFILING, 'process.executable.build_id.profiling'). + + +%% The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`. %% -define(PROCESS_EXECUTABLE_NAME, 'process.executable.name'). @@ -84,13 +114,16 @@ -define(PROCESS_INTERACTIVE, 'process.interactive'). +%% The control group associated with the process. +-define(PROCESS_LINUX_CGROUP, 'process.linux.cgroup'). + + %% The username of the user that owns the process. %% -define(PROCESS_OWNER, 'process.owner'). - -%% The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. -%% +%% @deprecated Replaced by `system.paging.fault.type`. +%% Deprecated, use `system.paging.fault.type` instead. -define(PROCESS_PAGING_FAULT_TYPE, 'process.paging.fault_type'). -define(PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR, 'major'). @@ -149,6 +182,25 @@ -define(PROCESS_SESSION_LEADER_PID, 'process.session_leader.pid'). +%% The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) +%% +-define(PROCESS_STATE, 'process.state'). + +-define(PROCESS_STATE_VALUES_RUNNING, 'running'). + +-define(PROCESS_STATE_VALUES_SLEEPING, 'sleeping'). + +-define(PROCESS_STATE_VALUES_STOPPED, 'stopped'). + +-define(PROCESS_STATE_VALUES_DEFUNCT, 'defunct'). + + + +%% Process title (proctitle) +%% +-define(PROCESS_TITLE, 'process.title'). + + %% The effective user ID (EUID) of the process. %% -define(PROCESS_USER_ID, 'process.user.id'). @@ -162,3 +214,8 @@ %% Virtual process identifier. %% -define(PROCESS_VPID, 'process.vpid'). + + +%% The working directory of the process. +%% +-define(PROCESS_WORKING_DIRECTORY, 'process.working_directory'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/profile_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/profile_attributes.hrl new file mode 100644 index 000000000..208cc458d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/profile_attributes.hrl @@ -0,0 +1,44 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Describes the interpreter or compiler of a single frame. +%% +-define(PROFILE_FRAME_TYPE, 'profile.frame.type'). + +-define(PROFILE_FRAME_TYPE_VALUES_DOTNET, 'dotnet'). + +-define(PROFILE_FRAME_TYPE_VALUES_JVM, 'jvm'). + +-define(PROFILE_FRAME_TYPE_VALUES_KERNEL, 'kernel'). + +-define(PROFILE_FRAME_TYPE_VALUES_NATIVE, 'native'). + +-define(PROFILE_FRAME_TYPE_VALUES_PERL, 'perl'). + +-define(PROFILE_FRAME_TYPE_VALUES_PHP, 'php'). + +-define(PROFILE_FRAME_TYPE_VALUES_CPYTHON, 'cpython'). + +-define(PROFILE_FRAME_TYPE_VALUES_RUBY, 'ruby'). + +-define(PROFILE_FRAME_TYPE_VALUES_V8JS, 'v8js'). + +-define(PROFILE_FRAME_TYPE_VALUES_BEAM, 'beam'). + +-define(PROFILE_FRAME_TYPE_VALUES_GO, 'go'). + +-define(PROFILE_FRAME_TYPE_VALUES_RUST, 'rust'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl index a8bdc1e4a..39244e6cd 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl @@ -13,16 +13,16 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- -%% @deprecated Replaced by `rpc.message.compressed_size`. -%% Deprecated, use `rpc.message.compressed_size` instead. +%% @deprecated Deprecated, no replacement at this time. +%% Deprecated, no replacement at this time. -define(MESSAGE_COMPRESSED_SIZE, 'message.compressed_size'). -%% @deprecated Replaced by `rpc.message.id`. -%% Deprecated, use `rpc.message.id` instead. +%% @deprecated Deprecated, no replacement at this time. +%% Deprecated, no replacement at this time. -define(MESSAGE_ID, 'message.id'). -%% @deprecated Replaced by `rpc.message.type`. -%% Deprecated, use `rpc.message.type` instead. +%% @deprecated Deprecated, no replacement at this time. +%% Deprecated, no replacement at this time. -define(MESSAGE_TYPE, 'message.type'). -define(MESSAGE_TYPE_VALUES_SENT, 'SENT'). @@ -30,12 +30,12 @@ -define(MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). -%% @deprecated Replaced by `rpc.message.uncompressed_size`. -%% Deprecated, use `rpc.message.uncompressed_size` instead. +%% @deprecated Deprecated, no replacement at this time. +%% Deprecated, no replacement at this time. -define(MESSAGE_UNCOMPRESSED_SIZE, 'message.uncompressed_size'). - -%% The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. +%% @deprecated Replaced by `rpc.response.status_code`. +%% Deprecated, use `rpc.response.status_code` attribute instead. -define(RPC_CONNECT_RPC_ERROR_CODE, 'rpc.connect_rpc.error_code'). -define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED, 'cancelled'). @@ -71,28 +71,28 @@ -define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_UNAUTHENTICATED, 'unauthenticated'). - -%% Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +%% @deprecated Replaced by `rpc.request.metadata`. +%% Deprecated, use `rpc.request.metadata` instead. %% -define(RPC_CONNECT_RPC_REQUEST_METADATA, 'rpc.connect_rpc.request.metadata'). - -%% Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. +%% @deprecated Replaced by `rpc.response.metadata`. +%% Deprecated, use `rpc.response.metadata` instead. %% -define(RPC_CONNECT_RPC_RESPONSE_METADATA, 'rpc.connect_rpc.response.metadata'). - -%% gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +%% @deprecated Replaced by `rpc.request.metadata`. +%% Deprecated, use `rpc.request.metadata` instead. %% -define(RPC_GRPC_REQUEST_METADATA, 'rpc.grpc.request.metadata'). - -%% gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. +%% @deprecated Replaced by `rpc.response.metadata`. +%% Deprecated, use `rpc.response.metadata` instead. %% -define(RPC_GRPC_RESPONSE_METADATA, 'rpc.grpc.response.metadata'). - -%% The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. +%% @deprecated Use string representation of the gRPC status code on the `rpc.response.status_code` attribute. +%% Deprecated, use string representation on the `rpc.response.status_code` attribute instead. -define(RPC_GRPC_STATUS_CODE, 'rpc.grpc.status_code'). -define(RPC_GRPC_STATUS_CODE_VALUES_OK, '0'). @@ -130,32 +130,31 @@ -define(RPC_GRPC_STATUS_CODE_VALUES_UNAUTHENTICATED, '16'). - -%% `error.code` property of response if it is an error response. +%% @deprecated Use string representation of the error code on the `rpc.response.status_code` attribute. +%% Deprecated, use string representation on the `rpc.response.status_code` attribute instead. -define(RPC_JSONRPC_ERROR_CODE, 'rpc.jsonrpc.error_code'). - -%% `error.message` property of response if it is an error response. +%% @deprecated Use the span status description when reporting JSON-RPC spans. +%% Deprecated, use the span status description when reporting JSON-RPC spans. -define(RPC_JSONRPC_ERROR_MESSAGE, 'rpc.jsonrpc.error_message'). - -%% `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. -%% +%% @deprecated Replaced by `jsonrpc.request.id`. +%% Deprecated, use `jsonrpc.request.id` instead. -define(RPC_JSONRPC_REQUEST_ID, 'rpc.jsonrpc.request_id'). - -%% Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. +%% @deprecated Replaced by `jsonrpc.protocol.version`. +%% Deprecated, use `jsonrpc.protocol.version` instead. -define(RPC_JSONRPC_VERSION, 'rpc.jsonrpc.version'). - +%% @deprecated Deprecated, no replacement at this time. %% Compressed size of the message in bytes. -define(RPC_MESSAGE_COMPRESSED_SIZE, 'rpc.message.compressed_size'). - +%% @deprecated Deprecated, no replacement at this time. %% MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. -define(RPC_MESSAGE_ID, 'rpc.message.id'). - +%% @deprecated Deprecated, no replacement at this time. %% Whether this is a received or sent message. -define(RPC_MESSAGE_TYPE, 'rpc.message.type'). @@ -164,20 +163,39 @@ -define(RPC_MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). - +%% @deprecated Deprecated, no replacement at this time. %% Uncompressed size of the message in bytes. -define(RPC_MESSAGE_UNCOMPRESSED_SIZE, 'rpc.message.uncompressed_size'). -%% The name of the (logical) method being called, must be equal to the $method part in the span name. +%% The fully-qualified logical name of the method from the RPC interface perspective. -define(RPC_METHOD, 'rpc.method'). -%% The full (logical) name of the service being called, including its package name, if applicable. --define(RPC_SERVICE, 'rpc.service'). +%% The original name of the method used by the client. +%% +-define(RPC_METHOD_ORIGINAL, 'rpc.method_original'). -%% A string identifying the remoting system. See below for a list of well-known identifiers. +%% RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_REQUEST_METADATA, 'rpc.request.metadata'). + + +%% RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. +%% +-define(RPC_RESPONSE_METADATA, 'rpc.response.metadata'). + + +%% Status code of the RPC returned by the RPC server or generated by the client +-define(RPC_RESPONSE_STATUS_CODE, 'rpc.response.status_code'). + +%% @deprecated Value should be included in `rpc.method` which is expected to be a fully-qualified name. +%% Deprecated, use fully-qualified `rpc.method` instead. +-define(RPC_SERVICE, 'rpc.service'). + +%% @deprecated Replaced by `rpc.system.name`. +%% Deprecated, use `rpc.system.name` attribute instead. -define(RPC_SYSTEM, 'rpc.system'). -define(RPC_SYSTEM_VALUES_GRPC, 'grpc'). @@ -190,3 +208,20 @@ -define(RPC_SYSTEM_VALUES_CONNECT_RPC, 'connect_rpc'). +-define(RPC_SYSTEM_VALUES_ONC_RPC, 'onc_rpc'). + +-define(RPC_SYSTEM_VALUES_JSONRPC, 'jsonrpc'). + + + +%% The Remote Procedure Call (RPC) system. +-define(RPC_SYSTEM_NAME, 'rpc.system.name'). + +-define(RPC_SYSTEM_NAME_VALUES_GRPC, 'grpc'). + +-define(RPC_SYSTEM_NAME_VALUES_DUBBO, 'dubbo'). + +-define(RPC_SYSTEM_NAME_VALUES_CONNECTRPC, 'connectrpc'). + +-define(RPC_SYSTEM_NAME_VALUES_JSONRPC, 'jsonrpc'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/security_rule_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/security_rule_attributes.hrl new file mode 100644 index 000000000..c70fab6b9 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/security_rule_attributes.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% A categorization value keyword used by the entity using the rule for detection of this event +%% +-define(SECURITY_RULE_CATEGORY, 'security_rule.category'). + + +%% The description of the rule generating the event. +%% +-define(SECURITY_RULE_DESCRIPTION, 'security_rule.description'). + + +%% Name of the license under which the rule used to generate this event is made available. +%% +-define(SECURITY_RULE_LICENSE, 'security_rule.license'). + + +%% The name of the rule or signature generating the event. +%% +-define(SECURITY_RULE_NAME, 'security_rule.name'). + + +%% Reference URL to additional information about the rule used to generate this event. +%% +-define(SECURITY_RULE_REFERENCE, 'security_rule.reference'). + + +%% Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. +%% +-define(SECURITY_RULE_RULESET_NAME, 'security_rule.ruleset.name'). + + +%% A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. +%% +-define(SECURITY_RULE_UUID, 'security_rule.uuid'). + + +%% The version / revision of the rule being used for analysis. +%% +-define(SECURITY_RULE_VERSION, 'security_rule.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl index e0896b2ad..f63084c2c 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/service_attributes.hrl @@ -16,11 +16,25 @@ -include_lib("opentelemetry_semantic_conventions/include/attributes/service_attributes.hrl"). -%% The string ID of the service instance. +%% The operational criticality of the service. %% --define(SERVICE_INSTANCE_ID, 'service.instance.id'). +-define(SERVICE_CRITICALITY, 'service.criticality'). +-define(SERVICE_CRITICALITY_VALUES_CRITICAL, 'critical'). -%% A namespace for `service.name`. +-define(SERVICE_CRITICALITY_VALUES_HIGH, 'high'). + +-define(SERVICE_CRITICALITY_VALUES_MEDIUM, 'medium'). + +-define(SERVICE_CRITICALITY_VALUES_LOW, 'low'). + + + +%% Logical name of the service on the other side of the connection. SHOULD be equal to the actual [`service.name`](/docs/resource/README.md#service) resource attribute of the remote service if any. +%% +-define(SERVICE_PEER_NAME, 'service.peer.name'). + + +%% Logical namespace of the service on the other side of the connection. SHOULD be equal to the actual [`service.namespace`](/docs/resource/README.md#service) resource attribute of the remote service if any. %% --define(SERVICE_NAMESPACE, 'service.namespace'). +-define(SERVICE_PEER_NAMESPACE, 'service.peer.namespace'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl index 0b874cc0f..ed8105502 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl @@ -13,11 +13,11 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - -%% The logical CPU number [0..n-1] +%% @deprecated Replaced by `cpu.logical_number`. +%% Deprecated, use `cpu.logical_number` instead. -define(SYSTEM_CPU_LOGICAL_NUMBER, 'system.cpu.logical_number'). -%% @deprecated Replaced by `cpu.mode` +%% @deprecated Replaced by `cpu.mode`. %% Deprecated, use `cpu.mode` instead. -define(SYSTEM_CPU_STATE, 'system.cpu.state'). @@ -77,6 +77,15 @@ +%% The Linux Slab memory state +-define(SYSTEM_MEMORY_LINUX_SLAB_STATE, 'system.memory.linux.slab.state'). + +-define(SYSTEM_MEMORY_LINUX_SLAB_STATE_VALUES_RECLAIMABLE, 'reclaimable'). + +-define(SYSTEM_MEMORY_LINUX_SLAB_STATE_VALUES_UNRECLAIMABLE, 'unreclaimable'). + + + %% The memory state -define(SYSTEM_MEMORY_STATE, 'system.memory.state'). @@ -91,8 +100,8 @@ -define(SYSTEM_MEMORY_STATE_VALUES_CACHED, 'cached'). - -%% A stateless protocol MUST NOT set this attribute +%% @deprecated Replaced by `network.connection.state`. +%% Deprecated, use `network.connection.state` instead. -define(SYSTEM_NETWORK_STATE, 'system.network.state'). -define(SYSTEM_NETWORK_STATE_VALUES_CLOSE, 'close'). @@ -130,6 +139,15 @@ +%% The paging fault type +-define(SYSTEM_PAGING_FAULT_TYPE, 'system.paging.fault.type'). + +-define(SYSTEM_PAGING_FAULT_TYPE_VALUES_MAJOR, 'major'). + +-define(SYSTEM_PAGING_FAULT_TYPE_VALUES_MINOR, 'minor'). + + + %% The memory paging state -define(SYSTEM_PAGING_STATE, 'system.paging.state'). @@ -138,8 +156,8 @@ -define(SYSTEM_PAGING_STATE_VALUES_FREE, 'free'). - -%% The memory paging type +%% @deprecated Replaced by `system.paging.fault.type`. +%% Deprecated, use `system.paging.fault.type` instead. -define(SYSTEM_PAGING_TYPE, 'system.paging.type'). -define(SYSTEM_PAGING_TYPE_VALUES_MAJOR, 'major'). @@ -147,9 +165,8 @@ -define(SYSTEM_PAGING_TYPE_VALUES_MINOR, 'minor'). - -%% The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) -%% +%% @deprecated Replaced by `process.state`. +%% Deprecated, use `process.state` instead. -define(SYSTEM_PROCESS_STATUS, 'system.process.status'). -define(SYSTEM_PROCESS_STATUS_VALUES_RUNNING, 'running'). @@ -161,8 +178,8 @@ -define(SYSTEM_PROCESS_STATUS_VALUES_DEFUNCT, 'defunct'). -%% @deprecated Replaced by `system.process.status`. -%% Deprecated, use `system.process.status` instead. +%% @deprecated Replaced by `process.state`. +%% Deprecated, use `process.state` instead. -define(SYSTEM_PROCESSES_STATUS, 'system.processes.status'). -define(SYSTEM_PROCESSES_STATUS_VALUES_RUNNING, 'running'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl index 4b308f776..eb8c3bca2 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl @@ -14,7 +14,7 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). +%% The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case). %% -define(TEST_CASE_NAME, 'test.case.name'). @@ -29,7 +29,7 @@ -%% The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). +%% The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite). %% -define(TEST_SUITE_NAME, 'test.suite.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl index 7918f446e..65939b1a2 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl @@ -59,7 +59,7 @@ %% Date/Time indicating when client certificate is first considered valid. -define(TLS_CLIENT_NOT_BEFORE, 'tls.client.not_before'). -%% @deprecated Replaced by `server.address. +%% @deprecated Replaced by `server.address`. %% Deprecated, use `server.address` instead. -define(TLS_CLIENT_SERVER_NAME, 'tls.client.server_name'). @@ -85,7 +85,7 @@ -define(TLS_NEXT_PROTOCOL, 'tls.next_protocol'). -%% Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +%% Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) %% -define(TLS_PROTOCOL_NAME, 'tls.protocol.name'). @@ -95,7 +95,7 @@ -%% Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +%% Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) %% -define(TLS_PROTOCOL_VERSION, 'tls.protocol.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl index b60d96c8f..94765411d 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_agent_attributes.hrl @@ -21,6 +21,25 @@ -define(USER_AGENT_NAME, 'user_agent.name'). +%% Human readable operating system name. +-define(USER_AGENT_OS_NAME, 'user_agent.os.name'). + + +%% The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). +%% +-define(USER_AGENT_OS_VERSION, 'user_agent.os.version'). + + +%% Specifies the category of synthetic traffic, such as tests or bots. +%% +-define(USER_AGENT_SYNTHETIC_TYPE, 'user_agent.synthetic.type'). + +-define(USER_AGENT_SYNTHETIC_TYPE_VALUES_BOT, 'bot'). + +-define(USER_AGENT_SYNTHETIC_TYPE_VALUES_TEST, 'test'). + + + %% Version of the user-agent extracted from original. Usually refers to the browser's version %% -define(USER_AGENT_VERSION, 'user_agent.version'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl index b3a3b83cb..1452a9701 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl @@ -14,28 +14,138 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. +%% The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. %% --define(VCS_REPOSITORY_CHANGE_ID, 'vcs.repository.change.id'). +-define(VCS_CHANGE_ID, 'vcs.change.id'). -%% The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +%% The state of the change (pull request/merge request/changelist). %% --define(VCS_REPOSITORY_CHANGE_TITLE, 'vcs.repository.change.title'). +-define(VCS_CHANGE_STATE, 'vcs.change.state'). + +-define(VCS_CHANGE_STATE_VALUES_OPEN, 'open'). + +-define(VCS_CHANGE_STATE_VALUES_WIP, 'wip'). + +-define(VCS_CHANGE_STATE_VALUES_CLOSED, 'closed'). + +-define(VCS_CHANGE_STATE_VALUES_MERGED, 'merged'). + + + +%% The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. +%% +-define(VCS_CHANGE_TITLE, 'vcs.change.title'). + + +%% The type of line change being measured on a branch or change. +%% +-define(VCS_LINE_CHANGE_TYPE, 'vcs.line_change.type'). + +-define(VCS_LINE_CHANGE_TYPE_VALUES_ADDED, 'added'). + +-define(VCS_LINE_CHANGE_TYPE_VALUES_REMOVED, 'removed'). + + + +%% The group owner within the version control system. +%% +-define(VCS_OWNER_NAME, 'vcs.owner.name'). + + +%% The name of the version control system provider. +%% +-define(VCS_PROVIDER_NAME, 'vcs.provider.name'). + +-define(VCS_PROVIDER_NAME_VALUES_GITHUB, 'github'). + +-define(VCS_PROVIDER_NAME_VALUES_GITLAB, 'gitlab'). + +-define(VCS_PROVIDER_NAME_VALUES_GITTEA, 'gittea'). + +-define(VCS_PROVIDER_NAME_VALUES_GITEA, 'gitea'). + +-define(VCS_PROVIDER_NAME_VALUES_BITBUCKET, 'bitbucket'). + %% The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. %% --define(VCS_REPOSITORY_REF_NAME, 'vcs.repository.ref.name'). +-define(VCS_REF_BASE_NAME, 'vcs.ref.base.name'). %% The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. %% --define(VCS_REPOSITORY_REF_REVISION, 'vcs.repository.ref.revision'). +-define(VCS_REF_BASE_REVISION, 'vcs.ref.base.revision'). + + +%% The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +%% +-define(VCS_REF_BASE_TYPE, 'vcs.ref.base.type'). + +-define(VCS_REF_BASE_TYPE_VALUES_BRANCH, 'branch'). + +-define(VCS_REF_BASE_TYPE_VALUES_TAG, 'tag'). + + + +%% The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. +%% +-define(VCS_REF_HEAD_NAME, 'vcs.ref.head.name'). + + +%% The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. +%% +-define(VCS_REF_HEAD_REVISION, 'vcs.ref.head.revision'). + + +%% The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. +%% +-define(VCS_REF_HEAD_TYPE, 'vcs.ref.head.type'). + +-define(VCS_REF_HEAD_TYPE_VALUES_BRANCH, 'branch'). + +-define(VCS_REF_HEAD_TYPE_VALUES_TAG, 'tag'). + %% The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. %% +-define(VCS_REF_TYPE, 'vcs.ref.type'). + +-define(VCS_REF_TYPE_VALUES_BRANCH, 'branch'). + +-define(VCS_REF_TYPE_VALUES_TAG, 'tag'). + + +%% @deprecated Replaced by `vcs.change.id`. +%% Deprecated, use `vcs.change.id` instead. +%% +-define(VCS_REPOSITORY_CHANGE_ID, 'vcs.repository.change.id'). + +%% @deprecated Replaced by `vcs.change.title`. +%% Deprecated, use `vcs.change.title` instead. +%% +-define(VCS_REPOSITORY_CHANGE_TITLE, 'vcs.repository.change.title'). + + +%% The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. +%% +-define(VCS_REPOSITORY_NAME, 'vcs.repository.name'). + +%% @deprecated Replaced by `vcs.ref.head.name`. +%% Deprecated, use `vcs.ref.head.name` instead. +%% +-define(VCS_REPOSITORY_REF_NAME, 'vcs.repository.ref.name'). + +%% @deprecated Replaced by `vcs.ref.head.revision`. +%% Deprecated, use `vcs.ref.head.revision` instead. +%% +-define(VCS_REPOSITORY_REF_REVISION, 'vcs.repository.ref.revision'). + +%% @deprecated Replaced by `vcs.ref.head.type`. +%% Deprecated, use `vcs.ref.head.type` instead. +%% -define(VCS_REPOSITORY_REF_TYPE, 'vcs.repository.ref.type'). -define(VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH, 'branch'). @@ -44,6 +154,16 @@ -%% The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. +%% The [canonical URL](https://support.google.com/webmasters/answer/10347851) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. %% -define(VCS_REPOSITORY_URL_FULL, 'vcs.repository.url.full'). + + +%% The type of revision comparison. +%% +-define(VCS_REVISION_DELTA_DIRECTION, 'vcs.revision_delta.direction'). + +-define(VCS_REVISION_DELTA_DIRECTION_VALUES_BEHIND, 'behind'). + +-define(VCS_REVISION_DELTA_DIRECTION_VALUES_AHEAD, 'ahead'). + diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/zos_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/zos_attributes.hrl new file mode 100644 index 000000000..374b5d7ad --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/zos_attributes.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis. +-define(ZOS_SMF_ID, 'zos.smf.id'). + + +%% The name of the SYSPLEX to which the z/OS system belongs too. +-define(ZOS_SYSPLEX_NAME, 'zos.sysplex.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/azure_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/azure_metrics.hrl new file mode 100644 index 000000000..163de8aaa --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/azure_metrics.hrl @@ -0,0 +1,22 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Number of active client instances. +-define(AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT, 'azure.cosmosdb.client.active_instance.count'). + + +%% [Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation. +-define(AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE, 'azure.cosmosdb.client.operation.request_charge'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cicd_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cicd_metrics.hrl new file mode 100644 index 000000000..f3d3a0220 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cicd_metrics.hrl @@ -0,0 +1,34 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The number of pipeline runs currently active in the system by state. +-define(CICD_PIPELINE_RUN_ACTIVE, 'cicd.pipeline.run.active'). + + +%% Duration of a pipeline run grouped by pipeline, state and result. +-define(CICD_PIPELINE_RUN_DURATION, 'cicd.pipeline.run.duration'). + + +%% The number of errors encountered in pipeline runs (eg. compile, test failures). +-define(CICD_PIPELINE_RUN_ERRORS, 'cicd.pipeline.run.errors'). + + +%% The number of errors in a component of the CICD system (eg. controller, scheduler, agent). +-define(CICD_SYSTEM_ERRORS, 'cicd.system.errors'). + + +%% The number of workers on the CICD system by state. +-define(CICD_WORKER_COUNT, 'cicd.worker.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl index 704876152..918168c1e 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl @@ -14,17 +14,53 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% Total CPU time consumed +%% Total CPU time consumed. -define(CONTAINER_CPU_TIME, 'container.cpu.time'). +%% Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. +-define(CONTAINER_CPU_USAGE, 'container.cpu.usage'). + + %% Disk bytes for the container. -define(CONTAINER_DISK_IO, 'container.disk.io'). +%% Container filesystem available bytes. +-define(CONTAINER_FILESYSTEM_AVAILABLE, 'container.filesystem.available'). + + +%% Container filesystem capacity. +-define(CONTAINER_FILESYSTEM_CAPACITY, 'container.filesystem.capacity'). + + +%% Container filesystem usage. +-define(CONTAINER_FILESYSTEM_USAGE, 'container.filesystem.usage'). + + +%% Container memory available. +-define(CONTAINER_MEMORY_AVAILABLE, 'container.memory.available'). + + +%% Container memory paging faults. +-define(CONTAINER_MEMORY_PAGING_FAULTS, 'container.memory.paging.faults'). + + +%% Container memory RSS. +-define(CONTAINER_MEMORY_RSS, 'container.memory.rss'). + + %% Memory usage of the container. -define(CONTAINER_MEMORY_USAGE, 'container.memory.usage'). +%% Container memory working set. +-define(CONTAINER_MEMORY_WORKING_SET, 'container.memory.working_set'). + + %% Network bytes for the container. -define(CONTAINER_NETWORK_IO, 'container.network.io'). + + +%% The time the container has been running. +-define(CONTAINER_UPTIME, 'container.uptime'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpu_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpu_metrics.hrl new file mode 100644 index 000000000..543d232d8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpu_metrics.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- +%% @deprecated Replaced by `system.cpu.frequency`. +%% Deprecated. Use `system.cpu.frequency` instead. +-define(CPU_FREQUENCY, 'cpu.frequency'). + +%% @deprecated Replaced by `system.cpu.time`. +%% Deprecated. Use `system.cpu.time` instead. +-define(CPU_TIME, 'cpu.time'). + +%% @deprecated Replaced by `system.cpu.utilization`. +%% Deprecated. Use `system.cpu.utilization` instead. +-define(CPU_UTILIZATION, 'cpu.utilization'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpython_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpython_metrics.hrl new file mode 100644 index 000000000..a89405714 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/cpython_metrics.hrl @@ -0,0 +1,26 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The total number of objects collected inside a generation since interpreter start. +-define(CPYTHON_GC_COLLECTED_OBJECTS, 'cpython.gc.collected_objects'). + + +%% The number of times a generation was collected since interpreter start. +-define(CPYTHON_GC_COLLECTIONS, 'cpython.gc.collections'). + + +%% The total number of objects which were found to be uncollectable inside a generation since interpreter start. +-define(CPYTHON_GC_UNCOLLECTABLE_OBJECTS, 'cpython.gc.uncollectable_objects'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl index d68836a33..c1fedd816 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl @@ -14,42 +14,42 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% The number of connections that are currently in state described by the `state` attribute +%% The number of connections that are currently in state described by the `state` attribute. -define(DB_CLIENT_CONNECTION_COUNT, 'db.client.connection.count'). -%% The time it took to create a new connection +%% The time it took to create a new connection. -define(DB_CLIENT_CONNECTION_CREATE_TIME, 'db.client.connection.create_time'). -%% The maximum number of idle open connections allowed +%% The maximum number of idle open connections allowed. -define(DB_CLIENT_CONNECTION_IDLE_MAX, 'db.client.connection.idle.max'). -%% The minimum number of idle open connections allowed +%% The minimum number of idle open connections allowed. -define(DB_CLIENT_CONNECTION_IDLE_MIN, 'db.client.connection.idle.min'). -%% The maximum number of open connections allowed +%% The maximum number of open connections allowed. -define(DB_CLIENT_CONNECTION_MAX, 'db.client.connection.max'). -%% The number of pending requests for an open connection, cumulative for the entire pool +%% The number of current pending requests for an open connection. -define(DB_CLIENT_CONNECTION_PENDING_REQUESTS, 'db.client.connection.pending_requests'). -%% The number of connection timeouts that have occurred trying to obtain a connection from the pool +%% The number of connection timeouts that have occurred trying to obtain a connection from the pool. -define(DB_CLIENT_CONNECTION_TIMEOUTS, 'db.client.connection.timeouts'). -%% The time between borrowing a connection and returning it to the pool +%% The time between borrowing a connection and returning it to the pool. -define(DB_CLIENT_CONNECTION_USE_TIME, 'db.client.connection.use_time'). -%% The time it took to obtain an open connection from the pool +%% The time it took to obtain an open connection from the pool. -define(DB_CLIENT_CONNECTION_WAIT_TIME, 'db.client.connection.wait_time'). -%% @deprecated Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. +%% @deprecated Replaced by `db.client.connection.create_time` with unit `s`. %% Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`. -define(DB_CLIENT_CONNECTIONS_CREATE_TIME, 'db.client.connections.create_time'). @@ -77,14 +77,22 @@ %% Deprecated, use `db.client.connection.count` instead. -define(DB_CLIENT_CONNECTIONS_USAGE, 'db.client.connections.usage'). -%% @deprecated Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. +%% @deprecated Replaced by `db.client.connection.use_time` with unit `s`. %% Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`. -define(DB_CLIENT_CONNECTIONS_USE_TIME, 'db.client.connections.use_time'). -%% @deprecated Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. +%% @deprecated Replaced by `db.client.connection.wait_time` with unit `s`. %% Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`. -define(DB_CLIENT_CONNECTIONS_WAIT_TIME, 'db.client.connections.wait_time'). +%% @deprecated Replaced by `azure.cosmosdb.client.active_instance.count`. +%% Deprecated, use `azure.cosmosdb.client.active_instance.count` instead. +-define(DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT, 'db.client.cosmosdb.active_instance.count'). -%% Duration of database client operations. --define(DB_CLIENT_OPERATION_DURATION, 'db.client.operation.duration'). +%% @deprecated Replaced by `azure.cosmosdb.client.operation.request_charge`. +%% Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead. +-define(DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE, 'db.client.cosmosdb.operation.request_charge'). + + +%% The actual number of records returned by the database operation. +-define(DB_CLIENT_RESPONSE_RETURNED_ROWS, 'db.client.response.returned_rows'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl index 3f777ac40..91240acba 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/faas_metrics.hrl @@ -14,37 +14,37 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% Number of invocation cold starts +%% Number of invocation cold starts. -define(FAAS_COLDSTARTS, 'faas.coldstarts'). -%% Distribution of CPU usage per invocation +%% Distribution of CPU usage per invocation. -define(FAAS_CPU_USAGE, 'faas.cpu_usage'). -%% Number of invocation errors +%% Number of invocation errors. -define(FAAS_ERRORS, 'faas.errors'). -%% Measures the duration of the function's initialization, such as a cold start +%% Measures the duration of the function's initialization, such as a cold start. -define(FAAS_INIT_DURATION, 'faas.init_duration'). -%% Number of successful invocations +%% Number of successful invocations. -define(FAAS_INVOCATIONS, 'faas.invocations'). -%% Measures the duration of the function's logic execution +%% Measures the duration of the function's logic execution. -define(FAAS_INVOKE_DURATION, 'faas.invoke_duration'). -%% Distribution of max memory usage per invocation +%% Distribution of max memory usage per invocation. -define(FAAS_MEM_USAGE, 'faas.mem_usage'). -%% Distribution of net I/O usage per invocation +%% Distribution of net I/O usage per invocation. -define(FAAS_NET_IO, 'faas.net_io'). -%% Number of invocation timeouts +%% Number of invocation timeouts. -define(FAAS_TIMEOUTS, 'faas.timeouts'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl index 9db211af7..75ada56a2 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/gen_ai_metrics.hrl @@ -14,21 +14,21 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% GenAI operation duration +%% GenAI operation duration. -define(GEN_AI_CLIENT_OPERATION_DURATION, 'gen_ai.client.operation.duration'). -%% Measures number of input and output tokens used +%% Number of input and output tokens used. -define(GEN_AI_CLIENT_TOKEN_USAGE, 'gen_ai.client.token.usage'). -%% Generative AI server request duration such as time-to-last byte or last output token +%% Generative AI server request duration such as time-to-last byte or last output token. -define(GEN_AI_SERVER_REQUEST_DURATION, 'gen_ai.server.request.duration'). -%% Time per output token generated after the first token for successful responses +%% Time per output token generated after the first token for successful responses. -define(GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN, 'gen_ai.server.time_per_output_token'). -%% Time to generate first token for successful responses +%% Time to generate first token for successful responses. -define(GEN_AI_SERVER_TIME_TO_FIRST_TOKEN, 'gen_ai.server.time_to_first_token'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/hw_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/hw_metrics.hrl new file mode 100644 index 000000000..55bcc6506 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/hw_metrics.hrl @@ -0,0 +1,184 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Remaining fraction of battery charge. +-define(HW_BATTERY_CHARGE, 'hw.battery.charge'). + + +%% Lower limit of battery charge fraction to ensure proper operation. +-define(HW_BATTERY_CHARGE_LIMIT, 'hw.battery.charge.limit'). + + +%% Time left before battery is completely charged or discharged. +-define(HW_BATTERY_TIME_LEFT, 'hw.battery.time_left'). + + +%% CPU current frequency. +-define(HW_CPU_SPEED, 'hw.cpu.speed'). + + +%% CPU maximum frequency. +-define(HW_CPU_SPEED_LIMIT, 'hw.cpu.speed.limit'). + + +%% Energy consumed by the component. +-define(HW_ENERGY, 'hw.energy'). + + +%% Number of errors encountered by the component. +-define(HW_ERRORS, 'hw.errors'). + + +%% Fan speed in revolutions per minute. +-define(HW_FAN_SPEED, 'hw.fan.speed'). + + +%% Speed limit in rpm. +-define(HW_FAN_SPEED_LIMIT, 'hw.fan.speed.limit'). + + +%% Fan speed expressed as a fraction of its maximum speed. +-define(HW_FAN_SPEED_RATIO, 'hw.fan.speed_ratio'). + + +%% Received and transmitted bytes by the GPU. +-define(HW_GPU_IO, 'hw.gpu.io'). + + +%% Size of the GPU memory. +-define(HW_GPU_MEMORY_LIMIT, 'hw.gpu.memory.limit'). + + +%% GPU memory used. +-define(HW_GPU_MEMORY_USAGE, 'hw.gpu.memory.usage'). + + +%% Fraction of GPU memory used. +-define(HW_GPU_MEMORY_UTILIZATION, 'hw.gpu.memory.utilization'). + + +%% Fraction of time spent in a specific task. +-define(HW_GPU_UTILIZATION, 'hw.gpu.utilization'). + + +%% Ambient (external) temperature of the physical host. +-define(HW_HOST_AMBIENT_TEMPERATURE, 'hw.host.ambient_temperature'). + + +%% Total energy consumed by the entire physical host, in joules. +-define(HW_HOST_ENERGY, 'hw.host.energy'). + + +%% By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors. +%% +-define(HW_HOST_HEATING_MARGIN, 'hw.host.heating_margin'). + + +%% Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred). +%% +-define(HW_HOST_POWER, 'hw.host.power'). + + +%% Size of the logical disk. +-define(HW_LOGICAL_DISK_LIMIT, 'hw.logical_disk.limit'). + + +%% Logical disk space usage. +-define(HW_LOGICAL_DISK_USAGE, 'hw.logical_disk.usage'). + + +%% Logical disk space utilization as a fraction. +-define(HW_LOGICAL_DISK_UTILIZATION, 'hw.logical_disk.utilization'). + + +%% Size of the memory module. +-define(HW_MEMORY_SIZE, 'hw.memory.size'). + + +%% Link speed. +-define(HW_NETWORK_BANDWIDTH_LIMIT, 'hw.network.bandwidth.limit'). + + +%% Utilization of the network bandwidth as a fraction. +-define(HW_NETWORK_BANDWIDTH_UTILIZATION, 'hw.network.bandwidth.utilization'). + + +%% Received and transmitted network traffic in bytes. +-define(HW_NETWORK_IO, 'hw.network.io'). + + +%% Received and transmitted network traffic in packets (or frames). +-define(HW_NETWORK_PACKETS, 'hw.network.packets'). + + +%% Link status: `1` (up) or `0` (down). +-define(HW_NETWORK_UP, 'hw.network.up'). + + +%% Endurance remaining for this SSD disk. +-define(HW_PHYSICAL_DISK_ENDURANCE_UTILIZATION, 'hw.physical_disk.endurance_utilization'). + + +%% Size of the disk. +-define(HW_PHYSICAL_DISK_SIZE, 'hw.physical_disk.size'). + + +%% Value of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute. +-define(HW_PHYSICAL_DISK_SMART, 'hw.physical_disk.smart'). + + +%% Instantaneous power consumed by the component. +-define(HW_POWER, 'hw.power'). + + +%% Maximum power output of the power supply. +-define(HW_POWER_SUPPLY_LIMIT, 'hw.power_supply.limit'). + + +%% Current power output of the power supply. +-define(HW_POWER_SUPPLY_USAGE, 'hw.power_supply.usage'). + + +%% Utilization of the power supply as a fraction of its maximum output. +-define(HW_POWER_SUPPLY_UTILIZATION, 'hw.power_supply.utilization'). + + +%% Operational status: `1` (true) or `0` (false) for each of the possible states. +-define(HW_STATUS, 'hw.status'). + + +%% Operations performed by the tape drive. +-define(HW_TAPE_DRIVE_OPERATIONS, 'hw.tape_drive.operations'). + + +%% Temperature in degrees Celsius. +-define(HW_TEMPERATURE, 'hw.temperature'). + + +%% Temperature limit in degrees Celsius. +-define(HW_TEMPERATURE_LIMIT, 'hw.temperature.limit'). + + +%% Voltage measured by the sensor. +-define(HW_VOLTAGE, 'hw.voltage'). + + +%% Voltage limit in Volts. +-define(HW_VOLTAGE_LIMIT, 'hw.voltage.limit'). + + +%% Nominal (expected) voltage. +-define(HW_VOLTAGE_NOMINAL, 'hw.voltage.nominal'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/k8s_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/k8s_metrics.hrl new file mode 100644 index 000000000..95757dc68 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/k8s_metrics.hrl @@ -0,0 +1,587 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Maximum CPU resource limit set for the container. +-define(K8S_CONTAINER_CPU_LIMIT, 'k8s.container.cpu.limit'). + + +%% The ratio of container CPU usage to its CPU limit. +-define(K8S_CONTAINER_CPU_LIMIT_UTILIZATION, 'k8s.container.cpu.limit_utilization'). + + +%% CPU resource requested for the container. +-define(K8S_CONTAINER_CPU_REQUEST, 'k8s.container.cpu.request'). + + +%% The ratio of container CPU usage to its CPU request. +-define(K8S_CONTAINER_CPU_REQUEST_UTILIZATION, 'k8s.container.cpu.request_utilization'). + + +%% Maximum ephemeral storage resource limit set for the container. +-define(K8S_CONTAINER_EPHEMERAL_STORAGE_LIMIT, 'k8s.container.ephemeral_storage.limit'). + + +%% Ephemeral storage resource requested for the container. +-define(K8S_CONTAINER_EPHEMERAL_STORAGE_REQUEST, 'k8s.container.ephemeral_storage.request'). + + +%% Maximum memory resource limit set for the container. +-define(K8S_CONTAINER_MEMORY_LIMIT, 'k8s.container.memory.limit'). + + +%% Memory resource requested for the container. +-define(K8S_CONTAINER_MEMORY_REQUEST, 'k8s.container.memory.request'). + + +%% Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready). +%% +-define(K8S_CONTAINER_READY, 'k8s.container.ready'). + + +%% Describes how many times the container has restarted (since the last counter reset). +-define(K8S_CONTAINER_RESTART_COUNT, 'k8s.container.restart.count'). + + +%% Describes the number of K8s containers that are currently in a state for a given reason. +-define(K8S_CONTAINER_STATUS_REASON, 'k8s.container.status.reason'). + + +%% Describes the number of K8s containers that are currently in a given state. +-define(K8S_CONTAINER_STATUS_STATE, 'k8s.container.status.state'). + + +%% Maximum storage resource limit set for the container. +-define(K8S_CONTAINER_STORAGE_LIMIT, 'k8s.container.storage.limit'). + + +%% Storage resource requested for the container. +-define(K8S_CONTAINER_STORAGE_REQUEST, 'k8s.container.storage.request'). + +%% @deprecated Replaced by `k8s.cronjob.job.active`. +%% Deprecated, use `k8s.cronjob.job.active` instead. +-define(K8S_CRONJOB_ACTIVE_JOBS, 'k8s.cronjob.active_jobs'). + + +%% The number of actively running jobs for a cronjob. +-define(K8S_CRONJOB_JOB_ACTIVE, 'k8s.cronjob.job.active'). + +%% @deprecated Replaced by `k8s.daemonset.node.current_scheduled`. +%% Deprecated, use `k8s.daemonset.node.current_scheduled` instead. +-define(K8S_DAEMONSET_CURRENT_SCHEDULED_NODES, 'k8s.daemonset.current_scheduled_nodes'). + +%% @deprecated Replaced by `k8s.daemonset.node.desired_scheduled`. +%% Deprecated, use `k8s.daemonset.node.desired_scheduled` instead. +-define(K8S_DAEMONSET_DESIRED_SCHEDULED_NODES, 'k8s.daemonset.desired_scheduled_nodes'). + +%% @deprecated Replaced by `k8s.daemonset.node.misscheduled`. +%% Deprecated, use `k8s.daemonset.node.misscheduled` instead. +-define(K8S_DAEMONSET_MISSCHEDULED_NODES, 'k8s.daemonset.misscheduled_nodes'). + + +%% Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. +-define(K8S_DAEMONSET_NODE_CURRENT_SCHEDULED, 'k8s.daemonset.node.current_scheduled'). + + +%% Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod). +-define(K8S_DAEMONSET_NODE_DESIRED_SCHEDULED, 'k8s.daemonset.node.desired_scheduled'). + + +%% Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. +-define(K8S_DAEMONSET_NODE_MISSCHEDULED, 'k8s.daemonset.node.misscheduled'). + + +%% Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. +-define(K8S_DAEMONSET_NODE_READY, 'k8s.daemonset.node.ready'). + +%% @deprecated Replaced by `k8s.daemonset.node.ready`. +%% Deprecated, use `k8s.daemonset.node.ready` instead. +-define(K8S_DAEMONSET_READY_NODES, 'k8s.daemonset.ready_nodes'). + +%% @deprecated Replaced by `k8s.deployment.pod.available`. +%% Deprecated, use `k8s.deployment.pod.available` instead. +-define(K8S_DEPLOYMENT_AVAILABLE_PODS, 'k8s.deployment.available_pods'). + +%% @deprecated Replaced by `k8s.deployment.pod.desired`. +%% Deprecated, use `k8s.deployment.pod.desired` instead. +-define(K8S_DEPLOYMENT_DESIRED_PODS, 'k8s.deployment.desired_pods'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment. +-define(K8S_DEPLOYMENT_POD_AVAILABLE, 'k8s.deployment.pod.available'). + + +%% Number of desired replica pods in this deployment. +-define(K8S_DEPLOYMENT_POD_DESIRED, 'k8s.deployment.pod.desired'). + +%% @deprecated Replaced by `k8s.hpa.pod.current`. +%% Deprecated, use `k8s.hpa.pod.current` instead. +-define(K8S_HPA_CURRENT_PODS, 'k8s.hpa.current_pods'). + +%% @deprecated Replaced by `k8s.hpa.pod.desired`. +%% Deprecated, use `k8s.hpa.pod.desired` instead. +-define(K8S_HPA_DESIRED_PODS, 'k8s.hpa.desired_pods'). + +%% @deprecated Replaced by `k8s.hpa.pod.max`. +%% Deprecated, use `k8s.hpa.pod.max` instead. +-define(K8S_HPA_MAX_PODS, 'k8s.hpa.max_pods'). + + +%% Target average utilization, in percentage, for CPU resource in HPA config. +-define(K8S_HPA_METRIC_TARGET_CPU_AVERAGE_UTILIZATION, 'k8s.hpa.metric.target.cpu.average_utilization'). + + +%% Target average value for CPU resource in HPA config. +-define(K8S_HPA_METRIC_TARGET_CPU_AVERAGE_VALUE, 'k8s.hpa.metric.target.cpu.average_value'). + + +%% Target value for CPU resource in HPA config. +-define(K8S_HPA_METRIC_TARGET_CPU_VALUE, 'k8s.hpa.metric.target.cpu.value'). + +%% @deprecated Replaced by `k8s.hpa.pod.min`. +%% Deprecated, use `k8s.hpa.pod.min` instead. +-define(K8S_HPA_MIN_PODS, 'k8s.hpa.min_pods'). + + +%% Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler. +-define(K8S_HPA_POD_CURRENT, 'k8s.hpa.pod.current'). + + +%% Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler. +-define(K8S_HPA_POD_DESIRED, 'k8s.hpa.pod.desired'). + + +%% The upper limit for the number of replica pods to which the autoscaler can scale up. +-define(K8S_HPA_POD_MAX, 'k8s.hpa.pod.max'). + + +%% The lower limit for the number of replica pods to which the autoscaler can scale down. +-define(K8S_HPA_POD_MIN, 'k8s.hpa.pod.min'). + +%% @deprecated Replaced by `k8s.job.pod.active`. +%% Deprecated, use `k8s.job.pod.active` instead. +-define(K8S_JOB_ACTIVE_PODS, 'k8s.job.active_pods'). + +%% @deprecated Replaced by `k8s.job.pod.desired_successful`. +%% Deprecated, use `k8s.job.pod.desired_successful` instead. +-define(K8S_JOB_DESIRED_SUCCESSFUL_PODS, 'k8s.job.desired_successful_pods'). + +%% @deprecated Replaced by `k8s.job.pod.failed`. +%% Deprecated, use `k8s.job.pod.failed` instead. +-define(K8S_JOB_FAILED_PODS, 'k8s.job.failed_pods'). + +%% @deprecated Replaced by `k8s.job.pod.max_parallel`. +%% Deprecated, use `k8s.job.pod.max_parallel` instead. +-define(K8S_JOB_MAX_PARALLEL_PODS, 'k8s.job.max_parallel_pods'). + + +%% The number of pending and actively running pods for a job. +-define(K8S_JOB_POD_ACTIVE, 'k8s.job.pod.active'). + + +%% The desired number of successfully finished pods the job should be run with. +-define(K8S_JOB_POD_DESIRED_SUCCESSFUL, 'k8s.job.pod.desired_successful'). + + +%% The number of pods which reached phase Failed for a job. +-define(K8S_JOB_POD_FAILED, 'k8s.job.pod.failed'). + + +%% The max desired number of pods the job should run at any given time. +-define(K8S_JOB_POD_MAX_PARALLEL, 'k8s.job.pod.max_parallel'). + + +%% The number of pods which reached phase Succeeded for a job. +-define(K8S_JOB_POD_SUCCESSFUL, 'k8s.job.pod.successful'). + +%% @deprecated Replaced by `k8s.job.pod.successful`. +%% Deprecated, use `k8s.job.pod.successful` instead. +-define(K8S_JOB_SUCCESSFUL_PODS, 'k8s.job.successful_pods'). + + +%% Describes number of K8s namespaces that are currently in a given phase. +-define(K8S_NAMESPACE_PHASE, 'k8s.namespace.phase'). + +%% @deprecated Replaced by `k8s.node.cpu.allocatable`. +%% Deprecated, use `k8s.node.cpu.allocatable` instead. +-define(K8S_NODE_ALLOCATABLE_CPU, 'k8s.node.allocatable.cpu'). + +%% @deprecated Replaced by `k8s.node.ephemeral_storage.allocatable`. +%% Deprecated, use `k8s.node.ephemeral_storage.allocatable` instead. +-define(K8S_NODE_ALLOCATABLE_EPHEMERAL_STORAGE, 'k8s.node.allocatable.ephemeral_storage'). + +%% @deprecated Replaced by `k8s.node.memory.allocatable`. +%% Deprecated, use `k8s.node.memory.allocatable` instead. +-define(K8S_NODE_ALLOCATABLE_MEMORY, 'k8s.node.allocatable.memory'). + +%% @deprecated Replaced by `k8s.node.pod.allocatable`. +%% Deprecated, use `k8s.node.pod.allocatable` instead. +-define(K8S_NODE_ALLOCATABLE_PODS, 'k8s.node.allocatable.pods'). + + +%% Describes the condition of a particular Node. +-define(K8S_NODE_CONDITION_STATUS, 'k8s.node.condition.status'). + + +%% Amount of cpu allocatable on the node. +-define(K8S_NODE_CPU_ALLOCATABLE, 'k8s.node.cpu.allocatable'). + + +%% Total CPU time consumed. +-define(K8S_NODE_CPU_TIME, 'k8s.node.cpu.time'). + + +%% Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. +-define(K8S_NODE_CPU_USAGE, 'k8s.node.cpu.usage'). + + +%% Amount of ephemeral-storage allocatable on the node. +-define(K8S_NODE_EPHEMERAL_STORAGE_ALLOCATABLE, 'k8s.node.ephemeral_storage.allocatable'). + + +%% Node filesystem available bytes. +-define(K8S_NODE_FILESYSTEM_AVAILABLE, 'k8s.node.filesystem.available'). + + +%% Node filesystem capacity. +-define(K8S_NODE_FILESYSTEM_CAPACITY, 'k8s.node.filesystem.capacity'). + + +%% Node filesystem usage. +-define(K8S_NODE_FILESYSTEM_USAGE, 'k8s.node.filesystem.usage'). + + +%% Amount of memory allocatable on the node. +-define(K8S_NODE_MEMORY_ALLOCATABLE, 'k8s.node.memory.allocatable'). + + +%% Node memory available. +-define(K8S_NODE_MEMORY_AVAILABLE, 'k8s.node.memory.available'). + + +%% Node memory paging faults. +-define(K8S_NODE_MEMORY_PAGING_FAULTS, 'k8s.node.memory.paging.faults'). + + +%% Node memory RSS. +-define(K8S_NODE_MEMORY_RSS, 'k8s.node.memory.rss'). + + +%% Memory usage of the Node. +-define(K8S_NODE_MEMORY_USAGE, 'k8s.node.memory.usage'). + + +%% Node memory working set. +-define(K8S_NODE_MEMORY_WORKING_SET, 'k8s.node.memory.working_set'). + + +%% Node network errors. +-define(K8S_NODE_NETWORK_ERRORS, 'k8s.node.network.errors'). + + +%% Network bytes for the Node. +-define(K8S_NODE_NETWORK_IO, 'k8s.node.network.io'). + + +%% Amount of pods allocatable on the node. +-define(K8S_NODE_POD_ALLOCATABLE, 'k8s.node.pod.allocatable'). + + +%% The time the Node has been running. +-define(K8S_NODE_UPTIME, 'k8s.node.uptime'). + + +%% Total CPU time consumed. +-define(K8S_POD_CPU_TIME, 'k8s.pod.cpu.time'). + + +%% Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. +-define(K8S_POD_CPU_USAGE, 'k8s.pod.cpu.usage'). + + +%% Pod filesystem available bytes. +-define(K8S_POD_FILESYSTEM_AVAILABLE, 'k8s.pod.filesystem.available'). + + +%% Pod filesystem capacity. +-define(K8S_POD_FILESYSTEM_CAPACITY, 'k8s.pod.filesystem.capacity'). + + +%% Pod filesystem usage. +-define(K8S_POD_FILESYSTEM_USAGE, 'k8s.pod.filesystem.usage'). + + +%% Pod memory available. +-define(K8S_POD_MEMORY_AVAILABLE, 'k8s.pod.memory.available'). + + +%% Pod memory paging faults. +-define(K8S_POD_MEMORY_PAGING_FAULTS, 'k8s.pod.memory.paging.faults'). + + +%% Pod memory RSS. +-define(K8S_POD_MEMORY_RSS, 'k8s.pod.memory.rss'). + + +%% Memory usage of the Pod. +-define(K8S_POD_MEMORY_USAGE, 'k8s.pod.memory.usage'). + + +%% Pod memory working set. +-define(K8S_POD_MEMORY_WORKING_SET, 'k8s.pod.memory.working_set'). + + +%% Pod network errors. +-define(K8S_POD_NETWORK_ERRORS, 'k8s.pod.network.errors'). + + +%% Network bytes for the Pod. +-define(K8S_POD_NETWORK_IO, 'k8s.pod.network.io'). + + +%% Describes number of K8s Pods that are currently in a given phase. +-define(K8S_POD_STATUS_PHASE, 'k8s.pod.status.phase'). + + +%% Describes the number of K8s Pods that are currently in a state for a given reason. +-define(K8S_POD_STATUS_REASON, 'k8s.pod.status.reason'). + + +%% The time the Pod has been running. +-define(K8S_POD_UPTIME, 'k8s.pod.uptime'). + + +%% Pod volume storage space available. +-define(K8S_POD_VOLUME_AVAILABLE, 'k8s.pod.volume.available'). + + +%% Pod volume total capacity. +-define(K8S_POD_VOLUME_CAPACITY, 'k8s.pod.volume.capacity'). + + +%% The total inodes in the filesystem of the Pod's volume. +-define(K8S_POD_VOLUME_INODE_COUNT, 'k8s.pod.volume.inode.count'). + + +%% The free inodes in the filesystem of the Pod's volume. +-define(K8S_POD_VOLUME_INODE_FREE, 'k8s.pod.volume.inode.free'). + + +%% The inodes used by the filesystem of the Pod's volume. +-define(K8S_POD_VOLUME_INODE_USED, 'k8s.pod.volume.inode.used'). + + +%% Pod volume usage. +-define(K8S_POD_VOLUME_USAGE, 'k8s.pod.volume.usage'). + +%% @deprecated Replaced by `k8s.replicaset.pod.available`. +%% Deprecated, use `k8s.replicaset.pod.available` instead. +-define(K8S_REPLICASET_AVAILABLE_PODS, 'k8s.replicaset.available_pods'). + +%% @deprecated Replaced by `k8s.replicaset.pod.desired`. +%% Deprecated, use `k8s.replicaset.pod.desired` instead. +-define(K8S_REPLICASET_DESIRED_PODS, 'k8s.replicaset.desired_pods'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset. +-define(K8S_REPLICASET_POD_AVAILABLE, 'k8s.replicaset.pod.available'). + + +%% Number of desired replica pods in this replicaset. +-define(K8S_REPLICASET_POD_DESIRED, 'k8s.replicaset.pod.desired'). + +%% @deprecated Replaced by `k8s.replicationcontroller.pod.available`. +%% Deprecated, use `k8s.replicationcontroller.pod.available` instead. +-define(K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS, 'k8s.replication_controller.available_pods'). + +%% @deprecated Replaced by `k8s.replicationcontroller.pod.desired`. +%% Deprecated, use `k8s.replicationcontroller.pod.desired` instead. +-define(K8S_REPLICATION_CONTROLLER_DESIRED_PODS, 'k8s.replication_controller.desired_pods'). + +%% @deprecated Replaced by `k8s.replicationcontroller.pod.available`. +%% Deprecated, use `k8s.replicationcontroller.pod.available` instead. +-define(K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS, 'k8s.replicationcontroller.available_pods'). + +%% @deprecated Replaced by `k8s.replicationcontroller.pod.desired`. +%% Deprecated, use `k8s.replicationcontroller.pod.desired` instead. +-define(K8S_REPLICATIONCONTROLLER_DESIRED_PODS, 'k8s.replicationcontroller.desired_pods'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller. +-define(K8S_REPLICATIONCONTROLLER_POD_AVAILABLE, 'k8s.replicationcontroller.pod.available'). + + +%% Number of desired replica pods in this replication controller. +-define(K8S_REPLICATIONCONTROLLER_POD_DESIRED, 'k8s.replicationcontroller.pod.desired'). + + +%% The CPU limits in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_CPU_LIMIT_HARD, 'k8s.resourcequota.cpu.limit.hard'). + + +%% The CPU limits in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_CPU_LIMIT_USED, 'k8s.resourcequota.cpu.limit.used'). + + +%% The CPU requests in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_CPU_REQUEST_HARD, 'k8s.resourcequota.cpu.request.hard'). + + +%% The CPU requests in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_CPU_REQUEST_USED, 'k8s.resourcequota.cpu.request.used'). + + +%% The sum of local ephemeral storage limits in the namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD, 'k8s.resourcequota.ephemeral_storage.limit.hard'). + + +%% The sum of local ephemeral storage limits in the namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_USED, 'k8s.resourcequota.ephemeral_storage.limit.used'). + + +%% The sum of local ephemeral storage requests in the namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD, 'k8s.resourcequota.ephemeral_storage.request.hard'). + + +%% The sum of local ephemeral storage requests in the namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_USED, 'k8s.resourcequota.ephemeral_storage.request.used'). + + +%% The huge page requests in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_HARD, 'k8s.resourcequota.hugepage_count.request.hard'). + + +%% The huge page requests in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_USED, 'k8s.resourcequota.hugepage_count.request.used'). + + +%% The memory limits in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_MEMORY_LIMIT_HARD, 'k8s.resourcequota.memory.limit.hard'). + + +%% The memory limits in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_MEMORY_LIMIT_USED, 'k8s.resourcequota.memory.limit.used'). + + +%% The memory requests in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_MEMORY_REQUEST_HARD, 'k8s.resourcequota.memory.request.hard'). + + +%% The memory requests in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_MEMORY_REQUEST_USED, 'k8s.resourcequota.memory.request.used'). + + +%% The object count limits in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_OBJECT_COUNT_HARD, 'k8s.resourcequota.object_count.hard'). + + +%% The object count limits in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_OBJECT_COUNT_USED, 'k8s.resourcequota.object_count.used'). + + +%% The total number of PersistentVolumeClaims that can exist in the namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD, 'k8s.resourcequota.persistentvolumeclaim_count.hard'). + + +%% The total number of PersistentVolumeClaims that can exist in the namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED, 'k8s.resourcequota.persistentvolumeclaim_count.used'). + + +%% The storage requests in a specific namespace. +%% The value represents the configured quota limit of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_STORAGE_REQUEST_HARD, 'k8s.resourcequota.storage.request.hard'). + + +%% The storage requests in a specific namespace. +%% The value represents the current observed total usage of the resource in the namespace. +%% +-define(K8S_RESOURCEQUOTA_STORAGE_REQUEST_USED, 'k8s.resourcequota.storage.request.used'). + + +%% Number of endpoints for a service by condition and address type. +-define(K8S_SERVICE_ENDPOINT_COUNT, 'k8s.service.endpoint.count'). + + +%% Number of load balancer ingress points (external IPs/hostnames) assigned to the service. +-define(K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT, 'k8s.service.load_balancer.ingress.count'). + +%% @deprecated Replaced by `k8s.statefulset.pod.current`. +%% Deprecated, use `k8s.statefulset.pod.current` instead. +-define(K8S_STATEFULSET_CURRENT_PODS, 'k8s.statefulset.current_pods'). + +%% @deprecated Replaced by `k8s.statefulset.pod.desired`. +%% Deprecated, use `k8s.statefulset.pod.desired` instead. +-define(K8S_STATEFULSET_DESIRED_PODS, 'k8s.statefulset.desired_pods'). + + +%% The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision. +-define(K8S_STATEFULSET_POD_CURRENT, 'k8s.statefulset.pod.current'). + + +%% Number of desired replica pods in this statefulset. +-define(K8S_STATEFULSET_POD_DESIRED, 'k8s.statefulset.pod.desired'). + + +%% The number of replica pods created for this statefulset with a Ready Condition. +-define(K8S_STATEFULSET_POD_READY, 'k8s.statefulset.pod.ready'). + + +%% Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision. +-define(K8S_STATEFULSET_POD_UPDATED, 'k8s.statefulset.pod.updated'). + +%% @deprecated Replaced by `k8s.statefulset.pod.ready`. +%% Deprecated, use `k8s.statefulset.pod.ready` instead. +-define(K8S_STATEFULSET_READY_PODS, 'k8s.statefulset.ready_pods'). + +%% @deprecated Replaced by `k8s.statefulset.pod.updated`. +%% Deprecated, use `k8s.statefulset.pod.updated` instead. +-define(K8S_STATEFULSET_UPDATED_PODS, 'k8s.statefulset.updated_pods'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/mcp_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/mcp_metrics.hrl new file mode 100644 index 000000000..b622effc6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/mcp_metrics.hrl @@ -0,0 +1,32 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The duration of the MCP request or notification as observed on the sender from the time it was sent until the response or ack is received. +%% +-define(MCP_CLIENT_OPERATION_DURATION, 'mcp.client.operation.duration'). + + +%% The duration of the MCP session as observed on the MCP client. +-define(MCP_CLIENT_SESSION_DURATION, 'mcp.client.session.duration'). + + +%% MCP request or notification duration as observed on the receiver from the time it was received until the result or ack is sent. +%% +-define(MCP_SERVER_OPERATION_DURATION, 'mcp.server.operation.duration'). + + +%% The duration of the MCP session as observed on the MCP server. +-define(MCP_SERVER_SESSION_DURATION, 'mcp.server.session.duration'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl index 381d81d60..0e53f187c 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/messaging_metrics.hrl @@ -21,11 +21,15 @@ %% Duration of messaging operation initiated by a producer or consumer client. -define(MESSAGING_CLIENT_OPERATION_DURATION, 'messaging.client.operation.duration'). - -%% Number of messages producer attempted to publish to the broker. +%% @deprecated Replaced by `messaging.client.sent.messages`. +%% Deprecated. Use `messaging.client.sent.messages` instead. -define(MESSAGING_CLIENT_PUBLISHED_MESSAGES, 'messaging.client.published.messages'). +%% Number of messages producer attempted to send to the broker. +-define(MESSAGING_CLIENT_SENT_MESSAGES, 'messaging.client.sent.messages'). + + %% Duration of processing operation. -define(MESSAGING_PROCESS_DURATION, 'messaging.process.duration'). @@ -37,8 +41,8 @@ %% Deprecated. Use `messaging.client.operation.duration` instead. -define(MESSAGING_PUBLISH_DURATION, 'messaging.publish.duration'). -%% @deprecated Replaced by `messaging.client.produced.messages`. -%% Deprecated. Use `messaging.client.produced.messages` instead. +%% @deprecated Replaced by `messaging.client.sent.messages`. +%% Deprecated. Use `messaging.client.sent.messages` instead. -define(MESSAGING_PUBLISH_MESSAGES, 'messaging.publish.messages'). %% @deprecated Replaced by `messaging.client.operation.duration`. diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/nfs_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/nfs_metrics.hrl new file mode 100644 index 000000000..f72c18f31 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/nfs_metrics.hrl @@ -0,0 +1,78 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Reports the count of kernel NFS client TCP segments and UDP datagrams handled. +-define(NFS_CLIENT_NET_COUNT, 'nfs.client.net.count'). + + +%% Reports the count of kernel NFS client TCP connections accepted. +-define(NFS_CLIENT_NET_TCP_CONNECTION_ACCEPTED, 'nfs.client.net.tcp.connection.accepted'). + + +%% Reports the count of kernel NFSv4+ client operations. +-define(NFS_CLIENT_OPERATION_COUNT, 'nfs.client.operation.count'). + + +%% Reports the count of kernel NFS client procedures. +-define(NFS_CLIENT_PROCEDURE_COUNT, 'nfs.client.procedure.count'). + + +%% Reports the count of kernel NFS client RPC authentication refreshes. +-define(NFS_CLIENT_RPC_AUTHREFRESH_COUNT, 'nfs.client.rpc.authrefresh.count'). + + +%% Reports the count of kernel NFS client RPCs sent, regardless of whether they're accepted/rejected by the server. +-define(NFS_CLIENT_RPC_COUNT, 'nfs.client.rpc.count'). + + +%% Reports the count of kernel NFS client RPC retransmits. +-define(NFS_CLIENT_RPC_RETRANSMIT_COUNT, 'nfs.client.rpc.retransmit.count'). + + +%% Reports the count of kernel NFS server stale file handles. +-define(NFS_SERVER_FH_STALE_COUNT, 'nfs.server.fh.stale.count'). + + +%% Reports the count of kernel NFS server bytes returned to receive and transmit (read and write) requests. +-define(NFS_SERVER_IO, 'nfs.server.io'). + + +%% Reports the count of kernel NFS server TCP segments and UDP datagrams handled. +-define(NFS_SERVER_NET_COUNT, 'nfs.server.net.count'). + + +%% Reports the count of kernel NFS server TCP connections accepted. +-define(NFS_SERVER_NET_TCP_CONNECTION_ACCEPTED, 'nfs.server.net.tcp.connection.accepted'). + + +%% Reports the count of kernel NFSv4+ server operations. +-define(NFS_SERVER_OPERATION_COUNT, 'nfs.server.operation.count'). + + +%% Reports the count of kernel NFS server procedures. +-define(NFS_SERVER_PROCEDURE_COUNT, 'nfs.server.procedure.count'). + + +%% Reports the kernel NFS server reply cache request count by cache hit status. +-define(NFS_SERVER_REPCACHE_REQUESTS, 'nfs.server.repcache.requests'). + + +%% Reports the count of kernel NFS server RPCs handled. +-define(NFS_SERVER_RPC_COUNT, 'nfs.server.rpc.count'). + + +%% Reports the count of kernel NFS server available threads. +-define(NFS_SERVER_THREAD_COUNT, 'nfs.server.thread.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/openshift_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/openshift_metrics.hrl new file mode 100644 index 000000000..272a16cbe --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/openshift_metrics.hrl @@ -0,0 +1,114 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_HARD, 'openshift.clusterquota.cpu.limit.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_USED, 'openshift.clusterquota.cpu.limit.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_HARD, 'openshift.clusterquota.cpu.request.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_USED, 'openshift.clusterquota.cpu.request.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD, 'openshift.clusterquota.ephemeral_storage.limit.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_USED, 'openshift.clusterquota.ephemeral_storage.limit.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD, 'openshift.clusterquota.ephemeral_storage.request.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_USED, 'openshift.clusterquota.ephemeral_storage.request.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_HARD, 'openshift.clusterquota.hugepage_count.request.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_USED, 'openshift.clusterquota.hugepage_count.request.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_HARD, 'openshift.clusterquota.memory.limit.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_USED, 'openshift.clusterquota.memory.limit.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_HARD, 'openshift.clusterquota.memory.request.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_USED, 'openshift.clusterquota.memory.request.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_HARD, 'openshift.clusterquota.object_count.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_USED, 'openshift.clusterquota.object_count.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD, 'openshift.clusterquota.persistentvolumeclaim_count.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED, 'openshift.clusterquota.persistentvolumeclaim_count.used'). + + +%% The enforced hard limit of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_HARD, 'openshift.clusterquota.storage.request.hard'). + + +%% The current observed total usage of the resource across all projects. +%% +-define(OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_USED, 'openshift.clusterquota.storage.request.used'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/otel_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/otel_metrics.hrl new file mode 100644 index 000000000..ce699791d --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/otel_metrics.hrl @@ -0,0 +1,106 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The number of log records for which the export has finished, either successful or failed. +-define(OTEL_SDK_EXPORTER_LOG_EXPORTED, 'otel.sdk.exporter.log.exported'). + + +%% The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). +-define(OTEL_SDK_EXPORTER_LOG_INFLIGHT, 'otel.sdk.exporter.log.inflight'). + + +%% The number of metric data points for which the export has finished, either successful or failed. +-define(OTEL_SDK_EXPORTER_METRIC_DATA_POINT_EXPORTED, 'otel.sdk.exporter.metric_data_point.exported'). + + +%% The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). +-define(OTEL_SDK_EXPORTER_METRIC_DATA_POINT_INFLIGHT, 'otel.sdk.exporter.metric_data_point.inflight'). + + +%% The duration of exporting a batch of telemetry records. +-define(OTEL_SDK_EXPORTER_OPERATION_DURATION, 'otel.sdk.exporter.operation.duration'). + + +%% The number of spans for which the export has finished, either successful or failed. +-define(OTEL_SDK_EXPORTER_SPAN_EXPORTED, 'otel.sdk.exporter.span.exported'). + +%% @deprecated Replaced by `otel.sdk.exporter.span.exported`. +%% Deprecated, use `otel.sdk.exporter.span.exported` instead. +-define(OTEL_SDK_EXPORTER_SPAN_EXPORTED_COUNT, 'otel.sdk.exporter.span.exported.count'). + + +%% The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). +-define(OTEL_SDK_EXPORTER_SPAN_INFLIGHT, 'otel.sdk.exporter.span.inflight'). + +%% @deprecated Replaced by `otel.sdk.exporter.span.inflight`. +%% Deprecated, use `otel.sdk.exporter.span.inflight` instead. +-define(OTEL_SDK_EXPORTER_SPAN_INFLIGHT_COUNT, 'otel.sdk.exporter.span.inflight.count'). + + +%% The number of logs submitted to enabled SDK Loggers. +-define(OTEL_SDK_LOG_CREATED, 'otel.sdk.log.created'). + + +%% The duration of the collect operation of the metric reader. +-define(OTEL_SDK_METRIC_READER_COLLECTION_DURATION, 'otel.sdk.metric_reader.collection.duration'). + + +%% The number of log records for which the processing has finished, either successful or failed. +-define(OTEL_SDK_PROCESSOR_LOG_PROCESSED, 'otel.sdk.processor.log.processed'). + + +%% The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold. +-define(OTEL_SDK_PROCESSOR_LOG_QUEUE_CAPACITY, 'otel.sdk.processor.log.queue.capacity'). + + +%% The number of log records in the queue of a given instance of an SDK log processor. +-define(OTEL_SDK_PROCESSOR_LOG_QUEUE_SIZE, 'otel.sdk.processor.log.queue.size'). + + +%% The number of spans for which the processing has finished, either successful or failed. +-define(OTEL_SDK_PROCESSOR_SPAN_PROCESSED, 'otel.sdk.processor.span.processed'). + +%% @deprecated Replaced by `otel.sdk.processor.span.processed`. +%% Deprecated, use `otel.sdk.processor.span.processed` instead. +-define(OTEL_SDK_PROCESSOR_SPAN_PROCESSED_COUNT, 'otel.sdk.processor.span.processed.count'). + + +%% The maximum number of spans the queue of a given instance of an SDK span processor can hold. +-define(OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY, 'otel.sdk.processor.span.queue.capacity'). + + +%% The number of spans in the queue of a given instance of an SDK span processor. +-define(OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE, 'otel.sdk.processor.span.queue.size'). + +%% @deprecated Obsoleted. +%% Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value. +-define(OTEL_SDK_SPAN_ENDED, 'otel.sdk.span.ended'). + +%% @deprecated Obsoleted. +%% Use `otel.sdk.span.started` minus `otel.sdk.span.live` to derive this value. +-define(OTEL_SDK_SPAN_ENDED_COUNT, 'otel.sdk.span.ended.count'). + + +%% The number of created spans with `recording=true` for which the end operation has not been called yet. +-define(OTEL_SDK_SPAN_LIVE, 'otel.sdk.span.live'). + +%% @deprecated Replaced by `otel.sdk.span.live`. +%% Deprecated, use `otel.sdk.span.live` instead. +-define(OTEL_SDK_SPAN_LIVE_COUNT, 'otel.sdk.span.live.count'). + + +%% The number of created spans. +-define(OTEL_SDK_SPAN_STARTED, 'otel.sdk.span.started'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl index e4dbe3ba3..785747552 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl @@ -41,8 +41,8 @@ %% Network bytes transferred. -define(PROCESS_NETWORK_IO, 'process.network.io'). - -%% Number of file descriptors in use by the process. +%% @deprecated Replaced by `process.unix.file_descriptor.count`. +%% Deprecated, use `process.unix.file_descriptor.count` instead. -define(PROCESS_OPEN_FILE_DESCRIPTOR_COUNT, 'process.open_file_descriptor.count'). @@ -52,3 +52,15 @@ %% Process threads count. -define(PROCESS_THREAD_COUNT, 'process.thread.count'). + + +%% Number of unix file descriptors in use by the process. +-define(PROCESS_UNIX_FILE_DESCRIPTOR_COUNT, 'process.unix.file_descriptor.count'). + + +%% The time the process has been running. +-define(PROCESS_UPTIME, 'process.uptime'). + + +%% Number of handles held by the process. +-define(PROCESS_WINDOWS_HANDLE_COUNT, 'process.windows.handle.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl index 44ec47ff8..f1263142d 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/rpc_metrics.hrl @@ -14,41 +14,49 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% Measures the duration of outbound RPC. --define(RPC_CLIENT_DURATION, 'rpc.client.duration'). +%% Measures the duration of an outgoing Remote Procedure Call (RPC). +-define(RPC_CLIENT_CALL_DURATION, 'rpc.client.call.duration'). +%% @deprecated Replaced by `rpc.client.call.duration` with unit `s`. +%% Deprecated, use `rpc.client.call.duration` instead. Note: the unit also changed from `ms` to `s`. +-define(RPC_CLIENT_DURATION, 'rpc.client.duration'). +%% @deprecated Removed, no replacement at this time. %% Measures the size of RPC request messages (uncompressed). -define(RPC_CLIENT_REQUEST_SIZE, 'rpc.client.request.size'). - +%% @deprecated Removed, no replacement at this time. %% Measures the number of messages received per RPC. -define(RPC_CLIENT_REQUESTS_PER_RPC, 'rpc.client.requests_per_rpc'). - +%% @deprecated Removed, no replacement at this time. %% Measures the size of RPC response messages (uncompressed). -define(RPC_CLIENT_RESPONSE_SIZE, 'rpc.client.response.size'). - +%% @deprecated Removed, no replacement at this time. %% Measures the number of messages sent per RPC. -define(RPC_CLIENT_RESPONSES_PER_RPC, 'rpc.client.responses_per_rpc'). -%% Measures the duration of inbound RPC. --define(RPC_SERVER_DURATION, 'rpc.server.duration'). +%% Measures the duration of an incoming Remote Procedure Call (RPC). +-define(RPC_SERVER_CALL_DURATION, 'rpc.server.call.duration'). +%% @deprecated Replaced by `rpc.server.call.duration` with unit `s`. +%% Deprecated, use `rpc.server.call.duration` instead. Note: the unit also changed from `ms` to `s`. +-define(RPC_SERVER_DURATION, 'rpc.server.duration'). +%% @deprecated Removed, no replacement at this time. %% Measures the size of RPC request messages (uncompressed). -define(RPC_SERVER_REQUEST_SIZE, 'rpc.server.request.size'). - +%% @deprecated Removed, no replacement at this time. %% Measures the number of messages received per RPC. -define(RPC_SERVER_REQUESTS_PER_RPC, 'rpc.server.requests_per_rpc'). - +%% @deprecated Removed, no replacement at this time. %% Measures the size of RPC response messages (uncompressed). -define(RPC_SERVER_RESPONSE_SIZE, 'rpc.server.response.size'). - +%% @deprecated Removed, no replacement at this time. %% Measures the number of messages sent per RPC. -define(RPC_SERVER_RESPONSES_PER_RPC, 'rpc.server.responses_per_rpc'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl index 5e38b8d60..dff4e6b29 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl @@ -14,67 +14,87 @@ %% limitations under the License. %%%------------------------------------------------------------------------- -%% Reports the current frequency of the CPU in Hz +%% Operating frequency of the logical CPU in Hertz. -define(SYSTEM_CPU_FREQUENCY, 'system.cpu.frequency'). -%% Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking +%% Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking. -define(SYSTEM_CPU_LOGICAL_COUNT, 'system.cpu.logical.count'). -%% Reports the number of actual physical processor cores on the hardware +%% Reports the number of actual physical processor cores on the hardware. -define(SYSTEM_CPU_PHYSICAL_COUNT, 'system.cpu.physical.count'). -%% Seconds each logical CPU spent on each mode +%% Seconds each logical CPU spent on each mode. -define(SYSTEM_CPU_TIME, 'system.cpu.time'). -%% Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs +%% For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time. -define(SYSTEM_CPU_UTILIZATION, 'system.cpu.utilization'). -%% none +%% Disk bytes transferred. -define(SYSTEM_DISK_IO, 'system.disk.io'). -%% Time disk spent activated +%% Time disk spent activated. -define(SYSTEM_DISK_IO_TIME, 'system.disk.io_time'). -%% none +%% The total storage capacity of the disk. +-define(SYSTEM_DISK_LIMIT, 'system.disk.limit'). + + +%% The number of disk reads/writes merged into single physical disk access operations. -define(SYSTEM_DISK_MERGED, 'system.disk.merged'). -%% Sum of the time each operation took to complete +%% Sum of the time each operation took to complete. -define(SYSTEM_DISK_OPERATION_TIME, 'system.disk.operation_time'). -%% none +%% Disk operations count. -define(SYSTEM_DISK_OPERATIONS, 'system.disk.operations'). -%% none +%% The total storage capacity of the filesystem. +-define(SYSTEM_FILESYSTEM_LIMIT, 'system.filesystem.limit'). + + +%% Reports a filesystem's space usage across different states. -define(SYSTEM_FILESYSTEM_USAGE, 'system.filesystem.usage'). -%% none +%% Fraction of filesystem bytes used. -define(SYSTEM_FILESYSTEM_UTILIZATION, 'system.filesystem.utilization'). - -%% An estimate of how much memory is available for starting new applications, without causing swapping +%% @deprecated Replaced by `system.memory.linux.available`. +%% The number of packets transferred. -define(SYSTEM_LINUX_MEMORY_AVAILABLE, 'system.linux.memory.available'). - -%% Reports the memory used by the Linux kernel for managing caches of frequently used objects. +%% @deprecated Replaced by `system.memory.linux.slab.usage`. +%% The number of packets transferred. -define(SYSTEM_LINUX_MEMORY_SLAB_USAGE, 'system.linux.memory.slab.usage'). -%% Total memory available in the system. +%% Total virtual memory available in the system. -define(SYSTEM_MEMORY_LIMIT, 'system.memory.limit'). +%% An estimate of how much memory is available for starting new applications, without causing swapping. +-define(SYSTEM_MEMORY_LINUX_AVAILABLE, 'system.memory.linux.available'). + + %% Shared memory used (mostly by tmpfs). +-define(SYSTEM_MEMORY_LINUX_SHARED, 'system.memory.linux.shared'). + + +%% Reports the memory used by the Linux kernel for managing caches of frequently used objects. +-define(SYSTEM_MEMORY_LINUX_SLAB_USAGE, 'system.memory.linux.slab.usage'). + +%% @deprecated Replaced by `system.memory.linux.shared`. +%% Deprecated, use `system.memory.linux.shared` instead. -define(SYSTEM_MEMORY_SHARED, 'system.memory.shared'). @@ -82,49 +102,65 @@ -define(SYSTEM_MEMORY_USAGE, 'system.memory.usage'). -%% none +%% Percentage of memory bytes in use. -define(SYSTEM_MEMORY_UTILIZATION, 'system.memory.utilization'). -%% none --define(SYSTEM_NETWORK_CONNECTIONS, 'system.network.connections'). +%% The number of connections. +-define(SYSTEM_NETWORK_CONNECTION_COUNT, 'system.network.connection.count'). +%% @deprecated Replaced by `system.network.connection.count`. +%% Deprecated, use `system.network.connection.count` instead. +-define(SYSTEM_NETWORK_CONNECTIONS, 'system.network.connections'). -%% Count of packets that are dropped or discarded even though there was no error +%% @deprecated Replaced by `system.network.packet.dropped`. +%% Count of packets that are dropped or discarded even though there was no error. -define(SYSTEM_NETWORK_DROPPED, 'system.network.dropped'). -%% Count of network errors detected +%% Count of network errors detected. -define(SYSTEM_NETWORK_ERRORS, 'system.network.errors'). -%% none +%% The number of bytes transmitted and received. -define(SYSTEM_NETWORK_IO, 'system.network.io'). -%% none +%% The number of packets transferred. +-define(SYSTEM_NETWORK_PACKET_COUNT, 'system.network.packet.count'). + + +%% Count of packets that are dropped or discarded even though there was no error. +-define(SYSTEM_NETWORK_PACKET_DROPPED, 'system.network.packet.dropped'). + +%% @deprecated Replaced by `system.network.packet.count`. +%% The number of packets transferred. -define(SYSTEM_NETWORK_PACKETS, 'system.network.packets'). -%% none +%% The number of page faults. -define(SYSTEM_PAGING_FAULTS, 'system.paging.faults'). -%% none +%% The number of paging operations. -define(SYSTEM_PAGING_OPERATIONS, 'system.paging.operations'). -%% Unix swap or windows pagefile usage +%% Unix swap or windows pagefile usage. -define(SYSTEM_PAGING_USAGE, 'system.paging.usage'). -%% none +%% Swap (unix) or pagefile (windows) utilization. -define(SYSTEM_PAGING_UTILIZATION, 'system.paging.utilization'). -%% Total number of processes in each state +%% Total number of processes in each state. -define(SYSTEM_PROCESS_COUNT, 'system.process.count'). -%% Total number of processes created over uptime of the host +%% Total number of processes created over uptime of the host. -define(SYSTEM_PROCESS_CREATED, 'system.process.created'). + + +%% The time the system has been running. +-define(SYSTEM_UPTIME, 'system.uptime'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/vcs_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/vcs_metrics.hrl new file mode 100644 index 000000000..1473d9f78 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/vcs_metrics.hrl @@ -0,0 +1,54 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged). +-define(VCS_CHANGE_COUNT, 'vcs.change.count'). + + +%% The time duration a change (pull request/merge request/changelist) has been in a given state. +-define(VCS_CHANGE_DURATION, 'vcs.change.duration'). + + +%% The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval. +-define(VCS_CHANGE_TIME_TO_APPROVAL, 'vcs.change.time_to_approval'). + + +%% The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref. +-define(VCS_CHANGE_TIME_TO_MERGE, 'vcs.change.time_to_merge'). + + +%% The number of unique contributors to a repository. +-define(VCS_CONTRIBUTOR_COUNT, 'vcs.contributor.count'). + + +%% The number of refs of type branch or tag in a repository. +-define(VCS_REF_COUNT, 'vcs.ref.count'). + + +%% The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. +-define(VCS_REF_LINES_DELTA, 'vcs.ref.lines_delta'). + + +%% The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute. +-define(VCS_REF_REVISIONS_DELTA, 'vcs.ref.revisions_delta'). + + +%% Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`. +-define(VCS_REF_TIME, 'vcs.ref.time'). + + +%% The number of repositories in an organization. +-define(VCS_REPOSITORY_COUNT, 'vcs.repository.count'). diff --git a/apps/opentelemetry_semantic_conventions/include/metrics/db_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/metrics/db_metrics.hrl new file mode 100644 index 000000000..b55e4376e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/metrics/db_metrics.hrl @@ -0,0 +1,18 @@ + +%%%------------------------------------------------------------------------ +%% Copyright The OpenTelemetry Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%%%------------------------------------------------------------------------- + +%% Duration of database client operations. +-define(DB_CLIENT_OPERATION_DURATION, 'db.client.operation.duration'). diff --git a/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl b/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl index d8db81258..dd8d4cf87 100644 --- a/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl +++ b/apps/opentelemetry_semantic_conventions/include/schema_urls.hrl @@ -1 +1,14 @@ -define('V1_27_0', <<"https://opentelemetry.io/schemas/1.27.0">>). +-define('V1_28_0', <<"https://opentelemetry.io/schemas/1.28.0">>). +-define('V1_29_0', <<"https://opentelemetry.io/schemas/1.29.0">>). +-define('V1_30_0', <<"https://opentelemetry.io/schemas/1.30.0">>). +-define('V1_31_0', <<"https://opentelemetry.io/schemas/1.31.0">>). +-define('V1_32_0', <<"https://opentelemetry.io/schemas/1.32.0">>). +-define('V1_33_0', <<"https://opentelemetry.io/schemas/1.33.0">>). +-define('V1_34_0', <<"https://opentelemetry.io/schemas/1.34.0">>). +-define('V1_35_0', <<"https://opentelemetry.io/schemas/1.35.0">>). +-define('V1_36_0', <<"https://opentelemetry.io/schemas/1.36.0">>). +-define('V1_37_0', <<"https://opentelemetry.io/schemas/1.37.0">>). +-define('V1_38_0', <<"https://opentelemetry.io/schemas/1.38.0">>). +-define('V1_39_0', <<"https://opentelemetry.io/schemas/1.39.0">>). +-define('V1_40_0', <<"https://opentelemetry.io/schemas/1.40.0">>). diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/code_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/code_attributes.ex new file mode 100644 index 000000000..ab94da288 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/code_attributes.ex @@ -0,0 +1,190 @@ +defmodule OpenTelemetry.SemConv.CodeAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Code attributes. + """ + + @doc """ + The column number in `code.file.path` best representing the operation. It **SHOULD** point within the code unit named in `code.function.name`. This attribute **MUST** **NOT** be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 16 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.CodeAttributes.code_column_number() + :"code.column.number" + + ### Erlang + + ```erlang + ?CODE_COLUMN_NUMBER. + 'code.column.number' + ``` + + + """ + @spec code_column_number :: :"code.column.number" + def code_column_number do + :"code.column.number" + end + + @doc """ + The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute **MUST** **NOT** be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + /usr/local/MyApplication/content_root/app/index.php + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.CodeAttributes.code_file_path() + :"code.file.path" + + ### Erlang + + ```erlang + ?CODE_FILE_PATH. + 'code.file.path' + ``` + + + """ + @spec code_file_path :: :"code.file.path" + def code_file_path do + :"code.file.path" + end + + @doc """ + 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.stacktrace` attribute value. This attribute **MUST** **NOT** be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### 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.stacktrace` without information on arguments. + + Examples: + + * Java method: `com.example.MyHttpService.serveRequest` + * Java anonymous class method: `com.mycompany.Main$1.myMethod` + * Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` + * PHP function: `GuzzleHttp\Client::transfer` + * Go function: `github.com/my/repo/pkg.foo.func5` + * Elixir: `OpenTelemetry.Ctx.new` + * Erlang: `opentelemetry_ctx:new` + * Rust: `playground::my_module::my_cool_func` + * C function: `fopen` + + ### Examples + + ``` + ["com.example.MyHttpService.serveRequest", "GuzzleHttp\\Client::transfer", "fopen"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.CodeAttributes.code_function_name() + :"code.function.name" + + ### Erlang + + ```erlang + ?CODE_FUNCTION_NAME. + 'code.function.name' + ``` + + + """ + @spec code_function_name :: :"code.function.name" + def code_function_name do + :"code.function.name" + end + + @doc """ + The line number in `code.file.path` best representing the operation. It **SHOULD** point within the code unit named in `code.function.name`. This attribute **MUST** **NOT** be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + 42 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.CodeAttributes.code_line_number() + :"code.line.number" + + ### Erlang + + ```erlang + ?CODE_LINE_NUMBER. + 'code.line.number' + ``` + + + """ + @spec code_line_number :: :"code.line.number" + def code_line_number do + :"code.line.number" + end + + @doc """ + A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute **MUST** **NOT** be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5) + + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.CodeAttributes.code_stacktrace() + :"code.stacktrace" + + ### Erlang + + ```erlang + ?CODE_STACKTRACE. + 'code.stacktrace' + ``` + + + """ + @spec code_stacktrace :: :"code.stacktrace" + def code_stacktrace do + :"code.stacktrace" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/db_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/db_attributes.ex new file mode 100644 index 000000000..7a5ee15c4 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/db_attributes.ex @@ -0,0 +1,518 @@ +defmodule OpenTelemetry.SemConv.DBAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DB attributes. + """ + + @doc """ + The name of a collection (table, container) within the database. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It is RECOMMENDED to capture the value as provided by the application + without attempting to do any case normalization. + + The collection name **SHOULD** **NOT** be extracted from `db.query.text`, + when the database system supports query text with multiple collections + in non-batch operations. + + For batch operations, if the individual operations are known to have the same + collection name then that collection name **SHOULD** be used. + + ### Examples + + ``` + ["public.users", "customers"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_collection_name() + :"db.collection.name" + + ### Erlang + + ```erlang + ?DB_COLLECTION_NAME. + 'db.collection.name' + ``` + + + """ + @spec db_collection_name :: :"db.collection.name" + def db_collection_name do + :"db.collection.name" + end + + @doc """ + The name of the database, fully qualified within the server address and port. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + If a database system has multiple namespace components, they **SHOULD** be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) **SHOULD** be omitted. + Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system. + It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + + ### Examples + + ``` + ["customers", "test.users"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_namespace() + :"db.namespace" + + ### Erlang + + ```erlang + ?DB_NAMESPACE. + 'db.namespace' + ``` + + + """ + @spec db_namespace :: :"db.namespace" + def db_namespace do + :"db.namespace" + end + + @doc """ + The number of queries included in a batch operation. + ### Value type + + Value must be of type `integer()`. + ### Notes + + Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` **SHOULD** never be `1`. + + ### Examples + + ``` + [2, 3, 4] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_operation_batch_size() + :"db.operation.batch.size" + + ### Erlang + + ```erlang + ?DB_OPERATION_BATCH_SIZE. + 'db.operation.batch.size' + ``` + + + """ + @spec db_operation_batch_size :: :"db.operation.batch.size" + def db_operation_batch_size do + :"db.operation.batch.size" + end + + @doc """ + The name of the operation or command being executed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It is RECOMMENDED to capture the value as provided by the application + without attempting to do any case normalization. + + The operation name **SHOULD** **NOT** be extracted from `db.query.text`, + when the database system supports query text with multiple operations + in non-batch operations. + + If spaces can occur in the operation name, multiple consecutive spaces + **SHOULD** be normalized to a single space. + + For batch operations, if the individual operations are known to have the same operation name + then that operation name **SHOULD** be used prepended by `BATCH `, + otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database + system specific term if more applicable. + + ### Examples + + ``` + ["findAndModify", "HMSET", "SELECT"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_operation_name() + :"db.operation.name" + + ### Erlang + + ```erlang + ?DB_OPERATION_NAME. + 'db.operation.name' + ``` + + + """ + @spec db_operation_name :: :"db.operation.name" + def db_operation_name do + :"db.operation.name" + end + + @doc """ + Low cardinality summary of a database query. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The query summary describes a class of database queries and is useful + as a grouping key, especially when analyzing telemetry for database + calls involving complex queries. + + Summary may be available to the instrumentation through + instrumentation hooks or other means. If it is not available, instrumentations + that support query parsing **SHOULD** generate a summary following + [Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query) + section. + + For batch operations, if the individual operations are known to have the same query summary + then that query summary **SHOULD** be used prepended by `BATCH `, + otherwise `db.query.summary` **SHOULD** be `BATCH` or some other database + system specific term if more applicable. + + ### Examples + + ``` + ["SELECT wuser_table", "INSERT shipping_details SELECT orders", "get user by id"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_query_summary() + :"db.query.summary" + + ### Erlang + + ```erlang + ?DB_QUERY_SUMMARY. + 'db.query.summary' + ``` + + + """ + @spec db_query_summary :: :"db.query.summary" + def db_query_summary do + :"db.query.summary" + end + + @doc """ + The database query being executed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext). + 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 `; ` or some other database system specific separator if more applicable. + Parameterized query text **SHOULD** **NOT** be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. + + ### Examples + + ``` + ["SELECT * FROM wuser_table where username = ?", "SET mykey ?"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_query_text() + :"db.query.text" + + ### Erlang + + ```erlang + ?DB_QUERY_TEXT. + 'db.query.text' + ``` + + + """ + @spec db_query_text :: :"db.query.text" + def db_query_text do + :"db.query.text" + end + + @doc """ + Database response status code. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. + Semantic conventions for individual database systems **SHOULD** document what `db.response.status_code` means in the context of that system. + + ### Examples + + ``` + ["102", "ORA-17002", "08P01", "404"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_response_status_code() + :"db.response.status_code" + + ### Erlang + + ```erlang + ?DB_RESPONSE_STATUS_CODE. + 'db.response.status_code' + ``` + + + """ + @spec db_response_status_code :: :"db.response.status_code" + def db_response_status_code do + :"db.response.status_code" + end + + @doc """ + The name of a stored procedure within the database. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + It is RECOMMENDED to capture the value as provided by the application + without attempting to do any case normalization. + + For batch operations, if the individual operations are known to have the same + stored procedure name then that stored procedure name **SHOULD** be used. + + ### Examples + + ``` + ["GetCustomer"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_stored_procedure_name() + :"db.stored_procedure.name" + + ### Erlang + + ```erlang + ?DB_STORED_PROCEDURE_NAME. + 'db.stored_procedure.name' + ``` + + + """ + @spec db_stored_procedure_name :: :"db.stored_procedure.name" + def db_stored_procedure_name do + :"db.stored_procedure.name" + end + + @typedoc """ + The database management system (DBMS) product as identified by the client instrumentation. + + ### Enum Values + * `:other_sql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Some other SQL database. Fallback only. + * `:"softwareag.adabas"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Adabas (Adaptable Database System)](https://documentation.softwareag.com/?pf=adabas) + * `:"actian.ingres"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Actian Ingres](https://www.actian.com/databases/ingres/) + * `:"aws.dynamodb"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Amazon DynamoDB](https://aws.amazon.com/pm/dynamodb/) + * `:"aws.redshift"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Amazon Redshift](https://aws.amazon.com/redshift/) + * `:"azure.cosmosdb"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db) + * `:"intersystems.cache"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [InterSystems Caché](https://www.intersystems.com/products/cache/) + * `:cassandra` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache Cassandra](https://cassandra.apache.org/) + * `:clickhouse` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [ClickHouse](https://clickhouse.com/) + * `:cockroachdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [CockroachDB](https://www.cockroachlabs.com/) + * `:couchbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Couchbase](https://www.couchbase.com/) + * `:couchdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache CouchDB](https://couchdb.apache.org/) + * `:derby` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache Derby](https://db.apache.org/derby/) + * `:elasticsearch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Elasticsearch](https://www.elastic.co/elasticsearch) + * `:firebirdsql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Firebird](https://www.firebirdsql.org/) + * `:"gcp.spanner"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Google Cloud Spanner](https://cloud.google.com/spanner) + * `:geode` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache Geode](https://geode.apache.org/) + * `:h2database` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [H2 Database](https://h2database.com/) + * `:hbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache HBase](https://hbase.apache.org/) + * `:hive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache Hive](https://hive.apache.org/) + * `:hsqldb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [HyperSQL Database](https://hsqldb.org/) + * `:"ibm.db2"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [IBM Db2](https://www.ibm.com/db2) + * `:"ibm.informix"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [IBM Informix](https://www.ibm.com/products/informix) + * `:"ibm.netezza"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [IBM Netezza](https://www.ibm.com/products/netezza) + * `:influxdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [InfluxDB](https://www.influxdata.com/) + * `:instantdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Instant](https://www.instantdb.com/) + * `:mariadb` - [MariaDB](https://mariadb.org/) + * `:memcached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Memcached](https://memcached.org/) + * `:mongodb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [MongoDB](https://www.mongodb.com/) + * `:"microsoft.sql_server"` - [Microsoft SQL Server](https://www.microsoft.com/sql-server) + * `:mysql` - [MySQL](https://www.mysql.com/) + * `:neo4j` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Neo4j](https://neo4j.com/) + * `:opensearch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [OpenSearch](https://opensearch.org/) + * `:"oracle.db"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Oracle Database](https://www.oracle.com/database/) + * `:postgresql` - [PostgreSQL](https://www.postgresql.org/) + * `:redis` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Redis](https://redis.io/) + * `:"sap.hana"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [SAP HANA](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html) + * `:"sap.maxdb"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [SAP MaxDB](https://maxdb.sap.com/) + * `:sqlite` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [SQLite](https://www.sqlite.org/) + * `:teradata` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Teradata](https://www.teradata.com/) + * `:trino` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Trino](https://trino.io/) + """ + @type db_system_name_values() :: %{ + :other_sql => :other_sql, + :"softwareag.adabas" => :"softwareag.adabas", + :"actian.ingres" => :"actian.ingres", + :"aws.dynamodb" => :"aws.dynamodb", + :"aws.redshift" => :"aws.redshift", + :"azure.cosmosdb" => :"azure.cosmosdb", + :"intersystems.cache" => :"intersystems.cache", + :cassandra => :cassandra, + :clickhouse => :clickhouse, + :cockroachdb => :cockroachdb, + :couchbase => :couchbase, + :couchdb => :couchdb, + :derby => :derby, + :elasticsearch => :elasticsearch, + :firebirdsql => :firebirdsql, + :"gcp.spanner" => :"gcp.spanner", + :geode => :geode, + :h2database => :h2database, + :hbase => :hbase, + :hive => :hive, + :hsqldb => :hsqldb, + :"ibm.db2" => :"ibm.db2", + :"ibm.informix" => :"ibm.informix", + :"ibm.netezza" => :"ibm.netezza", + :influxdb => :influxdb, + :instantdb => :instantdb, + :mariadb => :mariadb, + :memcached => :memcached, + :mongodb => :mongodb, + :"microsoft.sql_server" => :"microsoft.sql_server", + :mysql => :mysql, + :neo4j => :neo4j, + :opensearch => :opensearch, + :"oracle.db" => :"oracle.db", + :postgresql => :postgresql, + :redis => :redis, + :"sap.hana" => :"sap.hana", + :"sap.maxdb" => :"sap.maxdb", + :sqlite => :sqlite, + :teradata => :teradata, + :trino => :trino + } + @doc """ + The database management system (DBMS) product as identified by the client instrumentation. + + ### Notes + + The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.DBAttributes.db_system_name() + :"db.system.name" + + iex> OpenTelemetry.SemConv.DBAttributes.db_system_name_values().other_sql + :other_sql + + iex> %{OpenTelemetry.SemConv.DBAttributes.db_system_name() => OpenTelemetry.SemConv.DBAttributes.db_system_name_values().other_sql} + %{:"db.system.name" => :other_sql} + + ### Erlang + + ```erlang + ?DB_SYSTEM_NAME. + 'db.system.name' + + ?DB_SYSTEM_NAME_VALUES_OTHER_SQL. + 'other_sql' + + \#{?DB_SYSTEM_NAME => ?DB_SYSTEM_NAME_VALUES_OTHER_SQL}. + \#{'db.system.name' => 'other_sql'} + ``` + + + """ + @spec db_system_name :: :"db.system.name" + def db_system_name do + :"db.system.name" + end + + @spec db_system_name_values() :: db_system_name_values() + def db_system_name_values() do + %{ + :other_sql => :other_sql, + :"softwareag.adabas" => :"softwareag.adabas", + :"actian.ingres" => :"actian.ingres", + :"aws.dynamodb" => :"aws.dynamodb", + :"aws.redshift" => :"aws.redshift", + :"azure.cosmosdb" => :"azure.cosmosdb", + :"intersystems.cache" => :"intersystems.cache", + :cassandra => :cassandra, + :clickhouse => :clickhouse, + :cockroachdb => :cockroachdb, + :couchbase => :couchbase, + :couchdb => :couchdb, + :derby => :derby, + :elasticsearch => :elasticsearch, + :firebirdsql => :firebirdsql, + :"gcp.spanner" => :"gcp.spanner", + :geode => :geode, + :h2database => :h2database, + :hbase => :hbase, + :hive => :hive, + :hsqldb => :hsqldb, + :"ibm.db2" => :"ibm.db2", + :"ibm.informix" => :"ibm.informix", + :"ibm.netezza" => :"ibm.netezza", + :influxdb => :influxdb, + :instantdb => :instantdb, + :mariadb => :mariadb, + :memcached => :memcached, + :mongodb => :mongodb, + :"microsoft.sql_server" => :"microsoft.sql_server", + :mysql => :mysql, + :neo4j => :neo4j, + :opensearch => :opensearch, + :"oracle.db" => :"oracle.db", + :postgresql => :postgresql, + :redis => :redis, + :"sap.hana" => :"sap.hana", + :"sap.maxdb" => :"sap.maxdb", + :sqlite => :sqlite, + :teradata => :teradata, + :trino => :trino + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex index be7cbd238..5e9d55fae 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex @@ -35,11 +35,11 @@ defmodule OpenTelemetry.SemConv.ErrorAttributes do If the operation has completed successfully, instrumentations **SHOULD** **NOT** set `error.type`. - If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), + If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes), it's RECOMMENDED to: - * Use a domain-specific attribute - * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. + - Use a domain-specific attribute + - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex index 7bb014020..7cf290117 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex @@ -4,46 +4,9 @@ defmodule OpenTelemetry.SemConv.ExceptionAttributes do OpenTelemetry Semantic Conventions for Exception attributes. """ - @doc """ - 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. - - ### Value type - - Value must be of type `boolean()`. - ### 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 for recording span exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). - - 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. - - - - ### Elixir + @deprecated """ + It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. - iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_escaped() - :"exception.escaped" - - ### Erlang - - ```erlang - ?EXCEPTION_ESCAPED. - 'exception.escaped' - ``` - - """ @spec exception_escaped :: :"exception.escaped" def exception_escaped do @@ -55,6 +18,12 @@ defmodule OpenTelemetry.SemConv.ExceptionAttributes do ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + > [!WARNING] + > + > This attribute may contain sensitive information. + ### Examples ``` @@ -92,6 +61,7 @@ defmodule OpenTelemetry.SemConv.ExceptionAttributes do ``` Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5) + ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex index 2264b2a9e..67db85af4 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/http_attributes.ex @@ -12,14 +12,27 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do Value must be of type `[atom() | String.t()]`. ### Notes - Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. - The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. - The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. + Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. + Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + + The `User-Agent` header is already captured in the `user_agent.original` attribute. + Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. + + The attribute value **MUST** consist of either multiple header values as an array of strings + or a single-item array containing a possibly comma-concatenated string, depending on the way + the HTTP library provides access to headers. + + Examples: + + - A header `Content-Type: application/json` **SHOULD** be recorded as the `http.request.header.content-type` + attribute with value `["application/json"]`. + - A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` **SHOULD** be recorded as the `http.request.header.x-forwarded-for` + attribute with value `["1.2.3.4", "1.2.3.5"]` or `["1.2.3.4, 1.2.3.5"]` depending on the HTTP library. ### Examples ``` - ["http.request.header.content-type=[\"application/json\"]", "http.request.header.x-forwarded-for=[\"1.2.3.4\", \"1.2.3.5\"]"] + [["application/json"], ["1.2.3.4", "1.2.3.5"]] ``` @@ -56,6 +69,7 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do * `:post` - POST method. * `:put` - PUT method. * `:trace` - TRACE method. + * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - QUERY method. * `:other` - Any HTTP method that the instrumentation has no prior knowledge of. """ @type http_request_method_values() :: %{ @@ -68,6 +82,7 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do :post => :POST, :put => :PUT, :trace => :TRACE, + :query => :QUERY, :other => :_OTHER } @doc """ @@ -76,15 +91,23 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do ### Notes HTTP request method value **SHOULD** be "known" to the instrumentation. - By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) - and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods), + the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html) + and the QUERY method defined in [httpbis-safe-method-w-body](https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1). If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`. If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named - OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods - (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults). + OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods. + + ![Development](https://img.shields.io/badge/-development-blue) + If this override is done via declarative configuration, then the list **MUST** be configurable via the `known_methods` property + (an array of case-sensitive strings with minimum items 0) under `.instrumentation/development.general.http.client` and/or + `.instrumentation/development.general.http.server`. + + In either case, this list **MUST** be a full override of the default known methods, + it is not a list of known methods in addition to the defaults. HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly. Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent. @@ -141,6 +164,7 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do :post => :POST, :put => :PUT, :trace => :TRACE, + :query => :QUERY, :other => :_OTHER } end @@ -222,14 +246,26 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do Value must be of type `[atom() | String.t()]`. ### Notes - Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. + Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. + Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. - The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. + + The attribute value **MUST** consist of either multiple header values as an array of strings + or a single-item array containing a possibly comma-concatenated string, depending on the way + the HTTP library provides access to headers. + + Examples: + + - A header `Content-Type: application/json` header **SHOULD** be recorded as the `http.request.response.content-type` + attribute with value `["application/json"]`. + - A header `My-custom-header: abc, def` header **SHOULD** be recorded as the `http.response.header.my-custom-header` + attribute with value `["abc", "def"]` or `["abc, def"]` depending on the HTTP library. ### Examples ``` - ["http.response.header.content-type=[\"application/json\"]", "http.response.header.my-custom-header=[\"abc\", \"def\"]"] + [["application/json"], ["abc", "def"]] ``` @@ -286,7 +322,7 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do end @doc """ - The matched route, that is, the path template in the format used by the respective server framework. + The matched route template for the request. This **MUST** be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders. ### Value type @@ -296,10 +332,18 @@ defmodule OpenTelemetry.SemConv.HTTPAttributes do MUST **NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can **NOT** substitute it. **SHOULD** include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. + A static path segment is a part of the route template with a fixed, low-cardinality value. This includes literal strings like `/users/` and placeholders that + are constrained to a finite, predefined set of values, e.g. `{controller}` or `{action}`. + + A dynamic path segment is a placeholder for a value that can have high cardinality and is not constrained to a predefined list like static path segments. + + Instrumentations **SHOULD** use routing information provided by the corresponding web framework. They **SHOULD** pick the most precise source of routing information and MAY + support custom route formatting. Instrumentations **SHOULD** document the format and the API used to obtain the route string. + ### Examples ``` - ["/users/:userID?", "{controller}/{action}/{id?}"] + ["/users/:userID?", "my-controller/my-action/{id?}"] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex index 75aa42f45..d7d775b68 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex @@ -133,7 +133,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do end @doc """ - [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. + [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent. ### Value type Value must be of type `atom() | String.t()`. @@ -204,7 +204,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do end @typedoc """ - [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). + [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). ### Enum Values @@ -212,7 +212,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do * `:udp` - UDP * `:pipe` - Named or anonymous pipe. * `:unix` - Unix domain socket - * `:quic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - QUIC + * `:quic` - QUIC """ @type network_transport_values() :: %{ :tcp => :tcp, @@ -222,7 +222,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do :quic => :quic } @doc """ - [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). + [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). ### Notes @@ -284,7 +284,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do end @typedoc """ - [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. ### Enum Values * `:ipv4` - IPv4 @@ -295,7 +295,7 @@ defmodule OpenTelemetry.SemConv.NetworkAttributes do :ipv6 => :ipv6 } @doc """ - [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent. ### Notes diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex index 6605df53f..33e31d1fe 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/service_attributes.ex @@ -4,6 +4,68 @@ defmodule OpenTelemetry.SemConv.ServiceAttributes do OpenTelemetry Semantic Conventions for Service attributes. """ + @doc """ + The string ID of the service instance. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### 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). + + Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC + 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of + this value if stability is desirable. In that case, the ID **SHOULD** be used as source of a UUID Version 5 and + **SHOULD** use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. + + UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is + needed. Similar to what can be seen in the man page for the + [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying + data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it + or not via another resource attribute. + + For applications running behind an application server (like unicorn), we do not recommend using one identifier + for all processes participating in the application. Instead, it's recommended each division (e.g. a worker + thread in unicorn) to have its own instance.id. + + It's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the + service instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will + likely be wrong, as the Collector might not know from which container within that pod the telemetry originated. + However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance + for that telemetry. This is typically the case for scraping receivers, as they know the target address and + port. + + ### Examples + + ``` + ["627cc493-f310-47de-96bd-71410b7dec09"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServiceAttributes.service_instance_id() + :"service.instance.id" + + ### Erlang + + ```erlang + ?SERVICE_INSTANCE_ID. + 'service.instance.id' + ``` + + + """ + @spec service_instance_id :: :"service.instance.id" + def service_instance_id do + :"service.instance.id" + end + @doc """ Logical name of the service. @@ -42,7 +104,44 @@ defmodule OpenTelemetry.SemConv.ServiceAttributes do end @doc """ - The version string of the service API or implementation. The format is not defined by these conventions. + A namespace for `service.name`. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### 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. + + ### Examples + + ``` + ["Shop"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.ServiceAttributes.service_namespace() + :"service.namespace" + + ### Erlang + + ```erlang + ?SERVICE_NAMESPACE. + 'service.namespace' + ``` + + + """ + @spec service_namespace :: :"service.namespace" + def service_namespace do + :"service.namespace" + end + + @doc """ + The version string of the service component. The format is not defined by these conventions. ### Value type diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex index 32c76e328..a2c29af8b 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/telemetry_attributes.ex @@ -9,18 +9,18 @@ defmodule OpenTelemetry.SemConv.TelemetryAttributes do ### Enum Values - * `:cpp` - * `:dotnet` - * `:erlang` - * `:go` - * `:java` - * `:nodejs` - * `:php` - * `:python` - * `:ruby` - * `:rust` - * `:swift` - * `:webjs` + * `:cpp` - + * `:dotnet` - + * `:erlang` - + * `:go` - + * `:java` - + * `:nodejs` - + * `:php` - + * `:python` - + * `:ruby` - + * `:rust` - + * `:swift` - + * `:webjs` - """ @type telemetry_sdk_language_values() :: %{ :cpp => :cpp, diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex index a5fa0b6cd..d98b36246 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex @@ -44,9 +44,39 @@ defmodule OpenTelemetry.SemConv.URLAttributes do Value must be of type `atom() | String.t()`. ### Notes - For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless. - `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. - `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it. + For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment + is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless. + + `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. + In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. + + `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). + + Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it. + + ![Development](https://img.shields.io/badge/-development-blue) + Query string values for the following keys **SHOULD** be redacted by default and replaced by the + value `REDACTED`: + + * [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) + * [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) + * [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) + * [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) + + This list is subject to change over time. + + Matching of query parameter keys against the sensitive list **SHOULD** be case-sensitive. + + ![Development](https://img.shields.io/badge/-development-blue) + Instrumentation **MAY** provide a way to override this list via declarative configuration. + If so, it **SHOULD** use the `sensitive_query_parameters` property + (an array of case-sensitive strings with minimum items 0) under + `.instrumentation/development.general.sanitization.url`. + This list is a full override of the default sensitive query parameter keys, + it is not a list of keys in addition to the defaults. + + When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g. + `https://www.example.com/path?color=blue&sig=REDACTED`. ### Examples @@ -122,6 +152,28 @@ defmodule OpenTelemetry.SemConv.URLAttributes do Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it. + ![Development](https://img.shields.io/badge/-development-blue) + Query string values for the following keys **SHOULD** be redacted by default and replaced by the value `REDACTED`: + + * [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) + * [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth) + * [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token) + * [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls) + + This list is subject to change over time. + + Matching of query parameter keys against the sensitive list **SHOULD** be case-sensitive. + + Instrumentation **MAY** provide a way to override this list via declarative configuration. + If so, it **SHOULD** use the `sensitive_query_parameters` property + (an array of case-sensitive strings with minimum items 0) under + `.instrumentation/development.general.sanitization.url`. + This list is a full override of the default sensitive query parameter keys, + it is not a list of keys in addition to the defaults. + + When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g. + `q=OpenTelemetry&sig=REDACTED`. + ### Examples ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex index e7b7ce2c8..697b58bc8 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex @@ -4,8 +4,81 @@ defmodule OpenTelemetry.SemConv.Incubating.AndroidAttributes do OpenTelemetry Semantic Conventions for Android attributes. """ + @typedoc """ + This attribute represents the state of the application. + + + ### Enum Values + * `:created` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time. + + * `:background` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 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. + + * `:foreground` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 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. + + """ + @type android_app_state_values() :: %{ + :created => :created, + :background => :background, + :foreground => :foreground + } + @doc """ + This attribute represents the state of the application. + + + ### Notes + + The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. + + ### Examples + + ``` + ["created"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_app_state() + :"android.app.state" + + iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_app_state_values().created + :created + + iex> %{OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_app_state() => OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_app_state_values().created} + %{:"android.app.state" => :created} + + ### Erlang + + ```erlang + ?ANDROID_APP_STATE. + 'android.app.state' + + ?ANDROID_APP_STATE_VALUES_CREATED. + 'created' + + \#{?ANDROID_APP_STATE => ?ANDROID_APP_STATE_VALUES_CREATED}. + \#{'android.app.state' => 'created'} + ``` + + + """ + @spec android_app_state :: :"android.app.state" + def android_app_state do + :"android.app.state" + end + + @spec android_app_state_values() :: android_app_state_values() + def android_app_state_values() do + %{ + :created => :created, + :background => :background, + :foreground => :foreground + } + end + @doc """ - Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). + Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found in the [Android API levels documentation](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). ### Value type @@ -38,8 +111,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AndroidAttributes do end @typedoc """ - Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. - + Deprecated. Use `android.app.state` attribute instead. ### Enum Values * `:created` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time. @@ -54,42 +126,8 @@ defmodule OpenTelemetry.SemConv.Incubating.AndroidAttributes do :background => :background, :foreground => :foreground } - @doc """ - Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. - - - ### Notes - - The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state() - :"android.state" - - iex> OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state_values().created - :created - - iex> %{OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state() => OpenTelemetry.SemConv.Incubating.AndroidAttributes.android_state_values().created} - %{:"android.state" => :created} - - ### Erlang - - ```erlang - ?ANDROID_STATE. - 'android.state' - - ?ANDROID_STATE_VALUES_CREATED. - 'created' - - \#{?ANDROID_STATE => ?ANDROID_STATE_VALUES_CREATED}. - \#{'android.state' => 'created'} - ``` - - + @deprecated """ + Replaced by `android.app.state`. """ @spec android_state :: :"android.state" def android_state do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/app_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/app_attributes.ex new file mode 100644 index 000000000..fa370b3e9 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/app_attributes.ex @@ -0,0 +1,402 @@ +defmodule OpenTelemetry.SemConv.Incubating.AppAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for App attributes. + """ + + @doc """ + Unique identifier for a particular build or compilation of the application. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["6cff0a7e-cefc-4668-96f5-1273d8b334d0", "9f2b833506aa6973a92fde9733e6271f", "my-app-1.0.0-code-123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_build_id() + :"app.build_id" + + ### Erlang + + ```erlang + ?APP_BUILD_ID. + 'app.build_id' + ``` + + + """ + @spec app_build_id :: :"app.build_id" + def app_build_id do + :"app.build_id" + end + + @doc """ + A unique identifier representing the installation of an application on a specific device + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Its value **SHOULD** persist across launches of the same application installation, including through application upgrades. + It **SHOULD** change if the application is uninstalled or if all applications of the vendor are uninstalled. + Additionally, users might be able to reset this value (e.g. by clearing application data). + If an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` **SHOULD** have a different value. + If multiple OpenTelemetry SDKs are used within the same application, they **SHOULD** use the same value for `app.installation.id`. + Hardware IDs (e.g. serial number, IMEI, MAC address) **MUST** **NOT** be used as the `app.installation.id`. + + For iOS, this value **SHOULD** be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor). + + For Android, examples of `app.installation.id` implementations include: + + - [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations). + - A globally unique UUID which is persisted across sessions in your application. + - [App set ID](https://developer.android.com/identity/app-set-id). + - [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID). + + More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids). + + ### Examples + + ``` + ["2ab2916d-a51f-4ac8-80ee-45ac31a28092"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_installation_id() + :"app.installation.id" + + ### Erlang + + ```erlang + ?APP_INSTALLATION_ID. + 'app.installation.id' + ``` + + + """ + @spec app_installation_id :: :"app.installation.id" + def app_installation_id do + :"app.installation.id" + end + + @doc """ + A number of frame renders that experienced jank. + ### Value type + + Value must be of type `integer()`. + ### Notes + + Depending on platform limitations, the value provided **MAY** be approximation. + + ### Examples + + ``` + [9, 42] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_jank_frame_count() + :"app.jank.frame_count" + + ### Erlang + + ```erlang + ?APP_JANK_FRAME_COUNT. + 'app.jank.frame_count' + ``` + + + """ + @spec app_jank_frame_count :: :"app.jank.frame_count" + def app_jank_frame_count do + :"app.jank.frame_count" + end + + @doc """ + The time period, in seconds, for which this jank is being reported. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0, 5.0, 10.24] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_jank_period() + :"app.jank.period" + + ### Erlang + + ```erlang + ?APP_JANK_PERIOD. + 'app.jank.period' + ``` + + + """ + @spec app_jank_period :: :"app.jank.period" + def app_jank_period do + :"app.jank.period" + end + + @doc """ + The minimum rendering threshold for this jank, in seconds. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.016, 0.7, 1.024] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_jank_threshold() + :"app.jank.threshold" + + ### Erlang + + ```erlang + ?APP_JANK_THRESHOLD. + 'app.jank.threshold' + ``` + + + """ + @spec app_jank_threshold :: :"app.jank.threshold" + def app_jank_threshold do + :"app.jank.threshold" + end + + @doc """ + The x (horizontal) coordinate of a screen coordinate, in screen pixels. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [0, 131] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_screen_coordinate_x() + :"app.screen.coordinate.x" + + ### Erlang + + ```erlang + ?APP_SCREEN_COORDINATE_X. + 'app.screen.coordinate.x' + ``` + + + """ + @spec app_screen_coordinate_x :: :"app.screen.coordinate.x" + def app_screen_coordinate_x do + :"app.screen.coordinate.x" + end + + @doc """ + The y (vertical) component of a screen coordinate, in screen pixels. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [12, 99] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_screen_coordinate_y() + :"app.screen.coordinate.y" + + ### Erlang + + ```erlang + ?APP_SCREEN_COORDINATE_Y. + 'app.screen.coordinate.y' + ``` + + + """ + @spec app_screen_coordinate_y :: :"app.screen.coordinate.y" + def app_screen_coordinate_y do + :"app.screen.coordinate.y" + end + + @doc """ + An identifier that uniquely differentiates this screen from other screens in the same application. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A screen represents only the part of the device display drawn by the app. It typically contains multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets). + + ### Examples + + ``` + ["f9bc787d-ff05-48ad-90e1-fca1d46130b3", "com.example.app.MainActivity", "com.example.shop.ProductDetailFragment", "MyApp.ProfileView", "MyApp.ProfileViewController"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_screen_id() + :"app.screen.id" + + ### Erlang + + ```erlang + ?APP_SCREEN_ID. + 'app.screen.id' + ``` + + + """ + @spec app_screen_id :: :"app.screen.id" + def app_screen_id do + :"app.screen.id" + end + + @doc """ + The name of an application screen. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A screen represents only the part of the device display drawn by the app. It typically contains multiple widgets or UI components and is larger in scope than individual widgets. Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets). + + ### Examples + + ``` + ["MainActivity", "ProductDetailFragment", "ProfileView", "ProfileViewController"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_screen_name() + :"app.screen.name" + + ### Erlang + + ```erlang + ?APP_SCREEN_NAME. + 'app.screen.name' + ``` + + + """ + @spec app_screen_name :: :"app.screen.name" + def app_screen_name do + :"app.screen.name" + end + + @doc """ + An identifier that uniquely differentiates this widget from other widgets in the same application. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A widget is an application component, typically an on-screen visual GUI element. + + ### Examples + + ``` + ["f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_widget_id() + :"app.widget.id" + + ### Erlang + + ```erlang + ?APP_WIDGET_ID. + 'app.widget.id' + ``` + + + """ + @spec app_widget_id :: :"app.widget.id" + def app_widget_id do + :"app.widget.id" + end + + @doc """ + The name of an application widget. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + A widget is an application component, typically an on-screen visual GUI element. + + ### Examples + + ``` + ["submit", "attack", "Clear Cart"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AppAttributes.app_widget_name() + :"app.widget.name" + + ### Erlang + + ```erlang + ?APP_WIDGET_NAME. + 'app.widget.name' + ``` + + + """ + @spec app_widget_name :: :"app.widget.name" + def app_widget_name do + :"app.widget.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex index dcabd888d..2a90a8d24 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/artifact_attributes.ex @@ -38,7 +38,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ArtifactAttributes do end @doc """ - The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). + The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the [software attestation space](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**. ### Value type diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex index 4adf3a024..bd74dd5f8 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex @@ -4,6 +4,72 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do OpenTelemetry Semantic Conventions for AWS attributes. """ + @doc """ + The unique identifier of the AWS Bedrock Guardrail. A [guardrail](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) helps safeguard and prevent unwanted behavior from model responses or user messages. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["sgi5gkybzqak"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_bedrock_guardrail_id() + :"aws.bedrock.guardrail.id" + + ### Erlang + + ```erlang + ?AWS_BEDROCK_GUARDRAIL_ID. + 'aws.bedrock.guardrail.id' + ``` + + + """ + @spec aws_bedrock_guardrail_id :: :"aws.bedrock.guardrail.id" + def aws_bedrock_guardrail_id do + :"aws.bedrock.guardrail.id" + end + + @doc """ + The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["XFWUPB9PAW"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_bedrock_knowledge_base_id() + :"aws.bedrock.knowledge_base.id" + + ### Erlang + + ```erlang + ?AWS_BEDROCK_KNOWLEDGE_BASE_ID. + 'aws.bedrock.knowledge_base.id' + ``` + + + """ + @spec aws_bedrock_knowledge_base_id :: :"aws.bedrock.knowledge_base.id" + def aws_bedrock_knowledge_base_id do + :"aws.bedrock.knowledge_base.id" + end + @doc """ The JSON-serialized value of each item in the `AttributeDefinitions` request field. ### Value type @@ -12,7 +78,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }"] + [["{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }"]] ``` @@ -44,7 +110,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["lives", "id"] + [["lives", "id"]] ``` @@ -103,7 +169,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }"] + [["{ \"CapacityUnits\": number, \"GlobalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"LocalSecondaryIndexes\": { \"string\" : { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }, \"ReadCapacityUnits\": number, \"Table\": { \"CapacityUnits\": number, \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number }, \"TableName\": \"string\", \"WriteCapacityUnits\": number }"]] ``` @@ -199,7 +265,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"] + [["{ \"Create\": { \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"]] ``` @@ -232,7 +298,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"] + [["{ \"IndexName\": \"string\", \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" }, \"ProvisionedThroughput\": { \"ReadCapacityUnits\": number, \"WriteCapacityUnits\": number } }"]] ``` @@ -360,7 +426,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }"] + [["{ \"IndexArn\": \"string\", \"IndexName\": \"string\", \"IndexSizeBytes\": number, \"ItemCount\": number, \"KeySchema\": [ { \"AttributeName\": \"string\", \"KeyType\": \"string\" } ], \"Projection\": { \"NonKeyAttributes\": [ \"string\" ], \"ProjectionType\": \"string\" } }"]] ``` @@ -643,7 +709,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["Users", "Cats"] + [["Users", "Cats"]] ``` @@ -770,8 +836,8 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Enum Values - * `:ec2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:fargate` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ec2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon EC2 + * `:fargate` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Fargate """ @type aws_ecs_launchtype_values() :: %{ :ec2 => :ec2, @@ -988,6 +1054,71 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do :"aws.eks.cluster.arn" end + @doc """ + The AWS extended request ID as returned in the response header `x-amz-id-2`. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ="] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_extended_request_id() + :"aws.extended_request_id" + + ### Erlang + + ```erlang + ?AWS_EXTENDED_REQUEST_ID. + 'aws.extended_request_id' + ``` + + + """ + @spec aws_extended_request_id :: :"aws.extended_request_id" + def aws_extended_request_id do + :"aws.extended_request_id" + end + + @doc """ + The name of the AWS Kinesis [stream](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) the request refers to. Corresponds to the `--stream-name` parameter of the Kinesis [describe-stream](https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html) operation. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["some-stream-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_kinesis_stream_name() + :"aws.kinesis.stream_name" + + ### Erlang + + ```erlang + ?AWS_KINESIS_STREAM_NAME. + 'aws.kinesis.stream_name' + ``` + + + """ + @spec aws_kinesis_stream_name :: :"aws.kinesis.stream_name" + def aws_kinesis_stream_name do + :"aws.kinesis.stream_name" + end + @doc """ 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). @@ -1024,6 +1155,39 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do :"aws.lambda.invoked_arn" end + @doc """ + The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environtment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["587ad24b-03b9-4413-8202-bbd56b36e5b7"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_lambda_resource_mapping_id() + :"aws.lambda.resource_mapping.id" + + ### Erlang + + ```erlang + ?AWS_LAMBDA_RESOURCE_MAPPING_ID. + 'aws.lambda.resource_mapping.id' + ``` + + + """ + @spec aws_lambda_resource_mapping_id :: :"aws.lambda.resource_mapping.id" + def aws_lambda_resource_mapping_id do + :"aws.lambda.resource_mapping.id" + end + @doc """ The Amazon Resource Name(s) (ARN) of the AWS log group(s). @@ -1037,7 +1201,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"] + [["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"]] ``` @@ -1074,7 +1238,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["/aws/lambda/my-function", "opentelemetry-service"] + [["/aws/lambda/my-function", "opentelemetry-service"]] ``` @@ -1111,7 +1275,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"] + [["arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"]] ``` @@ -1144,7 +1308,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"] + [["logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"]] ``` @@ -1169,7 +1333,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do end @doc """ - The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. + The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`. ### Value type Value must be of type `atom() | String.t()`. @@ -1449,4 +1613,169 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do def aws_s3_upload_id do :"aws.s3.upload_id" end + + @doc """ + The ARN of the Secret stored in the Secrets Mangger + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_secretsmanager_secret_arn() + :"aws.secretsmanager.secret.arn" + + ### Erlang + + ```erlang + ?AWS_SECRETSMANAGER_SECRET_ARN. + 'aws.secretsmanager.secret.arn' + ``` + + + """ + @spec aws_secretsmanager_secret_arn :: :"aws.secretsmanager.secret.arn" + def aws_secretsmanager_secret_arn do + :"aws.secretsmanager.secret.arn" + end + + @doc """ + The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) is a logical access point that acts as a communication channel. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_sns_topic_arn() + :"aws.sns.topic.arn" + + ### Erlang + + ```erlang + ?AWS_SNS_TOPIC_ARN. + 'aws.sns.topic.arn' + ``` + + + """ + @spec aws_sns_topic_arn :: :"aws.sns.topic.arn" + def aws_sns_topic_arn do + :"aws.sns.topic.arn" + end + + @doc """ + The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue Service (SQS) and is used to access the queue and perform actions on it. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_sqs_queue_url() + :"aws.sqs.queue.url" + + ### Erlang + + ```erlang + ?AWS_SQS_QUEUE_URL. + 'aws.sqs.queue.url' + ``` + + + """ + @spec aws_sqs_queue_url :: :"aws.sqs.queue.url" + def aws_sqs_queue_url do + :"aws.sqs.queue.url" + end + + @doc """ + The ARN of the AWS Step Functions Activity. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:states:us-east-1:123456789012:activity:get-greeting"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_step_functions_activity_arn() + :"aws.step_functions.activity.arn" + + ### Erlang + + ```erlang + ?AWS_STEP_FUNCTIONS_ACTIVITY_ARN. + 'aws.step_functions.activity.arn' + ``` + + + """ + @spec aws_step_functions_activity_arn :: :"aws.step_functions.activity.arn" + def aws_step_functions_activity_arn do + :"aws.step_functions.activity.arn" + end + + @doc """ + The ARN of the AWS Step Functions State Machine. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AWSAttributes.aws_step_functions_state_machine_arn() + :"aws.step_functions.state_machine.arn" + + ### Erlang + + ```erlang + ?AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN. + 'aws.step_functions.state_machine.arn' + ``` + + + """ + @spec aws_step_functions_state_machine_arn :: :"aws.step_functions.state_machine.arn" + def aws_step_functions_state_machine_arn do + :"aws.step_functions.state_machine.arn" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex index e7ef58e0c..8a2f54b92 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex @@ -4,6 +4,343 @@ defmodule OpenTelemetry.SemConv.Incubating.AzureAttributes do OpenTelemetry Semantic Conventions for Azure attributes. """ + @deprecated """ + Replaced by `azure.resource_provider.namespace`. + """ + @spec az_namespace :: :"az.namespace" + def az_namespace do + :"az.namespace" + end + + @deprecated """ + Replaced by `azure.service.request.id`. + """ + @spec az_service_request_id :: :"az.service_request_id" + def az_service_request_id do + :"az.service_request_id" + end + + @doc """ + The unique identifier of the client instance. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_client_id() + :"azure.client.id" + + ### Erlang + + ```erlang + ?AZURE_CLIENT_ID. + 'azure.client.id' + ``` + + + """ + @spec azure_client_id :: :"azure.client.id" + def azure_client_id do + :"azure.client.id" + end + + @typedoc """ + Cosmos client connection mode. + + ### Enum Values + * `:gateway` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gateway (HTTP) connection. + * `:direct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Direct connection. + """ + @type azure_cosmosdb_connection_mode_values() :: %{ + :gateway => :gateway, + :direct => :direct + } + @doc """ + Cosmos client connection mode. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_connection_mode() + :"azure.cosmosdb.connection.mode" + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_connection_mode_values().gateway + :gateway + + iex> %{OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_connection_mode() => OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_connection_mode_values().gateway} + %{:"azure.cosmosdb.connection.mode" => :gateway} + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_CONNECTION_MODE. + 'azure.cosmosdb.connection.mode' + + ?AZURE_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY. + 'gateway' + + \#{?AZURE_COSMOSDB_CONNECTION_MODE => ?AZURE_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY}. + \#{'azure.cosmosdb.connection.mode' => 'gateway'} + ``` + + + """ + @spec azure_cosmosdb_connection_mode :: :"azure.cosmosdb.connection.mode" + def azure_cosmosdb_connection_mode do + :"azure.cosmosdb.connection.mode" + end + + @spec azure_cosmosdb_connection_mode_values() :: azure_cosmosdb_connection_mode_values() + def azure_cosmosdb_connection_mode_values() do + %{ + :gateway => :gateway, + :direct => :direct + } + end + + @typedoc """ + Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). + + ### Enum Values + * `:strong` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Strong + * `:bounded_staleness` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Bounded Staleness + * `:session` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Session + * `:eventual` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Eventual + * `:consistent_prefix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Consistent Prefix + """ + @type azure_cosmosdb_consistency_level_values() :: %{ + :strong => :Strong, + :bounded_staleness => :BoundedStaleness, + :session => :Session, + :eventual => :Eventual, + :consistent_prefix => :ConsistentPrefix + } + @doc """ + Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). + + ### Examples + + ``` + ["Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong", "Session"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_consistency_level() + :"azure.cosmosdb.consistency.level" + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_consistency_level_values().strong + :Strong + + iex> %{OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_consistency_level() => OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_consistency_level_values().strong} + %{:"azure.cosmosdb.consistency.level" => :Strong} + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_CONSISTENCY_LEVEL. + 'azure.cosmosdb.consistency.level' + + ?AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_STRONG. + 'Strong' + + \#{?AZURE_COSMOSDB_CONSISTENCY_LEVEL => ?AZURE_COSMOSDB_CONSISTENCY_LEVEL_VALUES_STRONG}. + \#{'azure.cosmosdb.consistency.level' => 'Strong'} + ``` + + + """ + @spec azure_cosmosdb_consistency_level :: :"azure.cosmosdb.consistency.level" + def azure_cosmosdb_consistency_level do + :"azure.cosmosdb.consistency.level" + end + + @spec azure_cosmosdb_consistency_level_values() :: azure_cosmosdb_consistency_level_values() + def azure_cosmosdb_consistency_level_values() do + %{ + :strong => :Strong, + :bounded_staleness => :BoundedStaleness, + :session => :Session, + :eventual => :Eventual, + :consistent_prefix => :ConsistentPrefix + } + end + + @doc """ + List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations) + + ### Examples + + ``` + [["North Central US", "Australia East", "Australia Southeast"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_operation_contacted_regions() + :"azure.cosmosdb.operation.contacted_regions" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS. + 'azure.cosmosdb.operation.contacted_regions' + ``` + + + """ + @spec azure_cosmosdb_operation_contacted_regions :: + :"azure.cosmosdb.operation.contacted_regions" + def azure_cosmosdb_operation_contacted_regions do + :"azure.cosmosdb.operation.contacted_regions" + end + + @doc """ + The number of request units consumed by the operation. + + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [46.18, 1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_operation_request_charge() + :"azure.cosmosdb.operation.request_charge" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE. + 'azure.cosmosdb.operation.request_charge' + ``` + + + """ + @spec azure_cosmosdb_operation_request_charge :: :"azure.cosmosdb.operation.request_charge" + def azure_cosmosdb_operation_request_charge do + :"azure.cosmosdb.operation.request_charge" + end + + @doc """ + Request payload size in bytes. + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_request_body_size() + :"azure.cosmosdb.request.body.size" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_REQUEST_BODY_SIZE. + 'azure.cosmosdb.request.body.size' + ``` + + + """ + @spec azure_cosmosdb_request_body_size :: :"azure.cosmosdb.request.body.size" + def azure_cosmosdb_request_body_size do + :"azure.cosmosdb.request.body.size" + end + + @doc """ + Cosmos DB sub status code. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1000, 1002] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_cosmosdb_response_sub_status_code() + :"azure.cosmosdb.response.sub_status_code" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE. + 'azure.cosmosdb.response.sub_status_code' + ``` + + + """ + @spec azure_cosmosdb_response_sub_status_code :: :"azure.cosmosdb.response.sub_status_code" + def azure_cosmosdb_response_sub_status_code do + :"azure.cosmosdb.response.sub_status_code" + end + + @doc """ + [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_resource_provider_namespace() + :"azure.resource_provider.namespace" + + ### Erlang + + ```erlang + ?AZURE_RESOURCE_PROVIDER_NAMESPACE. + 'azure.resource_provider.namespace' + ``` + + + """ + @spec azure_resource_provider_namespace :: :"azure.resource_provider.namespace" + def azure_resource_provider_namespace do + :"azure.resource_provider.namespace" + end + @doc """ The unique identifier of the service request. It's generated by the Azure service and returned with the response. ### Value type @@ -19,20 +356,20 @@ defmodule OpenTelemetry.SemConv.Incubating.AzureAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.az_service_request_id() - :"az.service_request_id" + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_service_request_id() + :"azure.service.request.id" ### Erlang ```erlang - ?AZ_SERVICE_REQUEST_ID. - 'az.service_request_id' + ?AZURE_SERVICE_REQUEST_ID. + 'azure.service.request.id' ``` """ - @spec az_service_request_id :: :"az.service_request_id" - def az_service_request_id do - :"az.service_request_id" + @spec azure_service_request_id :: :"azure.service.request.id" + def azure_service_request_id do + :"azure.service.request.id" end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex index 63b85baf6..79154c388 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/browser_attributes.ex @@ -16,7 +16,7 @@ defmodule OpenTelemetry.SemConv.Incubating.BrowserAttributes do ### Examples ``` - [" Not A;Brand 99", "Chromium 99", "Chrome 99"] + [[" Not A;Brand 99", "Chromium 99", "Chrome 99"]] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cassandra_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cassandra_attributes.ex new file mode 100644 index 000000000..da6c3d42c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cassandra_attributes.ex @@ -0,0 +1,251 @@ +defmodule OpenTelemetry.SemConv.Incubating.CassandraAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cassandra attributes. + """ + + @typedoc """ + 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). + + + ### Enum Values + * `:all` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - All + * `:each_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Each Quorum + * `:quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Quorum + * `:local_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Local Quorum + * `:one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One + * `:two` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Two + * `:three` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Three + * `:local_one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Local One + * `:any` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any + * `:serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Serial + * `:local_serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Local Serial + """ + @type cassandra_consistency_level_values() :: %{ + :all => :all, + :each_quorum => :each_quorum, + :quorum => :quorum, + :local_quorum => :local_quorum, + :one => :one, + :two => :two, + :three => :three, + :local_one => :local_one, + :any => :any, + :serial => :serial, + :local_serial => :local_serial + } + @doc """ + 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). + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_consistency_level() + :"cassandra.consistency.level" + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_consistency_level_values().all + :all + + iex> %{OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_consistency_level() => OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_consistency_level_values().all} + %{:"cassandra.consistency.level" => :all} + + ### Erlang + + ```erlang + ?CASSANDRA_CONSISTENCY_LEVEL. + 'cassandra.consistency.level' + + ?CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL. + 'all' + + \#{?CASSANDRA_CONSISTENCY_LEVEL => ?CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL}. + \#{'cassandra.consistency.level' => 'all'} + ``` + + + """ + @spec cassandra_consistency_level :: :"cassandra.consistency.level" + def cassandra_consistency_level do + :"cassandra.consistency.level" + end + + @spec cassandra_consistency_level_values() :: cassandra_consistency_level_values() + def cassandra_consistency_level_values() do + %{ + :all => :all, + :each_quorum => :each_quorum, + :quorum => :quorum, + :local_quorum => :local_quorum, + :one => :one, + :two => :two, + :three => :three, + :local_one => :local_one, + :any => :any, + :serial => :serial, + :local_serial => :local_serial + } + end + + @doc """ + The data center of the coordinating node for a query. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + us-west-2 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_coordinator_dc() + :"cassandra.coordinator.dc" + + ### Erlang + + ```erlang + ?CASSANDRA_COORDINATOR_DC. + 'cassandra.coordinator.dc' + ``` + + + """ + @spec cassandra_coordinator_dc :: :"cassandra.coordinator.dc" + def cassandra_coordinator_dc do + :"cassandra.coordinator.dc" + end + + @doc """ + The ID of the coordinating node for a query. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + be13faa2-8574-4d71-926d-27f16cf8a7af + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_coordinator_id() + :"cassandra.coordinator.id" + + ### Erlang + + ```erlang + ?CASSANDRA_COORDINATOR_ID. + 'cassandra.coordinator.id' + ``` + + + """ + @spec cassandra_coordinator_id :: :"cassandra.coordinator.id" + def cassandra_coordinator_id do + :"cassandra.coordinator.id" + end + + @doc """ + The fetch size used for paging, i.e. how many rows will be returned at once. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [5000] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_page_size() + :"cassandra.page.size" + + ### Erlang + + ```erlang + ?CASSANDRA_PAGE_SIZE. + 'cassandra.page.size' + ``` + + + """ + @spec cassandra_page_size :: :"cassandra.page.size" + def cassandra_page_size do + :"cassandra.page.size" + end + + @doc """ + Whether or not the query is idempotent. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_query_idempotent() + :"cassandra.query.idempotent" + + ### Erlang + + ```erlang + ?CASSANDRA_QUERY_IDEMPOTENT. + 'cassandra.query.idempotent' + ``` + + + """ + @spec cassandra_query_idempotent :: :"cassandra.query.idempotent" + def cassandra_query_idempotent do + :"cassandra.query.idempotent" + end + + @doc """ + The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. + + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [0, 2] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CassandraAttributes.cassandra_speculative_execution_count() + :"cassandra.speculative_execution.count" + + ### Erlang + + ```erlang + ?CASSANDRA_SPECULATIVE_EXECUTION_COUNT. + 'cassandra.speculative_execution.count' + ``` + + + """ + @spec cassandra_speculative_execution_count :: :"cassandra.speculative_execution.count" + def cassandra_speculative_execution_count do + :"cassandra.speculative_execution.count" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex index af727996d..8d1953894 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex @@ -4,6 +4,72 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do OpenTelemetry Semantic Conventions for Cicd attributes. """ + @typedoc """ + The kind of action a pipeline run is performing. + + + ### Enum Values + * `:build` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run is executing a build. + * `:run` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run is executing. + * `:sync` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run is executing a sync. + """ + @type cicd_pipeline_action_name_values() :: %{ + :build => :BUILD, + :run => :RUN, + :sync => :SYNC + } + @doc """ + The kind of action a pipeline run is performing. + + + ### Examples + + ``` + ["BUILD", "RUN", "SYNC"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_action_name() + :"cicd.pipeline.action.name" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_action_name_values().build + :BUILD + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_action_name() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_action_name_values().build} + %{:"cicd.pipeline.action.name" => :BUILD} + + ### Erlang + + ```erlang + ?CICD_PIPELINE_ACTION_NAME. + 'cicd.pipeline.action.name' + + ?CICD_PIPELINE_ACTION_NAME_VALUES_BUILD. + 'BUILD' + + \#{?CICD_PIPELINE_ACTION_NAME => ?CICD_PIPELINE_ACTION_NAME_VALUES_BUILD}. + \#{'cicd.pipeline.action.name' => 'BUILD'} + ``` + + + """ + @spec cicd_pipeline_action_name :: :"cicd.pipeline.action.name" + def cicd_pipeline_action_name do + :"cicd.pipeline.action.name" + end + + @spec cicd_pipeline_action_name_values() :: cicd_pipeline_action_name_values() + def cicd_pipeline_action_name_values() do + %{ + :build => :BUILD, + :run => :RUN, + :sync => :SYNC + } + end + @doc """ The human readable name of the pipeline within a CI/CD system. @@ -37,6 +103,81 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do :"cicd.pipeline.name" end + @typedoc """ + The result of a pipeline run. + + + ### Enum Values + * `:success` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run finished successfully. + * `:failure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. + * `:error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. + * `:timeout` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A timeout caused the pipeline run to be interrupted. + * `:cancellation` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. + * `:skip` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pipeline run was skipped, eg. due to a precondition not being met. + """ + @type cicd_pipeline_result_values() :: %{ + :success => :success, + :failure => :failure, + :error => :error, + :timeout => :timeout, + :cancellation => :cancellation, + :skip => :skip + } + @doc """ + The result of a pipeline run. + + + ### Examples + + ``` + ["success", "failure", "timeout", "skipped"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_result() + :"cicd.pipeline.result" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_result_values().success + :success + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_result() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_result_values().success} + %{:"cicd.pipeline.result" => :success} + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RESULT. + 'cicd.pipeline.result' + + ?CICD_PIPELINE_RESULT_VALUES_SUCCESS. + 'success' + + \#{?CICD_PIPELINE_RESULT => ?CICD_PIPELINE_RESULT_VALUES_SUCCESS}. + \#{'cicd.pipeline.result' => 'success'} + ``` + + + """ + @spec cicd_pipeline_result :: :"cicd.pipeline.result" + def cicd_pipeline_result do + :"cicd.pipeline.result" + end + + @spec cicd_pipeline_result_values() :: cicd_pipeline_result_values() + def cicd_pipeline_result_values() do + %{ + :success => :success, + :failure => :failure, + :error => :error, + :timeout => :timeout, + :cancellation => :cancellation, + :skip => :skip + } + end + @doc """ The unique identifier of a pipeline run within a CI/CD system. @@ -70,8 +211,108 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do :"cicd.pipeline.run.id" end + @typedoc """ + The pipeline run goes through these states during its lifecycle. + + + ### Enum Values + * `:pending` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The run pending state spans from the event triggering the pipeline run until the execution of the run starts (eg. time spent in a queue, provisioning agents, creating run resources). + + * `:executing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The executing state spans the execution of any run tasks (eg. build, test). + * `:finalizing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The finalizing state spans from when the run has finished executing (eg. cleanup of run resources). + """ + @type cicd_pipeline_run_state_values() :: %{ + :pending => :pending, + :executing => :executing, + :finalizing => :finalizing + } + @doc """ + The pipeline run goes through these states during its lifecycle. + + + ### Examples + + ``` + ["pending", "executing", "finalizing"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_state() + :"cicd.pipeline.run.state" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_state_values().pending + :pending + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_state() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_state_values().pending} + %{:"cicd.pipeline.run.state" => :pending} + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_STATE. + 'cicd.pipeline.run.state' + + ?CICD_PIPELINE_RUN_STATE_VALUES_PENDING. + 'pending' + + \#{?CICD_PIPELINE_RUN_STATE => ?CICD_PIPELINE_RUN_STATE_VALUES_PENDING}. + \#{'cicd.pipeline.run.state' => 'pending'} + ``` + + + """ + @spec cicd_pipeline_run_state :: :"cicd.pipeline.run.state" + def cicd_pipeline_run_state do + :"cicd.pipeline.run.state" + end + + @spec cicd_pipeline_run_state_values() :: cicd_pipeline_run_state_values() + def cicd_pipeline_run_state_values() do + %{ + :pending => :pending, + :executing => :executing, + :finalizing => :finalizing + } + end + + @doc """ + The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_url_full() + :"cicd.pipeline.run.url.full" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_URL_FULL. + 'cicd.pipeline.run.url.full' + ``` + + + """ + @spec cicd_pipeline_run_url_full :: :"cicd.pipeline.run.url.full" + def cicd_pipeline_run_url_full do + :"cicd.pipeline.run.url.full" + end + @doc """ - The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. + The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. ### Value type @@ -136,8 +377,83 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do :"cicd.pipeline.task.run.id" end + @typedoc """ + The result of a task run. + + + ### Enum Values + * `:success` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The task run finished successfully. + * `:failure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run. + * `:error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The task run failed due to an error in the CICD system, eg. due to the worker being killed. + * `:timeout` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A timeout caused the task run to be interrupted. + * `:cancellation` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The task run was cancelled, eg. by a user manually cancelling the task run. + * `:skip` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The task run was skipped, eg. due to a precondition not being met. + """ + @type cicd_pipeline_task_run_result_values() :: %{ + :success => :success, + :failure => :failure, + :error => :error, + :timeout => :timeout, + :cancellation => :cancellation, + :skip => :skip + } @doc """ - The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. + The result of a task run. + + + ### Examples + + ``` + ["success", "failure", "timeout", "skipped"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_result() + :"cicd.pipeline.task.run.result" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_result_values().success + :success + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_result() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_result_values().success} + %{:"cicd.pipeline.task.run.result" => :success} + + ### Erlang + + ```erlang + ?CICD_PIPELINE_TASK_RUN_RESULT. + 'cicd.pipeline.task.run.result' + + ?CICD_PIPELINE_TASK_RUN_RESULT_VALUES_SUCCESS. + 'success' + + \#{?CICD_PIPELINE_TASK_RUN_RESULT => ?CICD_PIPELINE_TASK_RUN_RESULT_VALUES_SUCCESS}. + \#{'cicd.pipeline.task.run.result' => 'success'} + ``` + + + """ + @spec cicd_pipeline_task_run_result :: :"cicd.pipeline.task.run.result" + def cicd_pipeline_task_run_result do + :"cicd.pipeline.task.run.result" + end + + @spec cicd_pipeline_task_run_result_values() :: cicd_pipeline_task_run_result_values() + def cicd_pipeline_task_run_result_values() do + %{ + :success => :success, + :failure => :failure, + :error => :error, + :timeout => :timeout, + :cancellation => :cancellation, + :skip => :skip + } + end + + @doc """ + The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. ### Value type @@ -234,4 +550,198 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do :deploy => :deploy } end + + @doc """ + The name of a component of the CICD system. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["controller", "scheduler", "agent"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_system_component() + :"cicd.system.component" + + ### Erlang + + ```erlang + ?CICD_SYSTEM_COMPONENT. + 'cicd.system.component' + ``` + + + """ + @spec cicd_system_component :: :"cicd.system.component" + def cicd_system_component do + :"cicd.system.component" + end + + @doc """ + The unique identifier of a worker within a CICD system. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["abc123", "10.0.1.2", "controller"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_id() + :"cicd.worker.id" + + ### Erlang + + ```erlang + ?CICD_WORKER_ID. + 'cicd.worker.id' + ``` + + + """ + @spec cicd_worker_id :: :"cicd.worker.id" + def cicd_worker_id do + :"cicd.worker.id" + end + + @doc """ + The name of a worker within a CICD system. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["agent-abc", "controller", "Ubuntu LTS"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_name() + :"cicd.worker.name" + + ### Erlang + + ```erlang + ?CICD_WORKER_NAME. + 'cicd.worker.name' + ``` + + + """ + @spec cicd_worker_name :: :"cicd.worker.name" + def cicd_worker_name do + :"cicd.worker.name" + end + + @typedoc """ + The state of a CICD worker / agent. + + + ### Enum Values + * `:available` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The worker is not performing work for the CICD system. It is available to the CICD system to perform work on (online / idle). + * `:busy` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The worker is performing work for the CICD system. + * `:offline` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The worker is not available to the CICD system (disconnected / down). + """ + @type cicd_worker_state_values() :: %{ + :available => :available, + :busy => :busy, + :offline => :offline + } + @doc """ + The state of a CICD worker / agent. + + + ### Examples + + ``` + ["idle", "busy", "down"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_state() + :"cicd.worker.state" + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_state_values().available + :available + + iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_state() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_state_values().available} + %{:"cicd.worker.state" => :available} + + ### Erlang + + ```erlang + ?CICD_WORKER_STATE. + 'cicd.worker.state' + + ?CICD_WORKER_STATE_VALUES_AVAILABLE. + 'available' + + \#{?CICD_WORKER_STATE => ?CICD_WORKER_STATE_VALUES_AVAILABLE}. + \#{'cicd.worker.state' => 'available'} + ``` + + + """ + @spec cicd_worker_state :: :"cicd.worker.state" + def cicd_worker_state do + :"cicd.worker.state" + end + + @spec cicd_worker_state_values() :: cicd_worker_state_values() + def cicd_worker_state_values() do + %{ + :available => :available, + :busy => :busy, + :offline => :offline + } + end + + @doc """ + The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://cicd.example.org/worker/abc123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_worker_url_full() + :"cicd.worker.url.full" + + ### Erlang + + ```erlang + ?CICD_WORKER_URL_FULL. + 'cicd.worker.url.full' + ``` + + + """ + @spec cicd_worker_url_full :: :"cicd.worker.url.full" + def cicd_worker_url_full do + :"cicd.worker.url.full" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex index 9301dfcea..cbcbc2a55 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex @@ -79,6 +79,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do ### Enum Values + * `:"akamai_cloud.compute"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Akamai Cloud Compute * `:alibaba_cloud_ecs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud Elastic Compute Service * `:alibaba_cloud_fc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud Function Compute * `:alibaba_cloud_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on Alibaba Cloud @@ -89,13 +90,21 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do * `:aws_elastic_beanstalk` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Elastic Beanstalk * `:aws_app_runner` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS App Runner * `:aws_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on AWS (ROSA) - * `:azure_vm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Virtual Machines - * `:azure_container_apps` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Apps - * `:azure_container_instances` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Instances - * `:azure_aks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Kubernetes Service - * `:azure_functions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Functions - * `:azure_app_service` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure App Service - * `:azure_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Red Hat OpenShift + * `:"azure.vm"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Virtual Machines + * `:"azure.container_apps"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Apps + * `:"azure.container_instances"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Container Instances + * `:"azure.aks"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Kubernetes Service + * `:"azure.functions"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Functions + * `:"azure.app_service"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure App Service + * `:"azure.openshift"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Red Hat OpenShift + * `:azure_vm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Virtual Machines~~ + * `:azure_container_apps` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Container Apps~~ + * `:azure_container_instances` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Container Instances~~ + * `:azure_aks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Kubernetes Service~~ + * `:azure_functions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Functions~~ + * `:azure_app_service` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure App Service~~ + * `:azure_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure Red Hat OpenShift~~ + * `:"gcp.agent_engine"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Vertex AI Agent Engine * `:gcp_bare_metal_solution` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Bare Metal Solution (BMS) * `:gcp_compute_engine` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Compute Engine (GCE) * `:gcp_cloud_run` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Run @@ -103,12 +112,17 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do * `:gcp_cloud_functions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Functions (GCF) * `:gcp_app_engine` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud App Engine (GAE) * `:gcp_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on Google Cloud + * `:"hetzner.cloud_server"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Server on Hetzner Cloud * `:ibm_cloud_openshift` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Red Hat OpenShift on IBM Cloud + * `:oracle_cloud_compute` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Compute on Oracle Cloud Infrastructure (OCI) + * `:oracle_cloud_oke` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI) * `:tencent_cloud_cvm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Cloud Virtual Machine (CVM) * `:tencent_cloud_eks` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Elastic Kubernetes Service (EKS) * `:tencent_cloud_scf` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud Serverless Cloud Function (SCF) + * `:"vultr.cloud_compute"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vultr Cloud Compute """ @type cloud_platform_values() :: %{ + :"akamai_cloud.compute" => :"akamai_cloud.compute", :alibaba_cloud_ecs => :alibaba_cloud_ecs, :alibaba_cloud_fc => :alibaba_cloud_fc, :alibaba_cloud_openshift => :alibaba_cloud_openshift, @@ -119,6 +133,13 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :aws_elastic_beanstalk => :aws_elastic_beanstalk, :aws_app_runner => :aws_app_runner, :aws_openshift => :aws_openshift, + :"azure.vm" => :"azure.vm", + :"azure.container_apps" => :"azure.container_apps", + :"azure.container_instances" => :"azure.container_instances", + :"azure.aks" => :"azure.aks", + :"azure.functions" => :"azure.functions", + :"azure.app_service" => :"azure.app_service", + :"azure.openshift" => :"azure.openshift", :azure_vm => :azure_vm, :azure_container_apps => :azure_container_apps, :azure_container_instances => :azure_container_instances, @@ -126,6 +147,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :azure_functions => :azure_functions, :azure_app_service => :azure_app_service, :azure_openshift => :azure_openshift, + :"gcp.agent_engine" => :"gcp.agent_engine", :gcp_bare_metal_solution => :gcp_bare_metal_solution, :gcp_compute_engine => :gcp_compute_engine, :gcp_cloud_run => :gcp_cloud_run, @@ -133,10 +155,14 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp_cloud_functions => :gcp_cloud_functions, :gcp_app_engine => :gcp_app_engine, :gcp_openshift => :gcp_openshift, + :"hetzner.cloud_server" => :"hetzner.cloud_server", :ibm_cloud_openshift => :ibm_cloud_openshift, + :oracle_cloud_compute => :oracle_cloud_compute, + :oracle_cloud_oke => :oracle_cloud_oke, :tencent_cloud_cvm => :tencent_cloud_cvm, :tencent_cloud_eks => :tencent_cloud_eks, - :tencent_cloud_scf => :tencent_cloud_scf + :tencent_cloud_scf => :tencent_cloud_scf, + :"vultr.cloud_compute" => :"vultr.cloud_compute" } @doc """ The cloud platform in use. @@ -154,11 +180,11 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() :"cloud.platform" - iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs - :alibaba_cloud_ecs + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values()[:"akamai_cloud.compute"] + :"akamai_cloud.compute" - iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values().alibaba_cloud_ecs} - %{:"cloud.platform" => :alibaba_cloud_ecs} + iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_platform_values()[:"akamai_cloud.compute"]} + %{:"cloud.platform" => :"akamai_cloud.compute"} ### Erlang @@ -166,11 +192,11 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do ?CLOUD_PLATFORM. 'cloud.platform' - ?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS. - 'alibaba_cloud_ecs' + ?CLOUD_PLATFORM_VALUES_AKAMAI_CLOUD_COMPUTE. + 'akamai_cloud.compute' - \#{?CLOUD_PLATFORM => ?CLOUD_PLATFORM_VALUES_ALIBABA_CLOUD_ECS}. - \#{'cloud.platform' => 'alibaba_cloud_ecs'} + \#{?CLOUD_PLATFORM => ?CLOUD_PLATFORM_VALUES_AKAMAI_CLOUD_COMPUTE}. + \#{'cloud.platform' => 'akamai_cloud.compute'} ``` @@ -183,6 +209,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do @spec cloud_platform_values() :: cloud_platform_values() def cloud_platform_values() do %{ + :"akamai_cloud.compute" => :"akamai_cloud.compute", :alibaba_cloud_ecs => :alibaba_cloud_ecs, :alibaba_cloud_fc => :alibaba_cloud_fc, :alibaba_cloud_openshift => :alibaba_cloud_openshift, @@ -193,6 +220,13 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :aws_elastic_beanstalk => :aws_elastic_beanstalk, :aws_app_runner => :aws_app_runner, :aws_openshift => :aws_openshift, + :"azure.vm" => :"azure.vm", + :"azure.container_apps" => :"azure.container_apps", + :"azure.container_instances" => :"azure.container_instances", + :"azure.aks" => :"azure.aks", + :"azure.functions" => :"azure.functions", + :"azure.app_service" => :"azure.app_service", + :"azure.openshift" => :"azure.openshift", :azure_vm => :azure_vm, :azure_container_apps => :azure_container_apps, :azure_container_instances => :azure_container_instances, @@ -200,6 +234,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :azure_functions => :azure_functions, :azure_app_service => :azure_app_service, :azure_openshift => :azure_openshift, + :"gcp.agent_engine" => :"gcp.agent_engine", :gcp_bare_metal_solution => :gcp_bare_metal_solution, :gcp_compute_engine => :gcp_compute_engine, :gcp_cloud_run => :gcp_cloud_run, @@ -207,10 +242,14 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp_cloud_functions => :gcp_cloud_functions, :gcp_app_engine => :gcp_app_engine, :gcp_openshift => :gcp_openshift, + :"hetzner.cloud_server" => :"hetzner.cloud_server", :ibm_cloud_openshift => :ibm_cloud_openshift, + :oracle_cloud_compute => :oracle_cloud_compute, + :oracle_cloud_oke => :oracle_cloud_oke, :tencent_cloud_cvm => :tencent_cloud_cvm, :tencent_cloud_eks => :tencent_cloud_eks, - :tencent_cloud_scf => :tencent_cloud_scf + :tencent_cloud_scf => :tencent_cloud_scf, + :"vultr.cloud_compute" => :"vultr.cloud_compute" } end @@ -219,22 +258,30 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do ### Enum Values + * `:akamai_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Akamai Cloud * `:alibaba_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Alibaba Cloud * `:aws` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Web Services * `:azure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Azure * `:gcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Platform * `:heroku` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Heroku Platform as a Service + * `:hetzner` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Hetzner * `:ibm_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM Cloud + * `:oracle_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Oracle Cloud Infrastructure (OCI) * `:tencent_cloud` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tencent Cloud + * `:vultr` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vultr """ @type cloud_provider_values() :: %{ + :akamai_cloud => :akamai_cloud, :alibaba_cloud => :alibaba_cloud, :aws => :aws, :azure => :azure, :gcp => :gcp, :heroku => :heroku, + :hetzner => :hetzner, :ibm_cloud => :ibm_cloud, - :tencent_cloud => :tencent_cloud + :oracle_cloud => :oracle_cloud, + :tencent_cloud => :tencent_cloud, + :vultr => :vultr } @doc """ Name of the cloud provider. @@ -248,11 +295,11 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() :"cloud.provider" - iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud - :alibaba_cloud + iex> OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().akamai_cloud + :akamai_cloud - iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().alibaba_cloud} - %{:"cloud.provider" => :alibaba_cloud} + iex> %{OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider() => OpenTelemetry.SemConv.Incubating.CloudAttributes.cloud_provider_values().akamai_cloud} + %{:"cloud.provider" => :akamai_cloud} ### Erlang @@ -260,11 +307,11 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do ?CLOUD_PROVIDER. 'cloud.provider' - ?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD. - 'alibaba_cloud' + ?CLOUD_PROVIDER_VALUES_AKAMAI_CLOUD. + 'akamai_cloud' - \#{?CLOUD_PROVIDER => ?CLOUD_PROVIDER_VALUES_ALIBABA_CLOUD}. - \#{'cloud.provider' => 'alibaba_cloud'} + \#{?CLOUD_PROVIDER => ?CLOUD_PROVIDER_VALUES_AKAMAI_CLOUD}. + \#{'cloud.provider' => 'akamai_cloud'} ``` @@ -277,18 +324,22 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do @spec cloud_provider_values() :: cloud_provider_values() def cloud_provider_values() do %{ + :akamai_cloud => :akamai_cloud, :alibaba_cloud => :alibaba_cloud, :aws => :aws, :azure => :azure, :gcp => :gcp, :heroku => :heroku, + :hetzner => :hetzner, :ibm_cloud => :ibm_cloud, - :tencent_cloud => :tencent_cloud + :oracle_cloud => :oracle_cloud, + :tencent_cloud => :tencent_cloud, + :vultr => :vultr } end @doc """ - The geographical region the resource is running. + The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed. ### Value type @@ -325,7 +376,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do end @doc """ - Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) + Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP) ### Value type @@ -338,22 +389,22 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do The exact value to use for `cloud.resource_id` depends on the cloud provider. The following well-known definitions **MUST** be used if you set this attribute and they apply: - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + - **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 invocable 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/rest/api/resources/resources/get-by-id) of the invoked function, + - **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) + - **Azure:** The [Fully Qualified Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, *not* the function app, having the form - `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. This means that a span attribute **MUST** be used, as an Azure function app can host multiple functions that would usually share a TracerProvider. ### Examples ``` - ["arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID", "/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/"] + ["arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID", "/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/"] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudfoundry_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudfoundry_attributes.ex new file mode 100644 index 000000000..125845890 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloudfoundry_attributes.ex @@ -0,0 +1,450 @@ +defmodule OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cloudfoundry attributes. + """ + + @doc """ + The guid of the application. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.application_id`. This is the same value as + reported by `cf app --guid`. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_app_id() + :"cloudfoundry.app.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_APP_ID. + 'cloudfoundry.app.id' + ``` + + + """ + @spec cloudfoundry_app_id :: :"cloudfoundry.app.id" + def cloudfoundry_app_id do + :"cloudfoundry.app.id" + end + + @doc """ + The index of the application instance. 0 when just one instance is active. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + It is used for logs and metrics emitted by CloudFoundry. It is + supposed to contain the application instance index for applications + deployed on the runtime. + + Application instrumentation should use the value from environment + variable `CF_INSTANCE_INDEX`. + + ### Examples + + ``` + ["0", "1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_app_instance_id() + :"cloudfoundry.app.instance.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_APP_INSTANCE_ID. + 'cloudfoundry.app.instance.id' + ``` + + + """ + @spec cloudfoundry_app_instance_id :: :"cloudfoundry.app.instance.id" + def cloudfoundry_app_instance_id do + :"cloudfoundry.app.instance.id" + end + + @doc """ + The name of the application. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.application_name`. This is the same value + as reported by `cf apps`. + + ### Examples + + ``` + ["my-app-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_app_name() + :"cloudfoundry.app.name" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_APP_NAME. + 'cloudfoundry.app.name' + ``` + + + """ + @spec cloudfoundry_app_name :: :"cloudfoundry.app.name" + def cloudfoundry_app_name do + :"cloudfoundry.app.name" + end + + @doc """ + The guid of the CloudFoundry org the application is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.org_id`. This is the same value as + reported by `cf org --guid`. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_org_id() + :"cloudfoundry.org.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_ORG_ID. + 'cloudfoundry.org.id' + ``` + + + """ + @spec cloudfoundry_org_id :: :"cloudfoundry.org.id" + def cloudfoundry_org_id do + :"cloudfoundry.org.id" + end + + @doc """ + The name of the CloudFoundry organization the app is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.org_name`. This is the same value as + reported by `cf orgs`. + + ### Examples + + ``` + ["my-org-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_org_name() + :"cloudfoundry.org.name" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_ORG_NAME. + 'cloudfoundry.org.name' + ``` + + + """ + @spec cloudfoundry_org_name :: :"cloudfoundry.org.name" + def cloudfoundry_org_name do + :"cloudfoundry.org.name" + end + + @doc """ + The UID identifying the process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to + `VCAP_APPLICATION.app_id` for applications deployed to the runtime. + For system components, this could be the actual PID. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_process_id() + :"cloudfoundry.process.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_PROCESS_ID. + 'cloudfoundry.process.id' + ``` + + + """ + @spec cloudfoundry_process_id :: :"cloudfoundry.process.id" + def cloudfoundry_process_id do + :"cloudfoundry.process.id" + end + + @doc """ + The type of process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + CloudFoundry applications can consist of multiple jobs. Usually the + main process will be of type `web`. There can be additional background + tasks or side-cars with different process types. + + ### Examples + + ``` + ["web"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_process_type() + :"cloudfoundry.process.type" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_PROCESS_TYPE. + 'cloudfoundry.process.type' + ``` + + + """ + @spec cloudfoundry_process_type :: :"cloudfoundry.process.type" + def cloudfoundry_process_type do + :"cloudfoundry.process.type" + end + + @doc """ + The guid of the CloudFoundry space the application is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.space_id`. This is the same value as + reported by `cf space --guid`. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_space_id() + :"cloudfoundry.space.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_SPACE_ID. + 'cloudfoundry.space.id' + ``` + + + """ + @spec cloudfoundry_space_id :: :"cloudfoundry.space.id" + def cloudfoundry_space_id do + :"cloudfoundry.space.id" + end + + @doc """ + The name of the CloudFoundry space the application is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Application instrumentation should use the value from environment + variable `VCAP_APPLICATION.space_name`. This is the same value as + reported by `cf spaces`. + + ### Examples + + ``` + ["my-space-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_space_name() + :"cloudfoundry.space.name" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_SPACE_NAME. + 'cloudfoundry.space.name' + ``` + + + """ + @spec cloudfoundry_space_name :: :"cloudfoundry.space.name" + def cloudfoundry_space_name do + :"cloudfoundry.space.name" + end + + @doc """ + A guid or another name describing the event source. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + It is used for logs and metrics emitted by CloudFoundry. It is + supposed to contain the component name, e.g. "gorouter", for + CloudFoundry components. + + When system components are instrumented, values from the + [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) + should be used. The `system.id` should be set to + `spec.deployment/spec.name`. + + ### Examples + + ``` + ["cf/gorouter"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_system_id() + :"cloudfoundry.system.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_SYSTEM_ID. + 'cloudfoundry.system.id' + ``` + + + """ + @spec cloudfoundry_system_id :: :"cloudfoundry.system.id" + def cloudfoundry_system_id do + :"cloudfoundry.system.id" + end + + @doc """ + A guid describing the concrete instance of the event source. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope). + It is used for logs and metrics emitted by CloudFoundry. It is + supposed to contain the vm id for CloudFoundry components. + + When system components are instrumented, values from the + [Bosh spec](https://bosh.io/docs/jobs/#properties-spec) + should be used. The `system.instance.id` should be set to `spec.id`. + + ### Examples + + ``` + ["218fc5a9-a5f1-4b54-aa05-46717d0ab26d"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CloudfoundryAttributes.cloudfoundry_system_instance_id() + :"cloudfoundry.system.instance.id" + + ### Erlang + + ```erlang + ?CLOUDFOUNDRY_SYSTEM_INSTANCE_ID. + 'cloudfoundry.system.instance.id' + ``` + + + """ + @spec cloudfoundry_system_instance_id :: :"cloudfoundry.system.instance.id" + def cloudfoundry_system_instance_id do + :"cloudfoundry.system.instance.id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex index 154e989a9..33e517a30 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex @@ -4,201 +4,45 @@ defmodule OpenTelemetry.SemConv.Incubating.CodeAttributes do OpenTelemetry Semantic Conventions for Code attributes. """ - @doc """ - The column number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. - - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - 16 - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_column() - :"code.column" - - ### Erlang - - ```erlang - ?CODE_COLUMN. - 'code.column' - ``` - - + @deprecated """ + Replaced by `code.column.number`. """ @spec code_column :: :"code.column" def code_column do :"code.column" end - @doc """ - The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - /usr/local/MyApplication/content_root/app/index.php - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_filepath() - :"code.filepath" - - ### Erlang - - ```erlang - ?CODE_FILEPATH. - 'code.filepath' - ``` - - + @deprecated """ + Replaced by `code.file.path`. """ @spec code_filepath :: :"code.filepath" def code_filepath do :"code.filepath" end - @doc """ - The method or function name, or equivalent (usually rightmost part of the code unit's name). - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - serveRequest - ``` + @deprecated """ + Value should be included in `code.function.name` which is expected to be a fully-qualified name. - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_function() - :"code.function" - - ### Erlang - - ```erlang - ?CODE_FUNCTION. - 'code.function' - ``` - - """ @spec code_function :: :"code.function" def code_function do :"code.function" end - @doc """ - The line number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. - - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - 42 - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_lineno() - :"code.lineno" - - ### Erlang - - ```erlang - ?CODE_LINENO. - 'code.lineno' - ``` - - + @deprecated """ + Replaced by `code.line.number`. """ @spec code_lineno :: :"code.lineno" def code_lineno do :"code.lineno" end - @doc """ - 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. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - com.example.MyHttpService - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_namespace() - :"code.namespace" - - ### Erlang + @deprecated """ + Value should be included in `code.function.name` which is expected to be a fully-qualified name. - ```erlang - ?CODE_NAMESPACE. - 'code.namespace' - ``` - - """ @spec code_namespace :: :"code.namespace" def code_namespace do :"code.namespace" end - - @doc """ - 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. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5) - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_stacktrace() - :"code.stacktrace" - - ### Erlang - - ```erlang - ?CODE_STACKTRACE. - 'code.stacktrace' - ``` - - - """ - @spec code_stacktrace :: :"code.stacktrace" - def code_stacktrace do - :"code.stacktrace" - end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex index 531bd0fb4..befac670c 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/container_attributes.ex @@ -42,7 +42,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do end @doc """ - All the command arguments (including the command/executable itself) run by the container. [2] + All the command arguments (including the command/executable itself) run by the container. ### Value type @@ -50,7 +50,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do ### Examples ``` - ["otelcontribcol, --config, config.yaml"] + [["otelcontribcol", "--config", "config.yaml"]] ``` @@ -75,7 +75,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do end @doc """ - The full command run by the container as a single string representing the full command. [2] + The full command run by the container as a single string representing the full command. ### Value type @@ -121,7 +121,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do :kernel => :kernel } @deprecated """ - Replaced by `cpu.mode` + Replaced by `cpu.mode`. """ @spec container_cpu_state :: :"container.cpu.state" def container_cpu_state do @@ -138,7 +138,81 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do end @doc """ - 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. + The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This can sometimes be referred to as a "driver" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC. + + ### Examples + + ``` + ["pd.csi.storage.gke.io"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_csi_plugin_name() + :"container.csi.plugin.name" + + ### Erlang + + ```erlang + ?CONTAINER_CSI_PLUGIN_NAME. + 'container.csi.plugin.name' + ``` + + + """ + @spec container_csi_plugin_name :: :"container.csi.plugin.name" + def container_csi_plugin_name do + :"container.csi.plugin.name" + end + + @doc """ + The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This can sometimes be referred to as a "volume handle" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec. + + ### Examples + + ``` + ["projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_csi_volume_id() + :"container.csi.volume.id" + + ### Erlang + + ```erlang + ?CONTAINER_CSI_VOLUME_ID. + 'container.csi.volume.id' + ``` + + + """ + @spec container_csi_volume_id :: :"container.csi.volume.id" + def container_csi_volume_id do + :"container.csi.volume.id" + end + + @doc """ + Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated. ### Value type @@ -178,7 +252,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do Value must be of type `atom() | String.t()`. ### Notes - Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. + Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect) endpoint. K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. @@ -250,12 +324,12 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do Value must be of type `[atom() | String.t()]`. ### Notes - [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. + [Docker](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. ### Examples ``` - ["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"] + [["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]] ``` @@ -280,7 +354,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do end @doc """ - Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. + Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. ### Value type @@ -288,7 +362,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do ### Examples ``` - ["v1.27.1", "3.5.7-0"] + [["v1.27.1", "3.5.7-0"]] ``` @@ -318,10 +392,14 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + For example, a docker container label `app` with value `nginx` **SHOULD** be recorded as the `container.label.app` attribute with value `"nginx"`. + ### Examples ``` - ["container.label.app=nginx"] + ["nginx"] ``` @@ -386,6 +464,47 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do :"container.name" end + @deprecated """ + Replaced by `container.runtime.name`. + """ + @spec container_runtime :: :"container.runtime" + def container_runtime do + :"container.runtime" + end + + @doc """ + A description about the runtime which could include, for example details about the CRI/API version being used or other customisations. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["docker://19.3.1 - CRI: 1.22.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime_description() + :"container.runtime.description" + + ### Erlang + + ```erlang + ?CONTAINER_RUNTIME_DESCRIPTION. + 'container.runtime.description' + ``` + + + """ + @spec container_runtime_description :: :"container.runtime.description" + def container_runtime_description do + :"container.runtime.description" + end + @doc """ The container runtime managing this container. @@ -402,20 +521,53 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime() - :"container.runtime" + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime_name() + :"container.runtime.name" ### Erlang ```erlang - ?CONTAINER_RUNTIME. - 'container.runtime' + ?CONTAINER_RUNTIME_NAME. + 'container.runtime.name' ``` """ - @spec container_runtime :: :"container.runtime" - def container_runtime do - :"container.runtime" + @spec container_runtime_name :: :"container.runtime.name" + def container_runtime_name do + :"container.runtime.name" + end + + @doc """ + The version of the runtime of this process, as returned by the runtime without modification. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + 1.0.0 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ContainerAttributes.container_runtime_version() + :"container.runtime.version" + + ### Erlang + + ```erlang + ?CONTAINER_RUNTIME_VERSION. + 'container.runtime.version' + ``` + + + """ + @spec container_runtime_version :: :"container.runtime.version" + def container_runtime_version do + :"container.runtime.version" end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex index b953cb15e..a46c603a4 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex @@ -4,18 +4,50 @@ defmodule OpenTelemetry.SemConv.Incubating.CpuAttributes do OpenTelemetry Semantic Conventions for Cpu attributes. """ + @doc """ + The logical CPU number [0..n-1] + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_logical_number() + :"cpu.logical_number" + + ### Erlang + + ```erlang + ?CPU_LOGICAL_NUMBER. + 'cpu.logical_number' + ``` + + + """ + @spec cpu_logical_number :: :"cpu.logical_number" + def cpu_logical_number do + :"cpu.logical_number" + end + @typedoc """ The mode of the CPU ### Enum Values - * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:kernel` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - User + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - System + * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Nice + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Idle + * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IO Wait + * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Interrupt + * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Steal + * `:kernel` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Kernel """ @type cpu_mode_values() :: %{ :user => :user, diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpython_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpython_attributes.ex new file mode 100644 index 000000000..d00d85aa2 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpython_attributes.ex @@ -0,0 +1,70 @@ +defmodule OpenTelemetry.SemConv.Incubating.CpythonAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cpython attributes. + """ + + @typedoc """ + Value of the garbage collector collection generation. + + ### Enum Values + * `:generation_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Generation 0 + * `:generation_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Generation 1 + * `:generation_2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Generation 2 + """ + @type cpython_gc_generation_values() :: %{ + :generation_0 => 0, + :generation_1 => 1, + :generation_2 => 2 + } + @doc """ + Value of the garbage collector collection generation. + + ### Examples + + ``` + [0, 1, 2] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.CpythonAttributes.cpython_gc_generation() + :"cpython.gc.generation" + + iex> OpenTelemetry.SemConv.Incubating.CpythonAttributes.cpython_gc_generation_values().generation_0 + 0 + + iex> %{OpenTelemetry.SemConv.Incubating.CpythonAttributes.cpython_gc_generation() => OpenTelemetry.SemConv.Incubating.CpythonAttributes.cpython_gc_generation_values().generation_0} + %{:"cpython.gc.generation" => 0} + + ### Erlang + + ```erlang + ?CPYTHON_GC_GENERATION. + 'cpython.gc.generation' + + ?CPYTHON_GC_GENERATION_VALUES_GENERATION_0. + '0' + + \#{?CPYTHON_GC_GENERATION => ?CPYTHON_GC_GENERATION_VALUES_GENERATION_0}. + \#{'cpython.gc.generation' => '0'} + ``` + + + """ + @spec cpython_gc_generation :: :"cpython.gc.generation" + def cpython_gc_generation do + :"cpython.gc.generation" + end + + @spec cpython_gc_generation_values() :: cpython_gc_generation_values() + def cpython_gc_generation_values() do + %{ + :generation_0 => 0, + :generation_1 => 1, + :generation_2 => 2 + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex index 7cc22a876..84364f01b 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex @@ -3,23 +3,41 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do @moduledoc """ OpenTelemetry Semantic Conventions for DB attributes. """ + defdelegate db_collection_name(), to: OpenTelemetry.SemConv.DBAttributes - @typedoc """ - 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). + defdelegate db_namespace(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_operation_batch_size(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_operation_name(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_query_summary(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_query_text(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_response_status_code(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_stored_procedure_name(), to: OpenTelemetry.SemConv.DBAttributes + + defdelegate db_system_name(), to: OpenTelemetry.SemConv.DBAttributes + defdelegate db_system_name_values(), to: OpenTelemetry.SemConv.DBAttributes + + @typedoc """ + Deprecated, use `cassandra.consistency.level` instead. ### Enum Values - * `:all` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:each_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:local_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:two` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:three` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:local_one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:any` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:local_serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:all` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:each_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:local_quorum` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:two` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:three` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:local_one` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:any` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:local_serial` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type db_cassandra_consistency_level_values() :: %{ :all => :all, @@ -34,38 +52,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :serial => :serial, :local_serial => :local_serial } - @doc """ - 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). - - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level() - :"db.cassandra.consistency_level" - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level_values().all - :all - - iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_consistency_level_values().all} - %{:"db.cassandra.consistency_level" => :all} - - ### Erlang - - ```erlang - ?DB_CASSANDRA_CONSISTENCY_LEVEL. - 'db.cassandra.consistency_level' - - ?DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL. - 'all' - - \#{?DB_CASSANDRA_CONSISTENCY_LEVEL => ?DB_CASSANDRA_CONSISTENCY_LEVEL_VALUES_ALL}. - \#{'db.cassandra.consistency_level' => 'all'} - ``` - - + @deprecated """ + Replaced by `cassandra.consistency.level`. """ @spec db_cassandra_consistency_level :: :"db.cassandra.consistency_level" def db_cassandra_consistency_level do @@ -89,160 +77,40 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do } end - @doc """ - The data center of the coordinating node for a query. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - us-west-2 - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_coordinator_dc() - :"db.cassandra.coordinator.dc" - - ### Erlang - - ```erlang - ?DB_CASSANDRA_COORDINATOR_DC. - 'db.cassandra.coordinator.dc' - ``` - - + @deprecated """ + Replaced by `cassandra.coordinator.dc`. """ @spec db_cassandra_coordinator_dc :: :"db.cassandra.coordinator.dc" def db_cassandra_coordinator_dc do :"db.cassandra.coordinator.dc" end - @doc """ - The ID of the coordinating node for a query. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - be13faa2-8574-4d71-926d-27f16cf8a7af - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_coordinator_id() - :"db.cassandra.coordinator.id" - - ### Erlang - - ```erlang - ?DB_CASSANDRA_COORDINATOR_ID. - 'db.cassandra.coordinator.id' - ``` - - + @deprecated """ + Replaced by `cassandra.coordinator.id`. """ @spec db_cassandra_coordinator_id :: :"db.cassandra.coordinator.id" def db_cassandra_coordinator_id do :"db.cassandra.coordinator.id" end - @doc """ - Whether or not the query is idempotent. - - ### Value type - - Value must be of type `boolean()`. - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_idempotence() - :"db.cassandra.idempotence" - - ### Erlang - - ```erlang - ?DB_CASSANDRA_IDEMPOTENCE. - 'db.cassandra.idempotence' - ``` - - + @deprecated """ + Replaced by `cassandra.query.idempotent`. """ @spec db_cassandra_idempotence :: :"db.cassandra.idempotence" def db_cassandra_idempotence do :"db.cassandra.idempotence" end - @doc """ - The fetch size used for paging, i.e. how many rows will be returned at once. - - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [5000] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_page_size() - :"db.cassandra.page_size" - - ### Erlang - - ```erlang - ?DB_CASSANDRA_PAGE_SIZE. - 'db.cassandra.page_size' - ``` - - + @deprecated """ + Replaced by `cassandra.page.size`. """ @spec db_cassandra_page_size :: :"db.cassandra.page_size" def db_cassandra_page_size do :"db.cassandra.page_size" end - @doc """ - The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [0, 2] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cassandra_speculative_execution_count() - :"db.cassandra.speculative_execution_count" - - ### Erlang - - ```erlang - ?DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT. - 'db.cassandra.speculative_execution_count' - ``` - - + @deprecated """ + Replaced by `cassandra.speculative_execution.count`. """ @spec db_cassandra_speculative_execution_count :: :"db.cassandra.speculative_execution_count" def db_cassandra_speculative_execution_count do @@ -294,8 +162,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do The state of a connection in the pool ### Enum Values - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type db_client_connection_state_values() :: %{ :idle => :idle, @@ -363,8 +231,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do Deprecated, use `db.client.connection.state` instead. ### Enum Values - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type db_client_connections_state_values() :: %{ :idle => :idle, @@ -386,46 +254,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do } end - @doc """ - The name of a collection (table, container) within the database. - ### Value type - - Value must be of type `atom() | String.t()`. - ### Notes - - It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. - If the collection name is parsed from the query text, it **SHOULD** be the first collection name found in the query and it **SHOULD** match the value provided in the query text including any schema and database name prefix. - For batch operations, if the individual operations are known to have the same collection name then that collection name **SHOULD** be used, otherwise `db.collection.name` **SHOULD** **NOT** be captured. - - ### Examples - - ``` - ["public.users", "customers"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_collection_name() - :"db.collection.name" - - ### Erlang - - ```erlang - ?DB_COLLECTION_NAME. - 'db.collection.name' - ``` - - - """ - @spec db_collection_name :: :"db.collection.name" - def db_collection_name do - :"db.collection.name" - end - @deprecated """ - "Replaced by `server.address` and `server.port`." + Replaced by `server.address` and `server.port`. """ @spec db_connection_string :: :"db.connection_string" @@ -433,32 +263,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :"db.connection_string" end - @doc """ - Unique Cosmos client instance id. - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - 3ba4827d-4422-483f-b59f-85b74211c11d - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_client_id() - :"db.cosmosdb.client_id" - - ### Erlang - - ```erlang - ?DB_COSMOSDB_CLIENT_ID. - 'db.cosmosdb.client_id' - ``` - - + @deprecated """ + Replaced by `azure.client.id`. """ @spec db_cosmosdb_client_id :: :"db.cosmosdb.client_id" def db_cosmosdb_client_id do @@ -466,47 +272,18 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @typedoc """ - Cosmos client connection mode. + Deprecated, use `azure.cosmosdb.connection.mode` instead. ### Enum Values - * `:gateway` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gateway (HTTP) connections mode + * `:gateway` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gateway (HTTP) connection. * `:direct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Direct connection. """ @type db_cosmosdb_connection_mode_values() :: %{ :gateway => :gateway, :direct => :direct } - @doc """ - Cosmos client connection mode. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode() - :"db.cosmosdb.connection_mode" - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode_values().gateway - :gateway - - iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_connection_mode_values().gateway} - %{:"db.cosmosdb.connection_mode" => :gateway} - - ### Erlang - - ```erlang - ?DB_COSMOSDB_CONNECTION_MODE. - 'db.cosmosdb.connection_mode' - - ?DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY. - 'gateway' - - \#{?DB_COSMOSDB_CONNECTION_MODE => ?DB_COSMOSDB_CONNECTION_MODE_VALUES_GATEWAY}. - \#{'db.cosmosdb.connection_mode' => 'gateway'} - ``` - - + @deprecated """ + Replaced by `azure.cosmosdb.connection.mode`. """ @spec db_cosmosdb_connection_mode :: :"db.cosmosdb.connection_mode" def db_cosmosdb_connection_mode do @@ -521,6 +298,42 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do } end + @typedoc """ + Deprecated, use `cosmosdb.consistency.level` instead. + + ### Enum Values + * `:strong` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:bounded_staleness` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:session` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:eventual` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:consistent_prefix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type db_cosmosdb_consistency_level_values() :: %{ + :strong => :Strong, + :bounded_staleness => :BoundedStaleness, + :session => :Session, + :eventual => :Eventual, + :consistent_prefix => :ConsistentPrefix + } + @deprecated """ + Replaced by `azure.cosmosdb.consistency.level`. + """ + @spec db_cosmosdb_consistency_level :: :"db.cosmosdb.consistency_level" + def db_cosmosdb_consistency_level do + :"db.cosmosdb.consistency_level" + end + + @spec db_cosmosdb_consistency_level_values() :: db_cosmosdb_consistency_level_values() + def db_cosmosdb_consistency_level_values() do + %{ + :strong => :Strong, + :bounded_staleness => :BoundedStaleness, + :session => :Session, + :eventual => :Eventual, + :consistent_prefix => :ConsistentPrefix + } + end + @deprecated """ Replaced by `db.collection.name`. """ @@ -530,73 +343,45 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @typedoc """ - CosmosDB Operation Type. + Deprecated, no replacement at this time. ### Enum Values - * `:invalid` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:patch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:read_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:replace` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:execute` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:head` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:head_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:upsert` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:batch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:query_plan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:execute_javascript` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:batch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:execute` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:execute_javascript` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:invalid` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:head` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:head_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:patch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:query_plan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:read_feed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:replace` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:upsert` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type db_cosmosdb_operation_type_values() :: %{ - :invalid => :Invalid, - :create => :Create, - :patch => :Patch, - :read => :Read, - :read_feed => :ReadFeed, - :delete => :Delete, - :replace => :Replace, - :execute => :Execute, - :query => :Query, - :head => :Head, - :head_feed => :HeadFeed, - :upsert => :Upsert, - :batch => :Batch, - :query_plan => :QueryPlan, - :execute_javascript => :ExecuteJavaScript + :batch => :batch, + :create => :create, + :delete => :delete, + :execute => :execute, + :execute_javascript => :execute_javascript, + :invalid => :invalid, + :head => :head, + :head_feed => :head_feed, + :patch => :patch, + :query => :query, + :query_plan => :query_plan, + :read => :read, + :read_feed => :read_feed, + :replace => :replace, + :upsert => :upsert } - @doc """ - CosmosDB Operation Type. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type() - :"db.cosmosdb.operation_type" - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type_values().invalid - :Invalid - - iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_operation_type_values().invalid} - %{:"db.cosmosdb.operation_type" => :Invalid} - - ### Erlang - - ```erlang - ?DB_COSMOSDB_OPERATION_TYPE. - 'db.cosmosdb.operation_type' - - ?DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID. - 'Invalid' - - \#{?DB_COSMOSDB_OPERATION_TYPE => ?DB_COSMOSDB_OPERATION_TYPE_VALUES_INVALID}. - \#{'db.cosmosdb.operation_type' => 'Invalid'} - ``` + @deprecated """ + Removed, no replacement at this time. - """ @spec db_cosmosdb_operation_type :: :"db.cosmosdb.operation_type" def db_cosmosdb_operation_type do @@ -606,141 +391,58 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do @spec db_cosmosdb_operation_type_values() :: db_cosmosdb_operation_type_values() def db_cosmosdb_operation_type_values() do %{ - :invalid => :Invalid, - :create => :Create, - :patch => :Patch, - :read => :Read, - :read_feed => :ReadFeed, - :delete => :Delete, - :replace => :Replace, - :execute => :Execute, - :query => :Query, - :head => :Head, - :head_feed => :HeadFeed, - :upsert => :Upsert, - :batch => :Batch, - :query_plan => :QueryPlan, - :execute_javascript => :ExecuteJavaScript + :batch => :batch, + :create => :create, + :delete => :delete, + :execute => :execute, + :execute_javascript => :execute_javascript, + :invalid => :invalid, + :head => :head, + :head_feed => :head_feed, + :patch => :patch, + :query => :query, + :query_plan => :query_plan, + :read => :read, + :read_feed => :read_feed, + :replace => :replace, + :upsert => :upsert } end - @doc """ - RU consumed for that operation - ### Value type - - Value must be of type `float()`. - ### Examples - - ``` - [46.18, 1.0] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_request_charge() - :"db.cosmosdb.request_charge" - - ### Erlang - - ```erlang - ?DB_COSMOSDB_REQUEST_CHARGE. - 'db.cosmosdb.request_charge' - ``` + @deprecated """ + Replaced by `azure.cosmosdb.operation.contacted_regions`. + """ + @spec db_cosmosdb_regions_contacted :: :"db.cosmosdb.regions_contacted" + def db_cosmosdb_regions_contacted do + :"db.cosmosdb.regions_contacted" + end - + @deprecated """ + Replaced by `azure.cosmosdb.operation.request_charge`. """ @spec db_cosmosdb_request_charge :: :"db.cosmosdb.request_charge" def db_cosmosdb_request_charge do :"db.cosmosdb.request_charge" end - @doc """ - Request payload size in bytes - ### Value type - - Value must be of type `integer()`. - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_request_content_length() - :"db.cosmosdb.request_content_length" - - ### Erlang - - ```erlang - ?DB_COSMOSDB_REQUEST_CONTENT_LENGTH. - 'db.cosmosdb.request_content_length' - ``` - - + @deprecated """ + Replaced by `azure.cosmosdb.request.body.size`. """ @spec db_cosmosdb_request_content_length :: :"db.cosmosdb.request_content_length" def db_cosmosdb_request_content_length do :"db.cosmosdb.request_content_length" end - @doc """ - Cosmos DB status code. - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [200, 201] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_status_code() - :"db.cosmosdb.status_code" - - ### Erlang - - ```erlang - ?DB_COSMOSDB_STATUS_CODE. - 'db.cosmosdb.status_code' - ``` - - + @deprecated """ + Use `db.response.status_code` instead. """ @spec db_cosmosdb_status_code :: :"db.cosmosdb.status_code" def db_cosmosdb_status_code do :"db.cosmosdb.status_code" end - @doc """ - Cosmos DB sub status code. - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [1000, 1002] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_cosmosdb_sub_status_code() - :"db.cosmosdb.sub_status_code" - - ### Erlang - - ```erlang - ?DB_COSMOSDB_SUB_STATUS_CODE. - 'db.cosmosdb.sub_status_code' - ``` - - + @deprecated """ + Replaced by `azure.cosmosdb.response.sub_status_code`. """ @spec db_cosmosdb_sub_status_code :: :"db.cosmosdb.sub_status_code" def db_cosmosdb_sub_status_code do @@ -755,70 +457,16 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :"db.elasticsearch.cluster.name" end - @doc """ - Represents the human-readable identifier of the node/instance to which a request was routed. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - ["instance-0000000001"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_elasticsearch_node_name() - :"db.elasticsearch.node.name" - - ### Erlang - - ```erlang - ?DB_ELASTICSEARCH_NODE_NAME. - 'db.elasticsearch.node.name' - ``` - - + @deprecated """ + Replaced by `elasticsearch.node.name`. """ @spec db_elasticsearch_node_name :: :"db.elasticsearch.node.name" def db_elasticsearch_node_name do :"db.elasticsearch.node.name" end - @doc """ - A dynamic value in the url path. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Notes - - Many Elasticsearch url paths allow dynamic values. These **SHOULD** be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation **SHOULD** reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. - - ### Examples - - ``` - ["db.elasticsearch.path_parts.index=test-index", "db.elasticsearch.path_parts.doc_id=123"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_elasticsearch_path_parts() - :"db.elasticsearch.path_parts" - - ### Erlang - - ```erlang - ?DB_ELASTICSEARCH_PATH_PARTS. - 'db.elasticsearch.path_parts' - ``` - - + @deprecated """ + Replaced by `db.operation.parameter`. """ @spec db_elasticsearch_path_parts :: :"db.elasticsearch.path_parts" def db_elasticsearch_path_parts do @@ -826,7 +474,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @deprecated """ - Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. + Removed, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. + """ @spec db_instance_id :: :"db.instance.id" def db_instance_id do @@ -834,7 +483,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @deprecated """ - Removed as not used. + Removed, no replacement at this time. + """ @spec db_jdbc_driver_classname :: :"db.jdbc.driver_classname" def db_jdbc_driver_classname do @@ -850,7 +500,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @deprecated """ - Deprecated, no replacement at this time. + Removed, no replacement at this time. """ @spec db_mssql_instance_name :: :"db.mssql.instance_name" def db_mssql_instance_name do @@ -865,45 +515,6 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :"db.name" end - @doc """ - The name of the database, fully qualified within the server address and port. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Notes - - If a database system has multiple namespace components, they **SHOULD** be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces **SHOULD** **NOT** be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid. - Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system. - It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. - - ### Examples - - ``` - ["customers", "test.users"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_namespace() - :"db.namespace" - - ### Erlang - - ```erlang - ?DB_NAMESPACE. - 'db.namespace' - ``` - - - """ - @spec db_namespace :: :"db.namespace" - def db_namespace do - :"db.namespace" - end - @deprecated """ Replaced by `db.operation.name`. """ @@ -913,90 +524,72 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @doc """ - The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). + A database operation parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. + ### Value type - Value must be of type `integer()`. + Value must be of type `atom() | String.t()`. ### Notes - Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` **SHOULD** never be `1`. + For example, a client-side maximum number of rows to read from the database + **MAY** be recorded as the `db.operation.parameter.max_rows` attribute. + + `db.query.text` parameters **SHOULD** be captured using `db.query.parameter.` + instead of `db.operation.parameter.`. ### Examples ``` - [2, 3, 4] + ["someval", "55"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_batch_size() - :"db.operation.batch.size" + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_parameter() + :"db.operation.parameter" ### Erlang ```erlang - ?DB_OPERATION_BATCH_SIZE. - 'db.operation.batch.size' + ?DB_OPERATION_PARAMETER. + 'db.operation.parameter' ``` """ - @spec db_operation_batch_size :: :"db.operation.batch.size" - def db_operation_batch_size do - :"db.operation.batch.size" + @spec db_operation_parameter :: :"db.operation.parameter" + def db_operation_parameter do + :"db.operation.parameter" end @doc """ - The name of the operation or command being executed. + A database query parameter, with `` being the parameter name, and the attribute value being a string representation of the parameter value. ### Value type Value must be of type `atom() | String.t()`. ### Notes - It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. - If the operation name is parsed from the query text, it **SHOULD** be the first operation name found in the query. - For batch operations, if the individual operations are known to have the same operation name then that operation name **SHOULD** be used prepended by `BATCH `, otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database system specific term if more applicable. + If a query parameter has no name and instead is referenced only by index, + then `` **SHOULD** be the 0-based index. - ### Examples + `db.query.parameter.` **SHOULD** match + up with the parameterized placeholders present in `db.query.text`. - ``` - ["findAndModify", "HMSET", "SELECT"] - ``` + It is RECOMMENDED to capture the value as provided by the application + without attempting to do any case normalization. - + `db.query.parameter.` **SHOULD** **NOT** be captured on batch operations. - ### Elixir + Examples: - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_name() - :"db.operation.name" + - For a query `SELECT * FROM users where username = %s` with the parameter `"jdoe"`, + the attribute `db.query.parameter.0` **SHOULD** be set to `"jdoe"`. - ### Erlang - - ```erlang - ?DB_OPERATION_NAME. - 'db.operation.name' - ``` - - - """ - @spec db_operation_name :: :"db.operation.name" - def db_operation_name do - :"db.operation.name" - end - - @doc """ - A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Notes - - Query parameters should only be captured when `db.query.text` is parameterized with placeholders. - If a parameter has no name and instead is referenced only by index, then `` **SHOULD** be the 0-based index. + - For a query `"SELECT * FROM users WHERE username = %(userName)s;` with parameter + `userName = "jdoe"`, the attribute `db.query.parameter.userName` **SHOULD** be set to `"jdoe"`. ### Examples @@ -1025,55 +618,48 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :"db.query.parameter" end - @doc """ - The database query being executed. + @deprecated """ + Uncategorized. + """ + @spec db_redis_database_index :: :"db.redis.database_index" + def db_redis_database_index do + :"db.redis.database_index" + end + @doc """ + Number of rows returned by the operation. ### Value type - Value must be of type `atom() | String.t()`. - ### Notes - - For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). - 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 `; ` or some other database system specific separator if more applicable. - Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. - + Value must be of type `integer()`. ### Examples ``` - ["SELECT * FROM wuser_table where username = ?", "SET mykey \"WuValue\""] + [10, 30, 1000] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_query_text() - :"db.query.text" + iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_response_returned_rows() + :"db.response.returned_rows" ### Erlang ```erlang - ?DB_QUERY_TEXT. - 'db.query.text' + ?DB_RESPONSE_RETURNED_ROWS. + 'db.response.returned_rows' ``` """ - @spec db_query_text :: :"db.query.text" - def db_query_text do - :"db.query.text" + @spec db_response_returned_rows :: :"db.response.returned_rows" + def db_response_returned_rows do + :"db.response.returned_rows" end @deprecated """ - Replaced by `db.namespace`. - """ - @spec db_redis_database_index :: :"db.redis.database_index" - def db_redis_database_index do - :"db.redis.database_index" - end - - @deprecated """ - Replaced by `db.collection.name`. + Replaced by `db.collection.name`, but only if not extracting the value from `db.query.text`. """ @spec db_sql_table :: :"db.sql.table" def db_sql_table do @@ -1089,7 +675,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @typedoc """ - The database management system (DBMS) product as identified by the client instrumentation. + Deprecated, use `db.system.name` instead. ### Enum Values * `:other_sql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Some other SQL database. Fallback only. See notes. @@ -1203,41 +789,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :trino => :trino, :vertica => :vertica } - @doc """ - The database management system (DBMS) product as identified by the client instrumentation. - - ### Notes - - The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system() - :"db.system" - - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().other_sql - :other_sql - - iex> %{OpenTelemetry.SemConv.Incubating.DBAttributes.db_system() => OpenTelemetry.SemConv.Incubating.DBAttributes.db_system_values().other_sql} - %{:"db.system" => :other_sql} - - ### Erlang - - ```erlang - ?DB_SYSTEM. - 'db.system' - - ?DB_SYSTEM_VALUES_OTHER_SQL. - 'other_sql' - - \#{?DB_SYSTEM => ?DB_SYSTEM_VALUES_OTHER_SQL}. - \#{'db.system' => 'other_sql'} - ``` - - + @deprecated """ + Replaced by `db.system.name`. """ @spec db_system :: :"db.system" def db_system do @@ -1305,7 +858,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do end @deprecated """ - No replacement at this time. + Removed, no replacement at this time. """ @spec db_user :: :"db.user" def db_user do @@ -1324,8 +877,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do Deprecated, use `db.client.connection.state` instead. ### Enum Values - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type state_values() :: %{ :idle => :idle, diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex index daf364bfc..458f2ad3f 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex @@ -5,7 +5,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DeploymentAttributes do """ @deprecated """ - Deprecated, use `deployment.environment.name` instead. + Replaced by `deployment.environment.name`. """ @spec deployment_environment :: :"deployment.environment" def deployment_environment do @@ -25,8 +25,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DeploymentAttributes do This implies that resources carrying the following attribute combinations **MUST** be considered to be identifying the same service: - * `service.name=frontend`, `deployment.environment.name=production` - * `service.name=frontend`, `deployment.environment.name=staging`. + - `service.name=frontend`, `deployment.environment.name=production` + - `service.name=frontend`, `deployment.environment.name=staging`. ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex index 3e77f70fd..55018a2cb 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/device_attributes.ex @@ -12,12 +12,27 @@ defmodule OpenTelemetry.SemConv.Incubating.DeviceAttributes do Value must be of type `atom() | String.t()`. ### 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](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. + Its value **SHOULD** be identical for all apps on a device and it **SHOULD** **NOT** change if an app is uninstalled and re-installed. + However, it might be resettable by the user for all apps on a device. + Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) **MAY** be used as values. + + More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids). + + > [!WARNING] + > + > This attribute may contain sensitive (PII) information. 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. + > + > Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store. + > However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance. + > Any instrumentation providing this identifier **MUST** implement it as an opt-in feature. + > + > See [`app.installation.id`](/docs/registry/attributes/app.md#app-installation-id) for a more privacy-preserving alternative. ### Examples ``` - ["2ab2916d-a51f-4ac8-80ee-45ac31a28092"] + ["123456789012345", "01:23:45:67:89:AB"] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex index cc70bbd1e..a9135eb5c 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/disk_attributes.ex @@ -8,8 +8,8 @@ defmodule OpenTelemetry.SemConv.Incubating.DiskAttributes do The disk IO operation direction. ### Enum Values - * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:write` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:write` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type disk_io_direction_values() :: %{ :read => :read, diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex index 0931ca238..8918442f7 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/dns_attributes.ex @@ -4,6 +4,38 @@ defmodule OpenTelemetry.SemConv.Incubating.DNSAttributes do OpenTelemetry Semantic Conventions for DNS attributes. """ + @doc """ + The list of IPv4 or IPv6 addresses resolved during DNS lookup. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + [["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.DNSAttributes.dns_answers() + :"dns.answers" + + ### Erlang + + ```erlang + ?DNS_ANSWERS. + 'dns.answers' + ``` + + + """ + @spec dns_answers :: :"dns.answers" + def dns_answers do + :"dns.answers" + end + @doc """ The name being queried. ### Value type @@ -11,7 +43,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DNSAttributes do Value must be of type `atom() | String.t()`. ### Notes - If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. + The name represents the queried domain name as it appears in the DNS query without any additional normalization. ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/elasticsearch_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/elasticsearch_attributes.ex new file mode 100644 index 000000000..da0fd6d0f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/elasticsearch_attributes.ex @@ -0,0 +1,39 @@ +defmodule OpenTelemetry.SemConv.Incubating.ElasticsearchAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Elasticsearch attributes. + """ + + @doc """ + Represents the human-readable identifier of the node/instance to which a request was routed. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["instance-0000000001"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ElasticsearchAttributes.elasticsearch_node_name() + :"elasticsearch.node.name" + + ### Erlang + + ```erlang + ?ELASTICSEARCH_NODE_NAME. + 'elasticsearch.node.name' + ``` + + + """ + @spec elasticsearch_node_name :: :"elasticsearch.node.name" + def elasticsearch_node_name do + :"elasticsearch.node.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex index 6afd155d7..5b29fec08 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex @@ -4,16 +4,87 @@ defmodule OpenTelemetry.SemConv.Incubating.EnduserAttributes do OpenTelemetry Semantic Conventions for Enduser attributes. """ - @deprecated """ - Replaced by `user.id` attribute. + @doc """ + Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Unique identifier of an end user in the system. + + > [!Warning] + > This field contains sensitive (PII) information. + + ### Examples + + ``` + ["username"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.EnduserAttributes.enduser_id() + :"enduser.id" + + ### Erlang + + ```erlang + ?ENDUSER_ID. + 'enduser.id' + ``` + + """ @spec enduser_id :: :"enduser.id" def enduser_id do :"enduser.id" end + @doc """ + 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. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Pseudonymous identifier of an end user. + + > [!Warning] + > This field contains sensitive (linkable PII) information. + + ### Examples + + ``` + ["QdH5CAWJgqVT4rOr0qtumf"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.EnduserAttributes.enduser_pseudo_id() + :"enduser.pseudo.id" + + ### Erlang + + ```erlang + ?ENDUSER_PSEUDO_ID. + 'enduser.pseudo.id' + ``` + + + """ + @spec enduser_pseudo_id :: :"enduser.pseudo.id" + def enduser_pseudo_id do + :"enduser.pseudo.id" + end + @deprecated """ - Replaced by `user.roles` attribute. + Use `user.roles` instead. """ @spec enduser_role :: :"enduser.role" def enduser_role do @@ -21,7 +92,7 @@ defmodule OpenTelemetry.SemConv.Incubating.EnduserAttributes do end @deprecated """ - Removed. + Removed, no replacement at this time. """ @spec enduser_scope :: :"enduser.scope" def enduser_scope do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/error_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/error_attributes.ex new file mode 100644 index 000000000..8fc53f30f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/error_attributes.ex @@ -0,0 +1,14 @@ +defmodule OpenTelemetry.SemConv.Incubating.ErrorAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Error attributes. + """ + + @deprecated """ + Use domain-specific error message attribute. For example, use `feature_flag.error.message` for feature flag errors. + """ + @spec error_message :: :"error.message" + def error_message do + :"error.message" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex index 521f4aebc..82e05ef49 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/event_attributes.ex @@ -4,37 +4,9 @@ defmodule OpenTelemetry.SemConv.Incubating.EventAttributes do OpenTelemetry Semantic Conventions for Event attributes. """ - @doc """ - Identifies the class / type of event. + @deprecated """ + The value of this attribute MUST now be set as the value of the EventName field on the LogRecord to indicate that the LogRecord represents an Event. - ### Value type - - Value must be of type `atom() | String.t()`. - ### Notes - - Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. - - ### Examples - - ``` - ["browser.mouse.click", "device.app.lifecycle"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.EventAttributes.event_name() - :"event.name" - - ### Erlang - - ```erlang - ?EVENT_NAME. - 'event.name' - ``` - - """ @spec event_name :: :"event.name" def event_name do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex index d8b013479..69b3b662e 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/faas_attributes.ex @@ -231,7 +231,7 @@ defmodule OpenTelemetry.SemConv.Incubating.FAASAttributes do Value must be of type `atom() | String.t()`. ### Notes - * **AWS Lambda:** Use the (full) log stream name. + - **AWS Lambda:** Use the (full) log stream name. ### Examples @@ -486,14 +486,14 @@ defmodule OpenTelemetry.SemConv.Incubating.FAASAttributes do 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`](/docs/general/attributes.md#source-code-attributes) + [`code.namespace`/`code.function.name`](/docs/general/attributes.md#source-code-attributes) span attributes). For some cloud providers, the above definition is ambiguous. The following definition of function name **MUST** be used for this attribute (and consequently the span name) for the listed cloud providers/products: - * **Azure:** The full name `/`, i.e., function app name + - **Azure:** The full name `/`, i.e., function app name followed by a forward slash followed by the function name (this form can also be seen in the resource JSON for the function). This means that a span attribute **MUST** be used, as an Azure function @@ -636,13 +636,13 @@ defmodule OpenTelemetry.SemConv.Incubating.FAASAttributes do Depending on the cloud provider and platform, use: - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + - **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 (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions) + - **Google Cloud Run (Services):** 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. + - **Google Cloud Functions:** The value of the + [`K_REVISION` environment variable](https://cloud.google.com/run/docs/container-contract#services-env-vars). + - **Azure Functions:** Not applicable. Do not set this attribute. ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex index b4a893109..a10db8f6c 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/feature_flag_attributes.ex @@ -5,7 +5,129 @@ defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do """ @doc """ - The unique identifier of the feature flag. + The unique identifier for the flag evaluation context. For example, the targeting key. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["5157782b-2203-4c80-a857-dbbd5e7761db"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_context_id() + :"feature_flag.context.id" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_CONTEXT_ID. + 'feature_flag.context.id' + ``` + + + """ + @spec feature_flag_context_id :: :"feature_flag.context.id" + def feature_flag_context_id do + :"feature_flag.context.id" + end + + @doc """ + A message providing more detail about an error that occurred during feature flag evaluation in human-readable form. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Unexpected input type: string", "The user has exceeded their storage quota"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_error_message() + :"feature_flag.error.message" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_ERROR_MESSAGE. + 'feature_flag.error.message' + ``` + + + """ + @spec feature_flag_error_message :: :"feature_flag.error.message" + def feature_flag_error_message do + :"feature_flag.error.message" + end + + @deprecated """ + Replaced by `feature_flag.error.message`. + """ + @spec feature_flag_evaluation_error_message :: :"feature_flag.evaluation.error.message" + def feature_flag_evaluation_error_message do + :"feature_flag.evaluation.error.message" + end + + @typedoc """ + Deprecated, use `feature_flag.result.reason` instead. + + ### Enum Values + * `:static` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value is static (no dynamic evaluation). + * `:default` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic evaluation yielded no result). + * `:targeting_match` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. + * `:split` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of pseudorandom assignment. + * `:cached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was retrieved from cache. + * `:disabled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of the flag being disabled in the management system. + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The reason for the resolved value could not be determined. + * `:stale` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value is non-authoritative or possibly out of date + * `:error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of an error. + """ + @type feature_flag_evaluation_reason_values() :: %{ + :static => :static, + :default => :default, + :targeting_match => :targeting_match, + :split => :split, + :cached => :cached, + :disabled => :disabled, + :unknown => :unknown, + :stale => :stale, + :error => :error + } + @deprecated """ + Replaced by `feature_flag.result.reason`. + """ + @spec feature_flag_evaluation_reason :: :"feature_flag.evaluation.reason" + def feature_flag_evaluation_reason do + :"feature_flag.evaluation.reason" + end + + @spec feature_flag_evaluation_reason_values() :: feature_flag_evaluation_reason_values() + def feature_flag_evaluation_reason_values() do + %{ + :static => :static, + :default => :default, + :targeting_match => :targeting_match, + :split => :split, + :cached => :cached, + :disabled => :disabled, + :unknown => :unknown, + :stale => :stale, + :error => :error + } + end + + @doc """ + The lookup key of the feature flag. ### Value type Value must be of type `atom() | String.t()`. @@ -37,7 +159,7 @@ defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do end @doc """ - The name of the service provider that performs the flag evaluation. + Identifies the feature flag provider. ### Value type Value must be of type `atom() | String.t()`. @@ -52,24 +174,146 @@ defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do ### Elixir iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_provider_name() - :"feature_flag.provider_name" + :"feature_flag.provider.name" ### Erlang ```erlang ?FEATURE_FLAG_PROVIDER_NAME. - 'feature_flag.provider_name' + 'feature_flag.provider.name' ``` """ - @spec feature_flag_provider_name :: :"feature_flag.provider_name" + @spec feature_flag_provider_name :: :"feature_flag.provider.name" def feature_flag_provider_name do - :"feature_flag.provider_name" + :"feature_flag.provider.name" + end + + @typedoc """ + The reason code which shows how a feature flag value was determined. + + + ### Enum Values + * `:static` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value is static (no dynamic evaluation). + * `:default` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value fell back to a pre-configured value (no dynamic evaluation occurred or dynamic evaluation yielded no result). + * `:targeting_match` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. + * `:split` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of pseudorandom assignment. + * `:cached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was retrieved from cache. + * `:disabled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of the flag being disabled in the management system. + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The reason for the resolved value could not be determined. + * `:stale` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value is non-authoritative or possibly out of date + * `:error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The resolved value was the result of an error. + """ + @type feature_flag_result_reason_values() :: %{ + :static => :static, + :default => :default, + :targeting_match => :targeting_match, + :split => :split, + :cached => :cached, + :disabled => :disabled, + :unknown => :unknown, + :stale => :stale, + :error => :error + } + @doc """ + The reason code which shows how a feature flag value was determined. + + + ### Examples + + ``` + ["static", "targeting_match", "error", "default"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_reason() + :"feature_flag.result.reason" + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_reason_values().static + :static + + iex> %{OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_reason() => OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_reason_values().static} + %{:"feature_flag.result.reason" => :static} + + ### Erlang + + ```erlang + ?FEATURE_FLAG_RESULT_REASON. + 'feature_flag.result.reason' + + ?FEATURE_FLAG_RESULT_REASON_VALUES_STATIC. + 'static' + + \#{?FEATURE_FLAG_RESULT_REASON => ?FEATURE_FLAG_RESULT_REASON_VALUES_STATIC}. + \#{'feature_flag.result.reason' => 'static'} + ``` + + + """ + @spec feature_flag_result_reason :: :"feature_flag.result.reason" + def feature_flag_result_reason do + :"feature_flag.result.reason" + end + + @spec feature_flag_result_reason_values() :: feature_flag_result_reason_values() + def feature_flag_result_reason_values() do + %{ + :static => :static, + :default => :default, + :targeting_match => :targeting_match, + :split => :split, + :cached => :cached, + :disabled => :disabled, + :unknown => :unknown, + :stale => :stale, + :error => :error + } + end + + @doc """ + The evaluated value of the feature flag. + + ### Notes + + With some feature flag providers, feature flag results can be quite large or contain private or sensitive details. + Because of this, `feature_flag.result.variant` is often the preferred attribute if it is available. + + It may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible. + Because the evaluated flag value is unstructured and may be any type, it is left to the instrumentation author to determine how best to achieve this. + + ### Examples + + ``` + ["#ff0000", true, 3] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_value() + :"feature_flag.result.value" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_RESULT_VALUE. + 'feature_flag.result.value' + ``` + + + """ + @spec feature_flag_result_value :: :"feature_flag.result.value" + def feature_flag_result_value do + :"feature_flag.result.value" end @doc """ - SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. + A semantic identifier for an evaluated flag value. ### Value type @@ -80,10 +324,6 @@ defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do for referring to a value without including the value itself. This can provide additional context for understanding the meaning behind a value. For example, the variant `red` maybe be used for the value `#c05543`. - - A stringified version of the value can be used in situations where a - semantic identifier is unavailable. String representation of the value - should be determined by the implementer. ### Examples ``` @@ -94,20 +334,94 @@ defmodule OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_variant() - :"feature_flag.variant" + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_result_variant() + :"feature_flag.result.variant" ### Erlang ```erlang - ?FEATURE_FLAG_VARIANT. - 'feature_flag.variant' + ?FEATURE_FLAG_RESULT_VARIANT. + 'feature_flag.result.variant' ``` """ + @spec feature_flag_result_variant :: :"feature_flag.result.variant" + def feature_flag_result_variant do + :"feature_flag.result.variant" + end + + @doc """ + The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["proj-1", "ab98sgs", "service1/dev"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_set_id() + :"feature_flag.set.id" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_SET_ID. + 'feature_flag.set.id' + ``` + + + """ + @spec feature_flag_set_id :: :"feature_flag.set.id" + def feature_flag_set_id do + :"feature_flag.set.id" + end + + @deprecated """ + Replaced by `feature_flag.result.variant`. + """ @spec feature_flag_variant :: :"feature_flag.variant" def feature_flag_variant do :"feature_flag.variant" end + + @doc """ + The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1", "01ABCDEF"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FeatureFlagAttributes.feature_flag_version() + :"feature_flag.version" + + ### Erlang + + ```erlang + ?FEATURE_FLAG_VERSION. + 'feature_flag.version' + ``` + + + """ + @spec feature_flag_version :: :"feature_flag.version" + def feature_flag_version do + :"feature_flag.version" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex index 8f9608038..2b8299ec1 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/file_attributes.ex @@ -4,6 +4,154 @@ defmodule OpenTelemetry.SemConv.Incubating.FileAttributes do OpenTelemetry Semantic Conventions for File attributes. """ + @doc """ + Time when the file was last accessed, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc. + + ### Examples + + ``` + ["2021-01-01T12:00:00Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_accessed() + :"file.accessed" + + ### Erlang + + ```erlang + ?FILE_ACCESSED. + 'file.accessed' + ``` + + + """ + @spec file_accessed :: :"file.accessed" + def file_accessed do + :"file.accessed" + end + + @doc """ + Array of file attributes. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected for this attribute: `archive`, `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, `write`. + + ### Examples + + ``` + [["readonly", "hidden"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_attributes() + :"file.attributes" + + ### Erlang + + ```erlang + ?FILE_ATTRIBUTES. + 'file.attributes' + ``` + + + """ + @spec file_attributes :: :"file.attributes" + def file_attributes do + :"file.attributes" + end + + @doc """ + Time when the file attributes or metadata was last changed, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + `file.changed` captures the time when any of the file's properties or attributes (including the content) are changed, while `file.modified` captures the timestamp when the file content is modified. + + ### Examples + + ``` + ["2021-01-01T12:00:00Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_changed() + :"file.changed" + + ### Erlang + + ```erlang + ?FILE_CHANGED. + 'file.changed' + ``` + + + """ + @spec file_changed :: :"file.changed" + def file_changed do + :"file.changed" + end + + @doc """ + Time when the file was created, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc. + + ### Examples + + ``` + ["2021-01-01T12:00:00Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_created() + :"file.created" + + ### Erlang + + ```erlang + ?FILE_CREATED. + 'file.created' + ``` + + + """ + @spec file_created :: :"file.created" + def file_created do + :"file.created" + end + @doc """ Directory where the file is located. It should include the drive letter, when appropriate. @@ -74,6 +222,209 @@ defmodule OpenTelemetry.SemConv.Incubating.FileAttributes do :"file.extension" end + @doc """ + Name of the fork. A fork is additional data associated with a filesystem object. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist. + On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name. + + ### Examples + + ``` + ["Zone.Identifier"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_fork_name() + :"file.fork_name" + + ### Erlang + + ```erlang + ?FILE_FORK_NAME. + 'file.fork_name' + ``` + + + """ + @spec file_fork_name :: :"file.fork_name" + def file_fork_name do + :"file.fork_name" + end + + @doc """ + Primary Group ID (GID) of the file. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1000"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_group_id() + :"file.group.id" + + ### Erlang + + ```erlang + ?FILE_GROUP_ID. + 'file.group.id' + ``` + + + """ + @spec file_group_id :: :"file.group.id" + def file_group_id do + :"file.group.id" + end + + @doc """ + Primary group name of the file. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["users"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_group_name() + :"file.group.name" + + ### Erlang + + ```erlang + ?FILE_GROUP_NAME. + 'file.group.name' + ``` + + + """ + @spec file_group_name :: :"file.group.name" + def file_group_name do + :"file.group.name" + end + + @doc """ + Inode representing the file in the filesystem. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["256383"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_inode() + :"file.inode" + + ### Erlang + + ```erlang + ?FILE_INODE. + 'file.inode' + ``` + + + """ + @spec file_inode :: :"file.inode" + def file_inode do + :"file.inode" + end + + @doc """ + Mode of the file in octal representation. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["0640"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_mode() + :"file.mode" + + ### Erlang + + ```erlang + ?FILE_MODE. + 'file.mode' + ``` + + + """ + @spec file_mode :: :"file.mode" + def file_mode do + :"file.mode" + end + + @doc """ + Time when the file content was last modified, in ISO 8601 format. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2021-01-01T12:00:00Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_modified() + :"file.modified" + + ### Erlang + + ```erlang + ?FILE_MODIFIED. + 'file.modified' + ``` + + + """ + @spec file_modified :: :"file.modified" + def file_modified do + :"file.modified" + end + @doc """ Name of the file including the extension, without the directory. @@ -107,6 +458,72 @@ defmodule OpenTelemetry.SemConv.Incubating.FileAttributes do :"file.name" end + @doc """ + The user ID (UID) or security identifier (SID) of the file owner. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1000"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_owner_id() + :"file.owner.id" + + ### Erlang + + ```erlang + ?FILE_OWNER_ID. + 'file.owner.id' + ``` + + + """ + @spec file_owner_id :: :"file.owner.id" + def file_owner_id do + :"file.owner.id" + end + + @doc """ + Username of the file owner. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["root"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_owner_name() + :"file.owner.name" + + ### Erlang + + ```erlang + ?FILE_OWNER_NAME. + 'file.owner.name' + ``` + + + """ + @spec file_owner_name :: :"file.owner.name" + def file_owner_name do + :"file.owner.name" + end + @doc """ Full path to the file, including the file name. It should include the drive letter, when appropriate. @@ -167,4 +584,41 @@ defmodule OpenTelemetry.SemConv.Incubating.FileAttributes do def file_size do :"file.size" end + + @doc """ + Path to the target of a symbolic link. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute is only applicable to symbolic links. + + ### Examples + + ``` + ["/usr/bin/python3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.FileAttributes.file_symbolic_link_target_path() + :"file.symbolic_link.target_path" + + ### Erlang + + ```erlang + ?FILE_SYMBOLIC_LINK_TARGET_PATH. + 'file.symbolic_link.target_path' + ``` + + + """ + @spec file_symbolic_link_target_path :: :"file.symbolic_link.target_path" + def file_symbolic_link_target_path do + :"file.symbolic_link.target_path" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex index 7026b1584..5726a9f30 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gcp_attributes.ex @@ -4,6 +4,878 @@ defmodule OpenTelemetry.SemConv.Incubating.GCPAttributes do OpenTelemetry Semantic Conventions for GCP attributes. """ + @doc """ + The container within GCP where the AppHub application is defined. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["projects/my-container-project"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_application_container() + :"gcp.apphub.application.container" + + ### Erlang + + ```erlang + ?GCP_APPHUB_APPLICATION_CONTAINER. + 'gcp.apphub.application.container' + ``` + + + """ + @spec gcp_apphub_application_container :: :"gcp.apphub.application.container" + def gcp_apphub_application_container do + :"gcp.apphub.application.container" + end + + @doc """ + The name of the application as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-application"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_application_id() + :"gcp.apphub.application.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_APPLICATION_ID. + 'gcp.apphub.application.id' + ``` + + + """ + @spec gcp_apphub_application_id :: :"gcp.apphub.application.id" + def gcp_apphub_application_id do + :"gcp.apphub.application.id" + end + + @doc """ + The GCP zone or region where the application is defined. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["us-central1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_application_location() + :"gcp.apphub.application.location" + + ### Erlang + + ```erlang + ?GCP_APPHUB_APPLICATION_LOCATION. + 'gcp.apphub.application.location' + ``` + + + """ + @spec gcp_apphub_application_location :: :"gcp.apphub.application.location" + def gcp_apphub_application_location do + :"gcp.apphub.application.location" + end + + @typedoc """ + Criticality of a service indicates its importance to the business. + + + ### Enum Values + * `:mission_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mission critical service. + * `:high` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High impact. + * `:medium` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Medium impact. + * `:low` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low impact. + """ + @type gcp_apphub_service_criticality_type_values() :: %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + @doc """ + Criticality of a service indicates its importance to the business. + + + ### Notes + + [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_criticality_type() + :"gcp.apphub.service.criticality_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_criticality_type_values().mission_critical + :MISSION_CRITICAL + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_criticality_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_criticality_type_values().mission_critical} + %{:"gcp.apphub.service.criticality_type" => :MISSION_CRITICAL} + + ### Erlang + + ```erlang + ?GCP_APPHUB_SERVICE_CRITICALITY_TYPE. + 'gcp.apphub.service.criticality_type' + + ?GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL. + 'MISSION_CRITICAL' + + \#{?GCP_APPHUB_SERVICE_CRITICALITY_TYPE => ?GCP_APPHUB_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL}. + \#{'gcp.apphub.service.criticality_type' => 'MISSION_CRITICAL'} + ``` + + + """ + @spec gcp_apphub_service_criticality_type :: :"gcp.apphub.service.criticality_type" + def gcp_apphub_service_criticality_type do + :"gcp.apphub.service.criticality_type" + end + + @spec gcp_apphub_service_criticality_type_values() :: + gcp_apphub_service_criticality_type_values() + def gcp_apphub_service_criticality_type_values() do + %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + end + + @typedoc """ + Environment of a service is the stage of a software lifecycle. + + + ### Enum Values + * `:production` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Production environment. + * `:staging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Staging environment. + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Test environment. + * `:development` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Development environment. + """ + @type gcp_apphub_service_environment_type_values() :: %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + @doc """ + Environment of a service is the stage of a software lifecycle. + + + ### Notes + + [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_environment_type() + :"gcp.apphub.service.environment_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_environment_type_values().production + :PRODUCTION + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_environment_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_environment_type_values().production} + %{:"gcp.apphub.service.environment_type" => :PRODUCTION} + + ### Erlang + + ```erlang + ?GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE. + 'gcp.apphub.service.environment_type' + + ?GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION. + 'PRODUCTION' + + \#{?GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE => ?GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION}. + \#{'gcp.apphub.service.environment_type' => 'PRODUCTION'} + ``` + + + """ + @spec gcp_apphub_service_environment_type :: :"gcp.apphub.service.environment_type" + def gcp_apphub_service_environment_type do + :"gcp.apphub.service.environment_type" + end + + @spec gcp_apphub_service_environment_type_values() :: + gcp_apphub_service_environment_type_values() + def gcp_apphub_service_environment_type_values() do + %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + end + + @doc """ + The name of the service as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-service"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_service_id() + :"gcp.apphub.service.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_SERVICE_ID. + 'gcp.apphub.service.id' + ``` + + + """ + @spec gcp_apphub_service_id :: :"gcp.apphub.service.id" + def gcp_apphub_service_id do + :"gcp.apphub.service.id" + end + + @typedoc """ + Criticality of a workload indicates its importance to the business. + + + ### Enum Values + * `:mission_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mission critical service. + * `:high` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High impact. + * `:medium` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Medium impact. + * `:low` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low impact. + """ + @type gcp_apphub_workload_criticality_type_values() :: %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + @doc """ + Criticality of a workload indicates its importance to the business. + + + ### Notes + + [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_criticality_type() + :"gcp.apphub.workload.criticality_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_criticality_type_values().mission_critical + :MISSION_CRITICAL + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_criticality_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_criticality_type_values().mission_critical} + %{:"gcp.apphub.workload.criticality_type" => :MISSION_CRITICAL} + + ### Erlang + + ```erlang + ?GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE. + 'gcp.apphub.workload.criticality_type' + + ?GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL. + 'MISSION_CRITICAL' + + \#{?GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE => ?GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL}. + \#{'gcp.apphub.workload.criticality_type' => 'MISSION_CRITICAL'} + ``` + + + """ + @spec gcp_apphub_workload_criticality_type :: :"gcp.apphub.workload.criticality_type" + def gcp_apphub_workload_criticality_type do + :"gcp.apphub.workload.criticality_type" + end + + @spec gcp_apphub_workload_criticality_type_values() :: + gcp_apphub_workload_criticality_type_values() + def gcp_apphub_workload_criticality_type_values() do + %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + end + + @typedoc """ + Environment of a workload is the stage of a software lifecycle. + + + ### Enum Values + * `:production` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Production environment. + * `:staging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Staging environment. + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Test environment. + * `:development` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Development environment. + """ + @type gcp_apphub_workload_environment_type_values() :: %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + @doc """ + Environment of a workload is the stage of a software lifecycle. + + + ### Notes + + [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_environment_type() + :"gcp.apphub.workload.environment_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_environment_type_values().production + :PRODUCTION + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_environment_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_environment_type_values().production} + %{:"gcp.apphub.workload.environment_type" => :PRODUCTION} + + ### Erlang + + ```erlang + ?GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE. + 'gcp.apphub.workload.environment_type' + + ?GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION. + 'PRODUCTION' + + \#{?GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE => ?GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION}. + \#{'gcp.apphub.workload.environment_type' => 'PRODUCTION'} + ``` + + + """ + @spec gcp_apphub_workload_environment_type :: :"gcp.apphub.workload.environment_type" + def gcp_apphub_workload_environment_type do + :"gcp.apphub.workload.environment_type" + end + + @spec gcp_apphub_workload_environment_type_values() :: + gcp_apphub_workload_environment_type_values() + def gcp_apphub_workload_environment_type_values() do + %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + end + + @doc """ + The name of the workload as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-workload"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_workload_id() + :"gcp.apphub.workload.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_WORKLOAD_ID. + 'gcp.apphub.workload.id' + ``` + + + """ + @spec gcp_apphub_workload_id :: :"gcp.apphub.workload.id" + def gcp_apphub_workload_id do + :"gcp.apphub.workload.id" + end + + @doc """ + The container within GCP where the AppHub destination application is defined. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["projects/my-container-project"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_application_container() + :"gcp.apphub_destination.application.container" + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_APPLICATION_CONTAINER. + 'gcp.apphub_destination.application.container' + ``` + + + """ + @spec gcp_apphub_destination_application_container :: + :"gcp.apphub_destination.application.container" + def gcp_apphub_destination_application_container do + :"gcp.apphub_destination.application.container" + end + + @doc """ + The name of the destination application as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-application"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_application_id() + :"gcp.apphub_destination.application.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_APPLICATION_ID. + 'gcp.apphub_destination.application.id' + ``` + + + """ + @spec gcp_apphub_destination_application_id :: :"gcp.apphub_destination.application.id" + def gcp_apphub_destination_application_id do + :"gcp.apphub_destination.application.id" + end + + @doc """ + The GCP zone or region where the destination application is defined. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["us-central1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_application_location() + :"gcp.apphub_destination.application.location" + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_APPLICATION_LOCATION. + 'gcp.apphub_destination.application.location' + ``` + + + """ + @spec gcp_apphub_destination_application_location :: + :"gcp.apphub_destination.application.location" + def gcp_apphub_destination_application_location do + :"gcp.apphub_destination.application.location" + end + + @typedoc """ + Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + ### Enum Values + * `:mission_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mission critical service. + * `:high` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High impact. + * `:medium` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Medium impact. + * `:low` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low impact. + """ + @type gcp_apphub_destination_service_criticality_type_values() :: %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + @doc """ + Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_criticality_type() + :"gcp.apphub_destination.service.criticality_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_criticality_type_values().mission_critical + :MISSION_CRITICAL + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_criticality_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_criticality_type_values().mission_critical} + %{:"gcp.apphub_destination.service.criticality_type" => :MISSION_CRITICAL} + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE. + 'gcp.apphub_destination.service.criticality_type' + + ?GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL. + 'MISSION_CRITICAL' + + \#{?GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE => ?GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL}. + \#{'gcp.apphub_destination.service.criticality_type' => 'MISSION_CRITICAL'} + ``` + + + """ + @spec gcp_apphub_destination_service_criticality_type :: + :"gcp.apphub_destination.service.criticality_type" + def gcp_apphub_destination_service_criticality_type do + :"gcp.apphub_destination.service.criticality_type" + end + + @spec gcp_apphub_destination_service_criticality_type_values() :: + gcp_apphub_destination_service_criticality_type_values() + def gcp_apphub_destination_service_criticality_type_values() do + %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + end + + @typedoc """ + Software lifecycle stage of a destination service as defined [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + ### Enum Values + * `:production` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Production environment. + * `:staging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Staging environment. + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Test environment. + * `:development` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Development environment. + """ + @type gcp_apphub_destination_service_environment_type_values() :: %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + @doc """ + Software lifecycle stage of a destination service as defined [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_environment_type() + :"gcp.apphub_destination.service.environment_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_environment_type_values().production + :PRODUCTION + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_environment_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_environment_type_values().production} + %{:"gcp.apphub_destination.service.environment_type" => :PRODUCTION} + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE. + 'gcp.apphub_destination.service.environment_type' + + ?GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION. + 'PRODUCTION' + + \#{?GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE => ?GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE_VALUES_PRODUCTION}. + \#{'gcp.apphub_destination.service.environment_type' => 'PRODUCTION'} + ``` + + + """ + @spec gcp_apphub_destination_service_environment_type :: + :"gcp.apphub_destination.service.environment_type" + def gcp_apphub_destination_service_environment_type do + :"gcp.apphub_destination.service.environment_type" + end + + @spec gcp_apphub_destination_service_environment_type_values() :: + gcp_apphub_destination_service_environment_type_values() + def gcp_apphub_destination_service_environment_type_values() do + %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + end + + @doc """ + The name of the destination service as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-service"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_service_id() + :"gcp.apphub_destination.service.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_SERVICE_ID. + 'gcp.apphub_destination.service.id' + ``` + + + """ + @spec gcp_apphub_destination_service_id :: :"gcp.apphub_destination.service.id" + def gcp_apphub_destination_service_id do + :"gcp.apphub_destination.service.id" + end + + @typedoc """ + Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + ### Enum Values + * `:mission_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mission critical service. + * `:high` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High impact. + * `:medium` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Medium impact. + * `:low` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low impact. + """ + @type gcp_apphub_destination_workload_criticality_type_values() :: %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + @doc """ + Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type) + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_criticality_type() + :"gcp.apphub_destination.workload.criticality_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_criticality_type_values().mission_critical + :MISSION_CRITICAL + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_criticality_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_criticality_type_values().mission_critical} + %{:"gcp.apphub_destination.workload.criticality_type" => :MISSION_CRITICAL} + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE. + 'gcp.apphub_destination.workload.criticality_type' + + ?GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL. + 'MISSION_CRITICAL' + + \#{?GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE => ?GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE_VALUES_MISSION_CRITICAL}. + \#{'gcp.apphub_destination.workload.criticality_type' => 'MISSION_CRITICAL'} + ``` + + + """ + @spec gcp_apphub_destination_workload_criticality_type :: + :"gcp.apphub_destination.workload.criticality_type" + def gcp_apphub_destination_workload_criticality_type do + :"gcp.apphub_destination.workload.criticality_type" + end + + @spec gcp_apphub_destination_workload_criticality_type_values() :: + gcp_apphub_destination_workload_criticality_type_values() + def gcp_apphub_destination_workload_criticality_type_values() do + %{ + :mission_critical => :MISSION_CRITICAL, + :high => :HIGH, + :medium => :MEDIUM, + :low => :LOW + } + end + + @typedoc """ + Environment of a destination workload is the stage of a software lifecycle as provided in the [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + ### Enum Values + * `:production` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Production environment. + * `:staging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Staging environment. + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Test environment. + * `:development` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Development environment. + """ + @type gcp_apphub_destination_workload_environment_type_values() :: %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + @doc """ + Environment of a destination workload is the stage of a software lifecycle as provided in the [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1) + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_environment_type() + :"gcp.apphub_destination.workload.environment_type" + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_environment_type_values().production + :PRODUCTION + + iex> %{OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_environment_type() => OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_environment_type_values().production} + %{:"gcp.apphub_destination.workload.environment_type" => :PRODUCTION} + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE. + 'gcp.apphub_destination.workload.environment_type' + + ?GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION. + 'PRODUCTION' + + \#{?GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE => ?GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE_VALUES_PRODUCTION}. + \#{'gcp.apphub_destination.workload.environment_type' => 'PRODUCTION'} + ``` + + + """ + @spec gcp_apphub_destination_workload_environment_type :: + :"gcp.apphub_destination.workload.environment_type" + def gcp_apphub_destination_workload_environment_type do + :"gcp.apphub_destination.workload.environment_type" + end + + @spec gcp_apphub_destination_workload_environment_type_values() :: + gcp_apphub_destination_workload_environment_type_values() + def gcp_apphub_destination_workload_environment_type_values() do + %{ + :production => :PRODUCTION, + :staging => :STAGING, + :test => :TEST, + :development => :DEVELOPMENT + } + end + + @doc """ + The name of the destination workload as configured in AppHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-workload"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_apphub_destination_workload_id() + :"gcp.apphub_destination.workload.id" + + ### Erlang + + ```erlang + ?GCP_APPHUB_DESTINATION_WORKLOAD_ID. + 'gcp.apphub_destination.workload.id' + ``` + + + """ + @spec gcp_apphub_destination_workload_id :: :"gcp.apphub_destination.workload.id" + def gcp_apphub_destination_workload_id do + :"gcp.apphub_destination.workload.id" + end + @doc """ Identifies the Google Cloud service for which the official client library is intended. ### Value type @@ -171,4 +1043,103 @@ defmodule OpenTelemetry.SemConv.Incubating.GCPAttributes do def gcp_gce_instance_name do :"gcp.gce.instance.name" end + + @doc """ + The name of the Instance Group Manager (IGM) that manages this VM, if any. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["web-igm", "my-managed-group"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_gce_instance_group_manager_name() + :"gcp.gce.instance_group_manager.name" + + ### Erlang + + ```erlang + ?GCP_GCE_INSTANCE_GROUP_MANAGER_NAME. + 'gcp.gce.instance_group_manager.name' + ``` + + + """ + @spec gcp_gce_instance_group_manager_name :: :"gcp.gce.instance_group_manager.name" + def gcp_gce_instance_group_manager_name do + :"gcp.gce.instance_group_manager.name" + end + + @doc """ + The region of a **regional** Instance Group Manager (e.g., `us-central1`). Set this **only** when the IGM is regional. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["us-central1", "europe-west1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_gce_instance_group_manager_region() + :"gcp.gce.instance_group_manager.region" + + ### Erlang + + ```erlang + ?GCP_GCE_INSTANCE_GROUP_MANAGER_REGION. + 'gcp.gce.instance_group_manager.region' + ``` + + + """ + @spec gcp_gce_instance_group_manager_region :: :"gcp.gce.instance_group_manager.region" + def gcp_gce_instance_group_manager_region do + :"gcp.gce.instance_group_manager.region" + end + + @doc """ + The zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this **only** when the IGM is zonal. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["us-central1-a", "europe-west1-b"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GCPAttributes.gcp_gce_instance_group_manager_zone() + :"gcp.gce.instance_group_manager.zone" + + ### Erlang + + ```erlang + ?GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE. + 'gcp.gce.instance_group_manager.zone' + ``` + + + """ + @spec gcp_gce_instance_group_manager_zone :: :"gcp.gce.instance_group_manager.zone" + def gcp_gce_instance_group_manager_zone do + :"gcp.gce.instance_group_manager.zone" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex index b697684df..2495d3eac 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/gen_ai_attributes.ex @@ -5,551 +5,1435 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do """ @doc """ - The full response received from the GenAI model. + Free-form description of the GenAI agent provided by the application. ### Value type Value must be of type `atom() | String.t()`. - ### Notes - - It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) ### Examples ``` - ["[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"] + ["Helps with math problems", "Generates fiction stories"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_completion() - :"gen_ai.completion" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_agent_description() + :"gen_ai.agent.description" ### Erlang ```erlang - ?GEN_AI_COMPLETION. - 'gen_ai.completion' + ?GEN_AI_AGENT_DESCRIPTION. + 'gen_ai.agent.description' ``` """ - @spec gen_ai_completion :: :"gen_ai.completion" - def gen_ai_completion do - :"gen_ai.completion" + @spec gen_ai_agent_description :: :"gen_ai.agent.description" + def gen_ai_agent_description do + :"gen_ai.agent.description" end - @typedoc """ - The name of the operation being performed. - - ### Enum Values - * `:chat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) - * `:text_completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions) - """ - @type gen_ai_operation_name_values() :: %{ - :chat => :chat, - :text_completion => :text_completion - } @doc """ - The name of the operation being performed. - - ### Notes + The unique identifier of the GenAI agent. + ### Value type - If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries **SHOULD** use applicable predefined value. + Value must be of type `atom() | String.t()`. + ### Examples + ``` + ["asst_5j66UpCpwteGg4YSxUnt7lPY"] + ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() - :"gen_ai.operation.name" - - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat - :chat - - iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat} - %{:"gen_ai.operation.name" => :chat} + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_agent_id() + :"gen_ai.agent.id" ### Erlang ```erlang - ?GEN_AI_OPERATION_NAME. - 'gen_ai.operation.name' - - ?GEN_AI_OPERATION_NAME_VALUES_CHAT. - 'chat' - - \#{?GEN_AI_OPERATION_NAME => ?GEN_AI_OPERATION_NAME_VALUES_CHAT}. - \#{'gen_ai.operation.name' => 'chat'} + ?GEN_AI_AGENT_ID. + 'gen_ai.agent.id' ``` """ - @spec gen_ai_operation_name :: :"gen_ai.operation.name" - def gen_ai_operation_name do - :"gen_ai.operation.name" - end - - @spec gen_ai_operation_name_values() :: gen_ai_operation_name_values() - def gen_ai_operation_name_values() do - %{ - :chat => :chat, - :text_completion => :text_completion - } + @spec gen_ai_agent_id :: :"gen_ai.agent.id" + def gen_ai_agent_id do + :"gen_ai.agent.id" end @doc """ - The full prompt sent to the GenAI model. + Human-readable name of the GenAI agent provided by the application. ### Value type Value must be of type `atom() | String.t()`. - ### Notes - - It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) ### Examples ``` - ["[{'role': 'user', 'content': 'What is the capital of France?'}]"] + ["Math Tutor", "Fiction Writer"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_prompt() - :"gen_ai.prompt" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_agent_name() + :"gen_ai.agent.name" ### Erlang ```erlang - ?GEN_AI_PROMPT. - 'gen_ai.prompt' + ?GEN_AI_AGENT_NAME. + 'gen_ai.agent.name' ``` """ - @spec gen_ai_prompt :: :"gen_ai.prompt" - def gen_ai_prompt do - :"gen_ai.prompt" + @spec gen_ai_agent_name :: :"gen_ai.agent.name" + def gen_ai_agent_name do + :"gen_ai.agent.name" end @doc """ - The frequency penalty setting for the GenAI request. + The version of the GenAI agent. ### Value type - Value must be of type `float()`. + Value must be of type `atom() | String.t()`. ### Examples ``` - [0.1] + ["1.0.0", "2025-05-01"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_frequency_penalty() - :"gen_ai.request.frequency_penalty" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_agent_version() + :"gen_ai.agent.version" ### Erlang ```erlang - ?GEN_AI_REQUEST_FREQUENCY_PENALTY. - 'gen_ai.request.frequency_penalty' + ?GEN_AI_AGENT_VERSION. + 'gen_ai.agent.version' ``` """ - @spec gen_ai_request_frequency_penalty :: :"gen_ai.request.frequency_penalty" - def gen_ai_request_frequency_penalty do - :"gen_ai.request.frequency_penalty" + @spec gen_ai_agent_version :: :"gen_ai.agent.version" + def gen_ai_agent_version do + :"gen_ai.agent.version" + end + + @deprecated """ + Removed, no replacement at this time. + """ + @spec gen_ai_completion :: :"gen_ai.completion" + def gen_ai_completion do + :"gen_ai.completion" end @doc """ - The maximum number of tokens the model generates for a request. + The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation. ### Value type - Value must be of type `integer()`. + Value must be of type `atom() | String.t()`. ### Examples ``` - [100] + ["conv_5j66UpCpwteGg4YSxUnt7lPY"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_max_tokens() - :"gen_ai.request.max_tokens" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_conversation_id() + :"gen_ai.conversation.id" ### Erlang ```erlang - ?GEN_AI_REQUEST_MAX_TOKENS. - 'gen_ai.request.max_tokens' + ?GEN_AI_CONVERSATION_ID. + 'gen_ai.conversation.id' ``` """ - @spec gen_ai_request_max_tokens :: :"gen_ai.request.max_tokens" - def gen_ai_request_max_tokens do - :"gen_ai.request.max_tokens" + @spec gen_ai_conversation_id :: :"gen_ai.conversation.id" + def gen_ai_conversation_id do + :"gen_ai.conversation.id" end @doc """ - The name of the GenAI model a request is being made to. + The data source identifier. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + Data sources are used by AI agents and RAG applications to store grounding data. A data source may be an external database, object store, document collection, website, or any other storage system used by the GenAI agent or application. The `gen_ai.data_source.id` **SHOULD** match the identifier used by the GenAI system rather than a name specific to the external storage, such as a database or object store. Semantic conventions referencing `gen_ai.data_source.id` **MAY** also leverage additional attributes, such as `db.*`, to further identify and describe the data source. + ### Examples ``` - gpt-4 + ["H7STPQYOND"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_model() - :"gen_ai.request.model" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_data_source_id() + :"gen_ai.data_source.id" ### Erlang ```erlang - ?GEN_AI_REQUEST_MODEL. - 'gen_ai.request.model' + ?GEN_AI_DATA_SOURCE_ID. + 'gen_ai.data_source.id' ``` """ - @spec gen_ai_request_model :: :"gen_ai.request.model" - def gen_ai_request_model do - :"gen_ai.request.model" + @spec gen_ai_data_source_id :: :"gen_ai.data_source.id" + def gen_ai_data_source_id do + :"gen_ai.data_source.id" end @doc """ - The presence penalty setting for the GenAI request. + The number of dimensions the resulting output embeddings should have. ### Value type - Value must be of type `float()`. + Value must be of type `integer()`. ### Examples ``` - [0.1] + [512, 1024] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_presence_penalty() - :"gen_ai.request.presence_penalty" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_embeddings_dimension_count() + :"gen_ai.embeddings.dimension.count" ### Erlang ```erlang - ?GEN_AI_REQUEST_PRESENCE_PENALTY. - 'gen_ai.request.presence_penalty' + ?GEN_AI_EMBEDDINGS_DIMENSION_COUNT. + 'gen_ai.embeddings.dimension.count' ``` """ - @spec gen_ai_request_presence_penalty :: :"gen_ai.request.presence_penalty" - def gen_ai_request_presence_penalty do - :"gen_ai.request.presence_penalty" + @spec gen_ai_embeddings_dimension_count :: :"gen_ai.embeddings.dimension.count" + def gen_ai_embeddings_dimension_count do + :"gen_ai.embeddings.dimension.count" end @doc """ - List of sequences that the model will use to stop generating further tokens. + A free-form explanation for the assigned score provided by the evaluator. ### Value type - Value must be of type `[atom() | String.t()]`. + Value must be of type `atom() | String.t()`. ### Examples ``` - ["forest", "lived"] + ["The response is factually accurate but lacks sufficient detail to fully address the question."] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_stop_sequences() - :"gen_ai.request.stop_sequences" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_evaluation_explanation() + :"gen_ai.evaluation.explanation" ### Erlang ```erlang - ?GEN_AI_REQUEST_STOP_SEQUENCES. - 'gen_ai.request.stop_sequences' + ?GEN_AI_EVALUATION_EXPLANATION. + 'gen_ai.evaluation.explanation' ``` """ - @spec gen_ai_request_stop_sequences :: :"gen_ai.request.stop_sequences" - def gen_ai_request_stop_sequences do - :"gen_ai.request.stop_sequences" + @spec gen_ai_evaluation_explanation :: :"gen_ai.evaluation.explanation" + def gen_ai_evaluation_explanation do + :"gen_ai.evaluation.explanation" end @doc """ - The temperature setting for the GenAI request. + The name of the evaluation metric used for the GenAI response. ### Value type - Value must be of type `float()`. + Value must be of type `atom() | String.t()`. ### Examples ``` - [0.0] + ["Relevance", "IntentResolution"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_temperature() - :"gen_ai.request.temperature" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_evaluation_name() + :"gen_ai.evaluation.name" ### Erlang ```erlang - ?GEN_AI_REQUEST_TEMPERATURE. - 'gen_ai.request.temperature' + ?GEN_AI_EVALUATION_NAME. + 'gen_ai.evaluation.name' ``` """ - @spec gen_ai_request_temperature :: :"gen_ai.request.temperature" - def gen_ai_request_temperature do - :"gen_ai.request.temperature" + @spec gen_ai_evaluation_name :: :"gen_ai.evaluation.name" + def gen_ai_evaluation_name do + :"gen_ai.evaluation.name" end @doc """ - The top_k sampling setting for the GenAI request. + Human readable label for evaluation. ### Value type - Value must be of type `float()`. + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute provides a human-readable interpretation of the evaluation score produced by an evaluator. For example, a score value of 1 could mean "relevant" in one evaluation system and "not relevant" in another, depending on the scoring range and evaluator. The label **SHOULD** have low cardinality. Possible values depend on the evaluation metric and evaluator used; implementations **SHOULD** document the possible values. + ### Examples ``` - [1.0] + ["relevant", "not_relevant", "correct", "incorrect", "pass", "fail"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_k() - :"gen_ai.request.top_k" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_evaluation_score_label() + :"gen_ai.evaluation.score.label" ### Erlang ```erlang - ?GEN_AI_REQUEST_TOP_K. - 'gen_ai.request.top_k' + ?GEN_AI_EVALUATION_SCORE_LABEL. + 'gen_ai.evaluation.score.label' ``` """ - @spec gen_ai_request_top_k :: :"gen_ai.request.top_k" - def gen_ai_request_top_k do - :"gen_ai.request.top_k" + @spec gen_ai_evaluation_score_label :: :"gen_ai.evaluation.score.label" + def gen_ai_evaluation_score_label do + :"gen_ai.evaluation.score.label" end @doc """ - The top_p sampling setting for the GenAI request. + The evaluation score returned by the evaluator. ### Value type Value must be of type `float()`. ### Examples ``` - [1.0] + [4.0] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_p() - :"gen_ai.request.top_p" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_evaluation_score_value() + :"gen_ai.evaluation.score.value" ### Erlang ```erlang - ?GEN_AI_REQUEST_TOP_P. - 'gen_ai.request.top_p' + ?GEN_AI_EVALUATION_SCORE_VALUE. + 'gen_ai.evaluation.score.value' ``` """ - @spec gen_ai_request_top_p :: :"gen_ai.request.top_p" - def gen_ai_request_top_p do - :"gen_ai.request.top_p" + @spec gen_ai_evaluation_score_value :: :"gen_ai.evaluation.score.value" + def gen_ai_evaluation_score_value do + :"gen_ai.evaluation.score.value" end @doc """ - Array of reasons the model stopped generating tokens, corresponding to each generation received. - ### Value type - - Value must be of type `[atom() | String.t()]`. - ### Examples - - ``` - ["stop"] - ``` - - + The chat history provided to the model as an input. - ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_finish_reasons() - :"gen_ai.response.finish_reasons" + ### Notes - ### Erlang + Instrumentations **MUST** follow [Input messages JSON schema](/docs/gen-ai/gen-ai-input-messages.json). + When the attribute is recorded on events, it **MUST** be recorded in structured + form. When recorded on spans, it **MAY** be recorded as a JSON string if structured + format is not supported and **SHOULD** be recorded in structured form otherwise. - ```erlang - ?GEN_AI_RESPONSE_FINISH_REASONS. - 'gen_ai.response.finish_reasons' - ``` + Messages **MUST** be provided in the order they were sent to the model. + Instrumentations **MAY** provide a way for users to filter or truncate + input messages. - - """ - @spec gen_ai_response_finish_reasons :: :"gen_ai.response.finish_reasons" - def gen_ai_response_finish_reasons do - :"gen_ai.response.finish_reasons" - end + > [!Warning] + > This attribute is likely to contain sensitive information including user/PII data. - @doc """ - The unique identifier for the completion. - ### Value type + See [Recording content on attributes](/docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes) + section for more details. - Value must be of type `atom() | String.t()`. ### Examples ``` - ["chatcmpl-123"] + ["[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"Weather in Paris?\"\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"call_VSPygqKTWdrhaFErNvMV18Yl\",\n \"name\": \"get_weather\",\n \"arguments\": {\n \"location\": \"Paris\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"parts\": [\n {\n \"type\": \"tool_call_response\",\n \"id\": \" call_VSPygqKTWdrhaFErNvMV18Yl\",\n \"result\": \"rainy, 57°F\"\n }\n ]\n }\n]\n"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_id() - :"gen_ai.response.id" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_input_messages() + :"gen_ai.input.messages" ### Erlang ```erlang - ?GEN_AI_RESPONSE_ID. - 'gen_ai.response.id' + ?GEN_AI_INPUT_MESSAGES. + 'gen_ai.input.messages' ``` """ - @spec gen_ai_response_id :: :"gen_ai.response.id" - def gen_ai_response_id do - :"gen_ai.response.id" + @spec gen_ai_input_messages :: :"gen_ai.input.messages" + def gen_ai_input_messages do + :"gen_ai.input.messages" end - @doc """ - The name of the model that generated the response. - ### Value type + @typedoc """ + Deprecated, use `gen_ai.output.type`. - Value must be of type `atom() | String.t()`. - ### Examples - ``` - ["gpt-4-0613"] - ``` + ### Enum Values + * `:text` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Text response format + * `:json_object` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - JSON object response format + * `:json_schema` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - JSON schema response format + """ + @type gen_ai_openai_request_response_format_values() :: %{ + :text => :text, + :json_object => :json_object, + :json_schema => :json_schema + } + @deprecated """ + Replaced by `gen_ai.output.type`. + """ + @spec gen_ai_openai_request_response_format :: :"gen_ai.openai.request.response_format" + def gen_ai_openai_request_response_format do + :"gen_ai.openai.request.response_format" + end - + @spec gen_ai_openai_request_response_format_values() :: + gen_ai_openai_request_response_format_values() + def gen_ai_openai_request_response_format_values() do + %{ + :text => :text, + :json_object => :json_object, + :json_schema => :json_schema + } + end - ### Elixir + @deprecated """ + Replaced by `gen_ai.request.seed`. + """ + @spec gen_ai_openai_request_seed :: :"gen_ai.openai.request.seed" + def gen_ai_openai_request_seed do + :"gen_ai.openai.request.seed" + end - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_model() - :"gen_ai.response.model" + @typedoc """ + Deprecated, use `openai.request.service_tier`. - ### Erlang + ### Enum Values + * `:auto` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The system will utilize scale tier credits until they are exhausted. + * `:default` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The system will utilize the default scale tier. + """ + @type gen_ai_openai_request_service_tier_values() :: %{ + :auto => :auto, + :default => :default + } + @deprecated """ + Replaced by `openai.request.service_tier`. + """ + @spec gen_ai_openai_request_service_tier :: :"gen_ai.openai.request.service_tier" + def gen_ai_openai_request_service_tier do + :"gen_ai.openai.request.service_tier" + end - ```erlang - ?GEN_AI_RESPONSE_MODEL. - 'gen_ai.response.model' - ``` + @spec gen_ai_openai_request_service_tier_values() :: gen_ai_openai_request_service_tier_values() + def gen_ai_openai_request_service_tier_values() do + %{ + :auto => :auto, + :default => :default + } + end - + @deprecated """ + Replaced by `openai.response.service_tier`. """ - @spec gen_ai_response_model :: :"gen_ai.response.model" - def gen_ai_response_model do - :"gen_ai.response.model" + @spec gen_ai_openai_response_service_tier :: :"gen_ai.openai.response.service_tier" + def gen_ai_openai_response_service_tier do + :"gen_ai.openai.response.service_tier" + end + + @deprecated """ + Replaced by `openai.response.system_fingerprint`. + """ + @spec gen_ai_openai_response_system_fingerprint :: :"gen_ai.openai.response.system_fingerprint" + def gen_ai_openai_response_system_fingerprint do + :"gen_ai.openai.response.system_fingerprint" end @typedoc """ - The Generative AI product as identified by the client or server instrumentation. + The name of the operation being performed. ### Enum Values - * `:openai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OpenAI - * `:vertex_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vertex AI - * `:anthropic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Anthropic - * `:cohere` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Cohere + * `:chat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) + * `:generate_content` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Multimodal content generation operation such as [Gemini Generate Content](https://ai.google.dev/api/generate-content) + * `:text_completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions) + * `:embeddings` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Embeddings operation such as [OpenAI Create embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create) + * `:retrieval` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Retrieval operation such as [OpenAI Search Vector Store API](https://platform.openai.com/docs/api-reference/vector-stores/search) + * `:create_agent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Create GenAI agent + * `:invoke_agent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Invoke GenAI agent + * `:execute_tool` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Execute a tool """ - @type gen_ai_system_values() :: %{ - :openai => :openai, - :vertex_ai => :vertex_ai, - :anthropic => :anthropic, - :cohere => :cohere + @type gen_ai_operation_name_values() :: %{ + :chat => :chat, + :generate_content => :generate_content, + :text_completion => :text_completion, + :embeddings => :embeddings, + :retrieval => :retrieval, + :create_agent => :create_agent, + :invoke_agent => :invoke_agent, + :execute_tool => :execute_tool } @doc """ - The Generative AI product as identified by the client or server instrumentation. + The name of the operation being performed. ### Notes - The `gen_ai.system` describes a family of GenAI models with specific model identified - by `gen_ai.request.model` and `gen_ai.response.model` attributes. + If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries **SHOULD** use applicable predefined value. - The actual GenAI product may differ from the one identified by the client. - For example, when using OpenAI client libraries to communicate with Mistral, the `gen_ai.system` - is set to `openai` based on the instrumentation's best knowledge. - For custom model, a custom friendly name **SHOULD** be used. - If none of these options apply, the `gen_ai.system` **SHOULD** be set to `_OTHER`. + - ### Examples + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() + :"gen_ai.operation.name" + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat + :chat + + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat} + %{:"gen_ai.operation.name" => :chat} + + ### Erlang + + ```erlang + ?GEN_AI_OPERATION_NAME. + 'gen_ai.operation.name' + + ?GEN_AI_OPERATION_NAME_VALUES_CHAT. + 'chat' + + \#{?GEN_AI_OPERATION_NAME => ?GEN_AI_OPERATION_NAME_VALUES_CHAT}. + \#{'gen_ai.operation.name' => 'chat'} + ``` + + + """ + @spec gen_ai_operation_name :: :"gen_ai.operation.name" + def gen_ai_operation_name do + :"gen_ai.operation.name" + end + + @spec gen_ai_operation_name_values() :: gen_ai_operation_name_values() + def gen_ai_operation_name_values() do + %{ + :chat => :chat, + :generate_content => :generate_content, + :text_completion => :text_completion, + :embeddings => :embeddings, + :retrieval => :retrieval, + :create_agent => :create_agent, + :invoke_agent => :invoke_agent, + :execute_tool => :execute_tool + } + end + + @doc """ + Messages returned by the model where each message represents a specific model response (choice, candidate). + + ### Notes + + Instrumentations **MUST** follow [Output messages JSON schema](/docs/gen-ai/gen-ai-output-messages.json) + + Each message represents a single output choice/candidate generated by + the model. Each message corresponds to exactly one generation + (choice/candidate) and vice versa - one choice cannot be split across + multiple messages or one message cannot contain parts from multiple choices. + + When the attribute is recorded on events, it **MUST** be recorded in structured + form. When recorded on spans, it **MAY** be recorded as a JSON string if structured + format is not supported and **SHOULD** be recorded in structured form otherwise. + + Instrumentations **MAY** provide a way for users to filter or truncate + output messages. + + > [!Warning] + > This attribute is likely to contain sensitive information including user/PII data. + + See [Recording content on attributes](/docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes) + section for more details. + + ### Examples + + ``` + ["[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"The weather in Paris is currently rainy with a temperature of 57°F.\"\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_output_messages() + :"gen_ai.output.messages" + + ### Erlang + + ```erlang + ?GEN_AI_OUTPUT_MESSAGES. + 'gen_ai.output.messages' + ``` + + + """ + @spec gen_ai_output_messages :: :"gen_ai.output.messages" + def gen_ai_output_messages do + :"gen_ai.output.messages" + end + + @typedoc """ + Represents the content type requested by the client. + + ### Enum Values + * `:text` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Plain text + * `:json` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - JSON object with known or unknown schema + * `:image` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Image + * `:speech` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Speech + """ + @type gen_ai_output_type_values() :: %{ + :text => :text, + :json => :json, + :image => :image, + :speech => :speech + } + @doc """ + 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 `gen_ai.output.{type}.*` attributes. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_output_type() + :"gen_ai.output.type" + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_output_type_values().text + :text + + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_output_type() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_output_type_values().text} + %{:"gen_ai.output.type" => :text} + + ### Erlang + + ```erlang + ?GEN_AI_OUTPUT_TYPE. + 'gen_ai.output.type' + + ?GEN_AI_OUTPUT_TYPE_VALUES_TEXT. + 'text' + + \#{?GEN_AI_OUTPUT_TYPE => ?GEN_AI_OUTPUT_TYPE_VALUES_TEXT}. + \#{'gen_ai.output.type' => 'text'} + ``` + + + """ + @spec gen_ai_output_type :: :"gen_ai.output.type" + def gen_ai_output_type do + :"gen_ai.output.type" + end + + @spec gen_ai_output_type_values() :: gen_ai_output_type_values() + def gen_ai_output_type_values() do + %{ + :text => :text, + :json => :json, + :image => :image, + :speech => :speech + } + end + + @deprecated """ + Removed, no replacement at this time. + """ + @spec gen_ai_prompt :: :"gen_ai.prompt" + def gen_ai_prompt do + :"gen_ai.prompt" + end + + @doc """ + The name of the prompt that uniquely identifies it. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["analyze-code"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_prompt_name() + :"gen_ai.prompt.name" + + ### Erlang + + ```erlang + ?GEN_AI_PROMPT_NAME. + 'gen_ai.prompt.name' + ``` + + + """ + @spec gen_ai_prompt_name :: :"gen_ai.prompt.name" + def gen_ai_prompt_name do + :"gen_ai.prompt.name" + end + + @typedoc """ + The Generative AI provider as identified by the client or server instrumentation. + + ### Enum Values + * `:openai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [OpenAI](https://openai.com/) + * `:"gcp.gen_ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any Google generative AI endpoint + * `:"gcp.vertex_ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Vertex AI](https://cloud.google.com/vertex-ai) + * `:"gcp.gemini"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Gemini](https://cloud.google.com/products/gemini) + * `:anthropic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Anthropic](https://www.anthropic.com/) + * `:cohere` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Cohere](https://cohere.com/) + * `:"azure.ai.inference"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure AI Inference + * `:"azure.ai.openai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Azure OpenAI](https://azure.microsoft.com/products/ai-services/openai-service/) + * `:"ibm.watsonx.ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [IBM Watsonx AI](https://www.ibm.com/products/watsonx-ai) + * `:"aws.bedrock"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [AWS Bedrock](https://aws.amazon.com/bedrock) + * `:perplexity` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Perplexity](https://www.perplexity.ai/) + * `:x_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [xAI](https://x.ai/) + * `:deepseek` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [DeepSeek](https://www.deepseek.com/) + * `:groq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Groq](https://groq.com/) + * `:mistral_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Mistral AI](https://mistral.ai/) + """ + @type gen_ai_provider_name_values() :: %{ + :openai => :openai, + :"gcp.gen_ai" => :"gcp.gen_ai", + :"gcp.vertex_ai" => :"gcp.vertex_ai", + :"gcp.gemini" => :"gcp.gemini", + :anthropic => :anthropic, + :cohere => :cohere, + :"azure.ai.inference" => :"azure.ai.inference", + :"azure.ai.openai" => :"azure.ai.openai", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :x_ai => :x_ai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai + } + @doc """ + The Generative AI provider as identified by the client or server instrumentation. + + ### Notes + + The attribute **SHOULD** be set based on the instrumentation's best + knowledge and may differ from the actual model provider. + + Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms + are accessible using the OpenAI REST API and corresponding client libraries, + but may proxy or host models from different providers. + + The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address` + attributes may help identify the actual system in use. + + The `gen_ai.provider.name` attribute acts as a discriminator that + identifies the GenAI telemetry format flavor specific to that provider + within GenAI semantic conventions. + It **SHOULD** be set consistently with provider-specific attributes and signals. + For example, GenAI spans, metrics, and events related to AWS Bedrock + should have the `gen_ai.provider.name` set to `aws.bedrock` and include + applicable `aws.bedrock.*` attributes and are not expected to include + `openai.*` attributes. - ``` - openai - ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() - :"gen_ai.system" + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_provider_name() + :"gen_ai.provider.name" - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_provider_name_values().openai :openai - iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai} - %{:"gen_ai.system" => :openai} + iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_provider_name() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_provider_name_values().openai} + %{:"gen_ai.provider.name" => :openai} ### Erlang ```erlang - ?GEN_AI_SYSTEM. - 'gen_ai.system' + ?GEN_AI_PROVIDER_NAME. + 'gen_ai.provider.name' - ?GEN_AI_SYSTEM_VALUES_OPENAI. + ?GEN_AI_PROVIDER_NAME_VALUES_OPENAI. 'openai' - \#{?GEN_AI_SYSTEM => ?GEN_AI_SYSTEM_VALUES_OPENAI}. - \#{'gen_ai.system' => 'openai'} + \#{?GEN_AI_PROVIDER_NAME => ?GEN_AI_PROVIDER_NAME_VALUES_OPENAI}. + \#{'gen_ai.provider.name' => 'openai'} + ``` + + + """ + @spec gen_ai_provider_name :: :"gen_ai.provider.name" + def gen_ai_provider_name do + :"gen_ai.provider.name" + end + + @spec gen_ai_provider_name_values() :: gen_ai_provider_name_values() + def gen_ai_provider_name_values() do + %{ + :openai => :openai, + :"gcp.gen_ai" => :"gcp.gen_ai", + :"gcp.vertex_ai" => :"gcp.vertex_ai", + :"gcp.gemini" => :"gcp.gemini", + :anthropic => :anthropic, + :cohere => :cohere, + :"azure.ai.inference" => :"azure.ai.inference", + :"azure.ai.openai" => :"azure.ai.openai", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :x_ai => :x_ai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai + } + end + + @doc """ + The target number of candidate completions to return. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [3] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_choice_count() + :"gen_ai.request.choice.count" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_CHOICE_COUNT. + 'gen_ai.request.choice.count' + ``` + + + """ + @spec gen_ai_request_choice_count :: :"gen_ai.request.choice.count" + def gen_ai_request_choice_count do + :"gen_ai.request.choice.count" + end + + @doc """ + The encoding formats requested in an embeddings operation, if specified. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Notes + + In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request. + + ### Examples + + ``` + [["base64"], ["float", "binary"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_encoding_formats() + :"gen_ai.request.encoding_formats" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_ENCODING_FORMATS. + 'gen_ai.request.encoding_formats' + ``` + + + """ + @spec gen_ai_request_encoding_formats :: :"gen_ai.request.encoding_formats" + def gen_ai_request_encoding_formats do + :"gen_ai.request.encoding_formats" + end + + @doc """ + The frequency penalty setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_frequency_penalty() + :"gen_ai.request.frequency_penalty" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_FREQUENCY_PENALTY. + 'gen_ai.request.frequency_penalty' ``` """ + @spec gen_ai_request_frequency_penalty :: :"gen_ai.request.frequency_penalty" + def gen_ai_request_frequency_penalty do + :"gen_ai.request.frequency_penalty" + end + + @doc """ + The maximum number of tokens the model generates for a request. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_max_tokens() + :"gen_ai.request.max_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_MAX_TOKENS. + 'gen_ai.request.max_tokens' + ``` + + + """ + @spec gen_ai_request_max_tokens :: :"gen_ai.request.max_tokens" + def gen_ai_request_max_tokens do + :"gen_ai.request.max_tokens" + end + + @doc """ + The name of the GenAI model a request is being made to. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + gpt-4 + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_model() + :"gen_ai.request.model" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_MODEL. + 'gen_ai.request.model' + ``` + + + """ + @spec gen_ai_request_model :: :"gen_ai.request.model" + def gen_ai_request_model do + :"gen_ai.request.model" + end + + @doc """ + The presence penalty setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.1] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_presence_penalty() + :"gen_ai.request.presence_penalty" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_PRESENCE_PENALTY. + 'gen_ai.request.presence_penalty' + ``` + + + """ + @spec gen_ai_request_presence_penalty :: :"gen_ai.request.presence_penalty" + def gen_ai_request_presence_penalty do + :"gen_ai.request.presence_penalty" + end + + @doc """ + Requests with same seed value more likely to return same result. + ### Value type + + Value must be of type `integer()`. + ### Examples + + ``` + [100] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_seed() + :"gen_ai.request.seed" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_SEED. + 'gen_ai.request.seed' + ``` + + + """ + @spec gen_ai_request_seed :: :"gen_ai.request.seed" + def gen_ai_request_seed do + :"gen_ai.request.seed" + end + + @doc """ + List of sequences that the model will use to stop generating further tokens. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + [["forest", "lived"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_stop_sequences() + :"gen_ai.request.stop_sequences" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_STOP_SEQUENCES. + 'gen_ai.request.stop_sequences' + ``` + + + """ + @spec gen_ai_request_stop_sequences :: :"gen_ai.request.stop_sequences" + def gen_ai_request_stop_sequences do + :"gen_ai.request.stop_sequences" + end + + @doc """ + The temperature setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [0.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_temperature() + :"gen_ai.request.temperature" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TEMPERATURE. + 'gen_ai.request.temperature' + ``` + + + """ + @spec gen_ai_request_temperature :: :"gen_ai.request.temperature" + def gen_ai_request_temperature do + :"gen_ai.request.temperature" + end + + @doc """ + The top_k sampling setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_k() + :"gen_ai.request.top_k" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TOP_K. + 'gen_ai.request.top_k' + ``` + + + """ + @spec gen_ai_request_top_k :: :"gen_ai.request.top_k" + def gen_ai_request_top_k do + :"gen_ai.request.top_k" + end + + @doc """ + The top_p sampling setting for the GenAI request. + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [1.0] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_p() + :"gen_ai.request.top_p" + + ### Erlang + + ```erlang + ?GEN_AI_REQUEST_TOP_P. + 'gen_ai.request.top_p' + ``` + + + """ + @spec gen_ai_request_top_p :: :"gen_ai.request.top_p" + def gen_ai_request_top_p do + :"gen_ai.request.top_p" + end + + @doc """ + Array of reasons the model stopped generating tokens, corresponding to each generation received. + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + [["stop"], ["stop", "length"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_finish_reasons() + :"gen_ai.response.finish_reasons" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_FINISH_REASONS. + 'gen_ai.response.finish_reasons' + ``` + + + """ + @spec gen_ai_response_finish_reasons :: :"gen_ai.response.finish_reasons" + def gen_ai_response_finish_reasons do + :"gen_ai.response.finish_reasons" + end + + @doc """ + The unique identifier for the completion. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["chatcmpl-123"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_id() + :"gen_ai.response.id" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_ID. + 'gen_ai.response.id' + ``` + + + """ + @spec gen_ai_response_id :: :"gen_ai.response.id" + def gen_ai_response_id do + :"gen_ai.response.id" + end + + @doc """ + The name of the model that generated the response. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["gpt-4-0613"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_model() + :"gen_ai.response.model" + + ### Erlang + + ```erlang + ?GEN_AI_RESPONSE_MODEL. + 'gen_ai.response.model' + ``` + + + """ + @spec gen_ai_response_model :: :"gen_ai.response.model" + def gen_ai_response_model do + :"gen_ai.response.model" + end + + @doc """ + The documents retrieved. + + ### Notes + + Instrumentations **MUST** follow [Retrieval documents JSON schema](/docs/gen-ai/gen-ai-retrieval-documents.json). + When the attribute is recorded on events, it **MUST** be recorded in structured + form. When recorded on spans, it **MAY** be recorded as a JSON string if structured + format is not supported and **SHOULD** be recorded in structured form otherwise. + + Each document object **SHOULD** contain at least the following properties: + `id` (string): A unique identifier for the document, `score` (double): The relevance score of the document + + ### Examples + + ``` + ["[\n {\n \"id\": \"doc_123\",\n \"score\": 0.95\n },\n {\n \"id\": \"doc_456\",\n \"score\": 0.87\n },\n {\n \"id\": \"doc_789\",\n \"score\": 0.82\n }\n]\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_retrieval_documents() + :"gen_ai.retrieval.documents" + + ### Erlang + + ```erlang + ?GEN_AI_RETRIEVAL_DOCUMENTS. + 'gen_ai.retrieval.documents' + ``` + + + """ + @spec gen_ai_retrieval_documents :: :"gen_ai.retrieval.documents" + def gen_ai_retrieval_documents do + :"gen_ai.retrieval.documents" + end + + @doc """ + The query text used for retrieval. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + > [!Warning] + > This attribute may contain sensitive information. + + ### Examples + + ``` + ["What is the capital of France?", "weather in Paris"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_retrieval_query_text() + :"gen_ai.retrieval.query.text" + + ### Erlang + + ```erlang + ?GEN_AI_RETRIEVAL_QUERY_TEXT. + 'gen_ai.retrieval.query.text' + ``` + + + """ + @spec gen_ai_retrieval_query_text :: :"gen_ai.retrieval.query.text" + def gen_ai_retrieval_query_text do + :"gen_ai.retrieval.query.text" + end + + @typedoc """ + Deprecated, use `gen_ai.provider.name` instead. + + ### Enum Values + * `:openai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OpenAI + * `:"gcp.gen_ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Any Google generative AI endpoint + * `:"gcp.vertex_ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Vertex AI + * `:"gcp.gemini"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gemini + * `:vertex_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Vertex AI~~ + * `:gemini` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Gemini~~ + * `:anthropic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Anthropic + * `:cohere` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Cohere + * `:"az.ai.inference"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure AI Inference~~ + * `:"az.ai.openai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Azure OpenAI~~ + * `:"azure.ai.inference"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure AI Inference + * `:"azure.ai.openai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure OpenAI + * `:"ibm.watsonx.ai"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM Watsonx AI + * `:"aws.bedrock"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AWS Bedrock + * `:perplexity` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Perplexity + * `:xai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - xAI + * `:deepseek` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - DeepSeek + * `:groq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Groq + * `:mistral_ai` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mistral AI + """ + @type gen_ai_system_values() :: %{ + :openai => :openai, + :"gcp.gen_ai" => :"gcp.gen_ai", + :"gcp.vertex_ai" => :"gcp.vertex_ai", + :"gcp.gemini" => :"gcp.gemini", + :vertex_ai => :vertex_ai, + :gemini => :gemini, + :anthropic => :anthropic, + :cohere => :cohere, + :"az.ai.inference" => :"az.ai.inference", + :"az.ai.openai" => :"az.ai.openai", + :"azure.ai.inference" => :"azure.ai.inference", + :"azure.ai.openai" => :"azure.ai.openai", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :xai => :xai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai + } + @deprecated """ + Replaced by `gen_ai.provider.name`. + """ @spec gen_ai_system :: :"gen_ai.system" def gen_ai_system do :"gen_ai.system" @@ -559,22 +1443,92 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do def gen_ai_system_values() do %{ :openai => :openai, + :"gcp.gen_ai" => :"gcp.gen_ai", + :"gcp.vertex_ai" => :"gcp.vertex_ai", + :"gcp.gemini" => :"gcp.gemini", :vertex_ai => :vertex_ai, + :gemini => :gemini, :anthropic => :anthropic, - :cohere => :cohere + :cohere => :cohere, + :"az.ai.inference" => :"az.ai.inference", + :"az.ai.openai" => :"az.ai.openai", + :"azure.ai.inference" => :"azure.ai.inference", + :"azure.ai.openai" => :"azure.ai.openai", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :xai => :xai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai } end + @doc """ + The system message or instructions provided to the GenAI model separately from the chat history. + + ### Notes + + This attribute **SHOULD** be used when the corresponding provider or API + allows to provide system instructions or messages separately from the + chat history. + + Instructions that are part of the chat history **SHOULD** be recorded in + `gen_ai.input.messages` attribute instead. + + Instrumentations **MUST** follow [System instructions JSON schema](/docs/gen-ai/gen-ai-system-instructions.json). + + When recorded on spans, it **MAY** be recorded as a JSON string if structured + format is not supported and **SHOULD** be recorded in structured form otherwise. + + Instrumentations **MAY** provide a way for users to filter or truncate + system instructions. + + > [!Warning] + > This attribute may contain sensitive information. + + See [Recording content on attributes](/docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes) + section for more details. + + ### Examples + + ``` + ["[\n {\n \"type\": \"text\",\n \"content\": \"You are an Agent that greet users, always use greetings tool to respond\"\n }\n]\n", "[\n {\n \"type\": \"text\",\n \"content\": \"You are a language translator.\"\n },\n {\n \"type\": \"text\",\n \"content\": \"Your mission is to translate text in English to French.\"\n }\n]\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_instructions() + :"gen_ai.system_instructions" + + ### Erlang + + ```erlang + ?GEN_AI_SYSTEM_INSTRUCTIONS. + 'gen_ai.system_instructions' + ``` + + + """ + @spec gen_ai_system_instructions :: :"gen_ai.system_instructions" + def gen_ai_system_instructions do + :"gen_ai.system_instructions" + end + @typedoc """ The type of token being counted. ### Enum Values * `:input` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Input tokens (prompt, input, etc.) - * `:completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Output tokens (completion, response, etc.) + * `:completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Output tokens (completion, response, etc.)~~ + * `:output` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Output tokens (completion, response, etc.) """ @type gen_ai_token_type_values() :: %{ :input => :input, - :completion => :output + :completion => :output, + :output => :output } @doc """ The type of token being counted. @@ -622,12 +1576,341 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do def gen_ai_token_type_values() do %{ :input => :input, - :completion => :output + :completion => :output, + :output => :output } end + @doc """ + Parameters passed to the tool call. + + ### Notes + + > [!WARNING] + > This attribute may contain sensitive information. + + It's expected to be an object - in case a serialized string is available + to the instrumentation, the instrumentation **SHOULD** do the best effort to + deserialize it to an object. When recorded on spans, it **MAY** be recorded as a JSON string if structured format is not supported and **SHOULD** be recorded in structured form otherwise. + + ### Examples + + ``` + ["{\n \"location\": \"San Francisco?\",\n \"date\": \"2025-10-01\"\n}\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_call_arguments() + :"gen_ai.tool.call.arguments" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_CALL_ARGUMENTS. + 'gen_ai.tool.call.arguments' + ``` + + + """ + @spec gen_ai_tool_call_arguments :: :"gen_ai.tool.call.arguments" + def gen_ai_tool_call_arguments do + :"gen_ai.tool.call.arguments" + end + + @doc """ + The tool call identifier. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["call_mszuSIzqtI65i1wAUOE8w5H4"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_call_id() + :"gen_ai.tool.call.id" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_CALL_ID. + 'gen_ai.tool.call.id' + ``` + + + """ + @spec gen_ai_tool_call_id :: :"gen_ai.tool.call.id" + def gen_ai_tool_call_id do + :"gen_ai.tool.call.id" + end + + @doc """ + The result returned by the tool call (if any and if execution was successful). + + ### Notes + + > [!WARNING] + > This attribute may contain sensitive information. + + It's expected to be an object - in case a serialized string is available + to the instrumentation, the instrumentation **SHOULD** do the best effort to + deserialize it to an object. When recorded on spans, it **MAY** be recorded as a JSON string if structured format is not supported and **SHOULD** be recorded in structured form otherwise. + + ### Examples + + ``` + ["{\n \"temperature_range\": {\n \"high\": 75,\n \"low\": 60\n },\n \"conditions\": \"sunny\"\n}\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_call_result() + :"gen_ai.tool.call.result" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_CALL_RESULT. + 'gen_ai.tool.call.result' + ``` + + + """ + @spec gen_ai_tool_call_result :: :"gen_ai.tool.call.result" + def gen_ai_tool_call_result do + :"gen_ai.tool.call.result" + end + + @doc """ + The list of source system tool definitions available to the GenAI agent or model. + + ### Notes + + The value of this attribute matches source system tool definition format. + + It's expected to be an array of objects where each object represents a tool definition. In case a serialized string is available + to the instrumentation, the instrumentation **SHOULD** do the best effort to + deserialize it to an array. When recorded on spans, it **MAY** be recorded as a JSON string if structured format is not supported and **SHOULD** be recorded in structured form otherwise. + + Since this attribute could be large, it's **NOT** RECOMMENDED to populate + it by default. Instrumentations **MAY** provide a way to enable + populating this attribute. + + ### Examples + + ``` + ["[\n {\n \"type\": \"function\",\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\n \"celsius\",\n \"fahrenheit\"\n ]\n }\n },\n \"required\": [\n \"location\",\n \"unit\"\n ]\n }\n }\n]\n"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_definitions() + :"gen_ai.tool.definitions" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_DEFINITIONS. + 'gen_ai.tool.definitions' + ``` + + + """ + @spec gen_ai_tool_definitions :: :"gen_ai.tool.definitions" + def gen_ai_tool_definitions do + :"gen_ai.tool.definitions" + end + + @doc """ + The tool description. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Multiply two numbers"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_description() + :"gen_ai.tool.description" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_DESCRIPTION. + 'gen_ai.tool.description' + ``` + + + """ + @spec gen_ai_tool_description :: :"gen_ai.tool.description" + def gen_ai_tool_description do + :"gen_ai.tool.description" + end + + @doc """ + Name of the tool utilized by the agent. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Flights"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_name() + :"gen_ai.tool.name" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_NAME. + 'gen_ai.tool.name' + ``` + + + """ + @spec gen_ai_tool_name :: :"gen_ai.tool.name" + def gen_ai_tool_name do + :"gen_ai.tool.name" + end + + @doc """ + Type of the tool utilized by the agent + ### Value type + + Value must be of type `atom() | String.t()`. + ### 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. + + ### Examples + + ``` + ["function", "extension", "datastore"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_tool_type() + :"gen_ai.tool.type" + + ### Erlang + + ```erlang + ?GEN_AI_TOOL_TYPE. + 'gen_ai.tool.type' + ``` + + + """ + @spec gen_ai_tool_type :: :"gen_ai.tool.type" + def gen_ai_tool_type do + :"gen_ai.tool.type" + end + + @doc """ + The number of input tokens written to a provider-managed cache. + ### Value type + + Value must be of type `integer()`. + ### Notes + + The value **SHOULD** be included in `gen_ai.usage.input_tokens`. + + ### Examples + + ``` + [25] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_cache_creation_input_tokens() + :"gen_ai.usage.cache_creation.input_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS. + 'gen_ai.usage.cache_creation.input_tokens' + ``` + + + """ + @spec gen_ai_usage_cache_creation_input_tokens :: :"gen_ai.usage.cache_creation.input_tokens" + def gen_ai_usage_cache_creation_input_tokens do + :"gen_ai.usage.cache_creation.input_tokens" + end + + @doc """ + The number of input tokens served from a provider-managed cache. + ### Value type + + Value must be of type `integer()`. + ### Notes + + The value **SHOULD** be included in `gen_ai.usage.input_tokens`. + + ### Examples + + ``` + [50] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_cache_read_input_tokens() + :"gen_ai.usage.cache_read.input_tokens" + + ### Erlang + + ```erlang + ?GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS. + 'gen_ai.usage.cache_read.input_tokens' + ``` + + + """ + @spec gen_ai_usage_cache_read_input_tokens :: :"gen_ai.usage.cache_read.input_tokens" + def gen_ai_usage_cache_read_input_tokens do + :"gen_ai.usage.cache_read.input_tokens" + end + @deprecated """ - Replaced by `gen_ai.usage.output_tokens` attribute. + Replaced by `gen_ai.usage.output_tokens`. """ @spec gen_ai_usage_completion_tokens :: :"gen_ai.usage.completion_tokens" def gen_ai_usage_completion_tokens do @@ -639,6 +1922,13 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Value type Value must be of type `integer()`. + ### Notes + + This value **SHOULD** include all types of input tokens, including cached tokens. + Instrumentations **SHOULD** make a best effort to populate this value, using a total + provided by the provider when available or, depending on the provider API, + by summing different token types parsed from the provider output. + ### Examples ``` @@ -699,7 +1989,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do end @deprecated """ - Replaced by `gen_ai.usage.input_tokens` attribute. + Replaced by `gen_ai.usage.input_tokens`. """ @spec gen_ai_usage_prompt_tokens :: :"gen_ai.usage.prompt_tokens" def gen_ai_usage_prompt_tokens do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/geo_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/geo_attributes.ex new file mode 100644 index 000000000..6c70ac120 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/geo_attributes.ex @@ -0,0 +1,277 @@ +defmodule OpenTelemetry.SemConv.Incubating.GeoAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Geo attributes. + """ + + @typedoc """ + Two-letter code representing continent’s name. + + + ### Enum Values + * `:af` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Africa + * `:an` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Antarctica + * `:as` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Asia + * `:eu` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Europe + * `:na` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - North America + * `:oc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Oceania + * `:sa` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - South America + """ + @type geo_continent_code_values() :: %{ + :af => :AF, + :an => :AN, + :as => :AS, + :eu => :EU, + :na => :NA, + :oc => :OC, + :sa => :SA + } + @doc """ + Two-letter code representing continent’s name. + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_continent_code() + :"geo.continent.code" + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_continent_code_values().af + :AF + + iex> %{OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_continent_code() => OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_continent_code_values().af} + %{:"geo.continent.code" => :AF} + + ### Erlang + + ```erlang + ?GEO_CONTINENT_CODE. + 'geo.continent.code' + + ?GEO_CONTINENT_CODE_VALUES_AF. + 'AF' + + \#{?GEO_CONTINENT_CODE => ?GEO_CONTINENT_CODE_VALUES_AF}. + \#{'geo.continent.code' => 'AF'} + ``` + + + """ + @spec geo_continent_code :: :"geo.continent.code" + def geo_continent_code do + :"geo.continent.code" + end + + @spec geo_continent_code_values() :: geo_continent_code_values() + def geo_continent_code_values() do + %{ + :af => :AF, + :an => :AN, + :as => :AS, + :eu => :EU, + :na => :NA, + :oc => :OC, + :sa => :SA + } + end + + @doc """ + Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CA"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_country_iso_code() + :"geo.country.iso_code" + + ### Erlang + + ```erlang + ?GEO_COUNTRY_ISO_CODE. + 'geo.country.iso_code' + ``` + + + """ + @spec geo_country_iso_code :: :"geo.country.iso_code" + def geo_country_iso_code do + :"geo.country.iso_code" + end + + @doc """ + Locality name. Represents the name of a city, town, village, or similar populated place. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Montreal", "Berlin"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_locality_name() + :"geo.locality.name" + + ### Erlang + + ```erlang + ?GEO_LOCALITY_NAME. + 'geo.locality.name' + ``` + + + """ + @spec geo_locality_name :: :"geo.locality.name" + def geo_locality_name do + :"geo.locality.name" + end + + @doc """ + Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). + + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [45.505918] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_location_lat() + :"geo.location.lat" + + ### Erlang + + ```erlang + ?GEO_LOCATION_LAT. + 'geo.location.lat' + ``` + + + """ + @spec geo_location_lat :: :"geo.location.lat" + def geo_location_lat do + :"geo.location.lat" + end + + @doc """ + Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84). + + ### Value type + + Value must be of type `float()`. + ### Examples + + ``` + [-73.61483] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_location_lon() + :"geo.location.lon" + + ### Erlang + + ```erlang + ?GEO_LOCATION_LON. + 'geo.location.lon' + ``` + + + """ + @spec geo_location_lon :: :"geo.location.lon" + def geo_location_lon do + :"geo.location.lon" + end + + @doc """ + Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["94040"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_postal_code() + :"geo.postal_code" + + ### Erlang + + ```erlang + ?GEO_POSTAL_CODE. + 'geo.postal_code' + ``` + + + """ + @spec geo_postal_code :: :"geo.postal_code" + def geo_postal_code do + :"geo.postal_code" + end + + @doc """ + Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CA-QC"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GeoAttributes.geo_region_iso_code() + :"geo.region.iso_code" + + ### Erlang + + ```erlang + ?GEO_REGION_ISO_CODE. + 'geo.region.iso_code' + ``` + + + """ + @spec geo_region_iso_code :: :"geo.region.iso_code" + def geo_region_iso_code do + :"geo.region.iso_code" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hardware_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hardware_attributes.ex new file mode 100644 index 000000000..7b0c3fb13 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hardware_attributes.ex @@ -0,0 +1,1170 @@ +defmodule OpenTelemetry.SemConv.Incubating.HardwareAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Hardware attributes. + """ + + @doc """ + Design capacity in Watts-hours or Amper-hours + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["9.3Ah", "50Wh"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_capacity() + :"hw.battery.capacity" + + ### Erlang + + ```erlang + ?HW_BATTERY_CAPACITY. + 'hw.battery.capacity' + ``` + + + """ + @spec hw_battery_capacity :: :"hw.battery.capacity" + def hw_battery_capacity do + :"hw.battery.capacity" + end + + @doc """ + Battery [chemistry](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html), e.g. Lithium-Ion, Nickel-Cadmium, etc. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Li-ion", "NiMH"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_chemistry() + :"hw.battery.chemistry" + + ### Erlang + + ```erlang + ?HW_BATTERY_CHEMISTRY. + 'hw.battery.chemistry' + ``` + + + """ + @spec hw_battery_chemistry :: :"hw.battery.chemistry" + def hw_battery_chemistry do + :"hw.battery.chemistry" + end + + @typedoc """ + The current state of the battery + + + ### Enum Values + * `:charging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Charging + * `:discharging` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Discharging + """ + @type hw_battery_state_values() :: %{ + :charging => :charging, + :discharging => :discharging + } + @doc """ + The current state of the battery + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_state() + :"hw.battery.state" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_state_values().charging + :charging + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_state() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_battery_state_values().charging} + %{:"hw.battery.state" => :charging} + + ### Erlang + + ```erlang + ?HW_BATTERY_STATE. + 'hw.battery.state' + + ?HW_BATTERY_STATE_VALUES_CHARGING. + 'charging' + + \#{?HW_BATTERY_STATE => ?HW_BATTERY_STATE_VALUES_CHARGING}. + \#{'hw.battery.state' => 'charging'} + ``` + + + """ + @spec hw_battery_state :: :"hw.battery.state" + def hw_battery_state do + :"hw.battery.state" + end + + @spec hw_battery_state_values() :: hw_battery_state_values() + def hw_battery_state_values() do + %{ + :charging => :charging, + :discharging => :discharging + } + end + + @doc """ + BIOS version of the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.2.3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_bios_version() + :"hw.bios_version" + + ### Erlang + + ```erlang + ?HW_BIOS_VERSION. + 'hw.bios_version' + ``` + + + """ + @spec hw_bios_version :: :"hw.bios_version" + def hw_bios_version do + :"hw.bios_version" + end + + @doc """ + Driver version for the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["10.2.1-3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_driver_version() + :"hw.driver_version" + + ### Erlang + + ```erlang + ?HW_DRIVER_VERSION. + 'hw.driver_version' + ``` + + + """ + @spec hw_driver_version :: :"hw.driver_version" + def hw_driver_version do + :"hw.driver_version" + end + + @doc """ + Type of the enclosure (useful for modular systems) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Computer", "Storage", "Switch"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_enclosure_type() + :"hw.enclosure.type" + + ### Erlang + + ```erlang + ?HW_ENCLOSURE_TYPE. + 'hw.enclosure.type' + ``` + + + """ + @spec hw_enclosure_type :: :"hw.enclosure.type" + def hw_enclosure_type do + :"hw.enclosure.type" + end + + @doc """ + Firmware version of the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2.0.1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_firmware_version() + :"hw.firmware_version" + + ### Erlang + + ```erlang + ?HW_FIRMWARE_VERSION. + 'hw.firmware_version' + ``` + + + """ + @spec hw_firmware_version :: :"hw.firmware_version" + def hw_firmware_version do + :"hw.firmware_version" + end + + @typedoc """ + Type of task the GPU is performing + + + ### Enum Values + * `:decoder` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Decoder + * `:encoder` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Encoder + * `:general` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - General + """ + @type hw_gpu_task_values() :: %{ + :decoder => :decoder, + :encoder => :encoder, + :general => :general + } + @doc """ + Type of task the GPU is performing + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_gpu_task() + :"hw.gpu.task" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_gpu_task_values().decoder + :decoder + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_gpu_task() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_gpu_task_values().decoder} + %{:"hw.gpu.task" => :decoder} + + ### Erlang + + ```erlang + ?HW_GPU_TASK. + 'hw.gpu.task' + + ?HW_GPU_TASK_VALUES_DECODER. + 'decoder' + + \#{?HW_GPU_TASK => ?HW_GPU_TASK_VALUES_DECODER}. + \#{'hw.gpu.task' => 'decoder'} + ``` + + + """ + @spec hw_gpu_task :: :"hw.gpu.task" + def hw_gpu_task do + :"hw.gpu.task" + end + + @spec hw_gpu_task_values() :: hw_gpu_task_values() + def hw_gpu_task_values() do + %{ + :decoder => :decoder, + :encoder => :encoder, + :general => :general + } + end + + @doc """ + An identifier for the hardware component, unique within the monitored host + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["win32battery_battery_testsysa33_1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_id() + :"hw.id" + + ### Erlang + + ```erlang + ?HW_ID. + 'hw.id' + ``` + + + """ + @spec hw_id :: :"hw.id" + def hw_id do + :"hw.id" + end + + @typedoc """ + Type of limit for hardware components + + + ### Enum Values + * `:critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Critical + * `:degraded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Degraded + * `:high_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High Critical + * `:high_degraded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - High Degraded + * `:low_critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low Critical + * `:low_degraded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Low Degraded + * `:max` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Maximum + * `:throttled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Throttled + * `:turbo` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Turbo + """ + @type hw_limit_type_values() :: %{ + :critical => :critical, + :degraded => :degraded, + :high_critical => :"high.critical", + :high_degraded => :"high.degraded", + :low_critical => :"low.critical", + :low_degraded => :"low.degraded", + :max => :max, + :throttled => :throttled, + :turbo => :turbo + } + @doc """ + Type of limit for hardware components + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_limit_type() + :"hw.limit_type" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_limit_type_values().critical + :critical + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_limit_type() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_limit_type_values().critical} + %{:"hw.limit_type" => :critical} + + ### Erlang + + ```erlang + ?HW_LIMIT_TYPE. + 'hw.limit_type' + + ?HW_LIMIT_TYPE_VALUES_CRITICAL. + 'critical' + + \#{?HW_LIMIT_TYPE => ?HW_LIMIT_TYPE_VALUES_CRITICAL}. + \#{'hw.limit_type' => 'critical'} + ``` + + + """ + @spec hw_limit_type :: :"hw.limit_type" + def hw_limit_type do + :"hw.limit_type" + end + + @spec hw_limit_type_values() :: hw_limit_type_values() + def hw_limit_type_values() do + %{ + :critical => :critical, + :degraded => :degraded, + :high_critical => :"high.critical", + :high_degraded => :"high.degraded", + :low_critical => :"low.critical", + :low_degraded => :"low.degraded", + :max => :max, + :throttled => :throttled, + :turbo => :turbo + } + end + + @doc """ + RAID Level of the logical disk + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["RAID0+1", "RAID5", "RAID10"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_logical_disk_raid_level() + :"hw.logical_disk.raid_level" + + ### Erlang + + ```erlang + ?HW_LOGICAL_DISK_RAID_LEVEL. + 'hw.logical_disk.raid_level' + ``` + + + """ + @spec hw_logical_disk_raid_level :: :"hw.logical_disk.raid_level" + def hw_logical_disk_raid_level do + :"hw.logical_disk.raid_level" + end + + @typedoc """ + State of the logical disk space usage + + + ### Enum Values + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Used + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Free + """ + @type hw_logical_disk_state_values() :: %{ + :used => :used, + :free => :free + } + @doc """ + State of the logical disk space usage + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_logical_disk_state() + :"hw.logical_disk.state" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_logical_disk_state_values().used + :used + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_logical_disk_state() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_logical_disk_state_values().used} + %{:"hw.logical_disk.state" => :used} + + ### Erlang + + ```erlang + ?HW_LOGICAL_DISK_STATE. + 'hw.logical_disk.state' + + ?HW_LOGICAL_DISK_STATE_VALUES_USED. + 'used' + + \#{?HW_LOGICAL_DISK_STATE => ?HW_LOGICAL_DISK_STATE_VALUES_USED}. + \#{'hw.logical_disk.state' => 'used'} + ``` + + + """ + @spec hw_logical_disk_state :: :"hw.logical_disk.state" + def hw_logical_disk_state do + :"hw.logical_disk.state" + end + + @spec hw_logical_disk_state_values() :: hw_logical_disk_state_values() + def hw_logical_disk_state_values() do + %{ + :used => :used, + :free => :free + } + end + + @doc """ + Type of the memory module + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["DDR4", "DDR5", "LPDDR5"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_memory_type() + :"hw.memory.type" + + ### Erlang + + ```erlang + ?HW_MEMORY_TYPE. + 'hw.memory.type' + ``` + + + """ + @spec hw_memory_type :: :"hw.memory.type" + def hw_memory_type do + :"hw.memory.type" + end + + @doc """ + Descriptive model name of the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["PERC H740P", "Intel(R) Core(TM) i7-10700K", "Dell XPS 15 Battery"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_model() + :"hw.model" + + ### Erlang + + ```erlang + ?HW_MODEL. + 'hw.model' + ``` + + + """ + @spec hw_model :: :"hw.model" + def hw_model do + :"hw.model" + end + + @doc """ + An easily-recognizable name for the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["eth0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_name() + :"hw.name" + + ### Erlang + + ```erlang + ?HW_NAME. + 'hw.name' + ``` + + + """ + @spec hw_name :: :"hw.name" + def hw_name do + :"hw.name" + end + + @doc """ + Logical addresses of the adapter (e.g. IP address, or WWPN) + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + [["172.16.8.21", "57.11.193.42"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_network_logical_addresses() + :"hw.network.logical_addresses" + + ### Erlang + + ```erlang + ?HW_NETWORK_LOGICAL_ADDRESSES. + 'hw.network.logical_addresses' + ``` + + + """ + @spec hw_network_logical_addresses :: :"hw.network.logical_addresses" + def hw_network_logical_addresses do + :"hw.network.logical_addresses" + end + + @doc """ + Physical address of the adapter (e.g. MAC address, or WWNN) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["00-90-F5-E9-7B-36"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_network_physical_address() + :"hw.network.physical_address" + + ### Erlang + + ```erlang + ?HW_NETWORK_PHYSICAL_ADDRESS. + 'hw.network.physical_address' + ``` + + + """ + @spec hw_network_physical_address :: :"hw.network.physical_address" + def hw_network_physical_address do + :"hw.network.physical_address" + end + + @doc """ + Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["dellStorage_perc_0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_parent() + :"hw.parent" + + ### Erlang + + ```erlang + ?HW_PARENT. + 'hw.parent' + ``` + + + """ + @spec hw_parent :: :"hw.parent" + def hw_parent do + :"hw.parent" + end + + @doc """ + [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute of the physical disk + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Spin Retry Count", "Seek Error Rate", "Raw Read Error Rate"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_smart_attribute() + :"hw.physical_disk.smart_attribute" + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_SMART_ATTRIBUTE. + 'hw.physical_disk.smart_attribute' + ``` + + + """ + @spec hw_physical_disk_smart_attribute :: :"hw.physical_disk.smart_attribute" + def hw_physical_disk_smart_attribute do + :"hw.physical_disk.smart_attribute" + end + + @typedoc """ + State of the physical disk endurance utilization + + + ### Enum Values + * `:remaining` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Remaining + """ + @type hw_physical_disk_state_values() :: %{ + :remaining => :remaining + } + @doc """ + State of the physical disk endurance utilization + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_state() + :"hw.physical_disk.state" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_state_values().remaining + :remaining + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_state() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_state_values().remaining} + %{:"hw.physical_disk.state" => :remaining} + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_STATE. + 'hw.physical_disk.state' + + ?HW_PHYSICAL_DISK_STATE_VALUES_REMAINING. + 'remaining' + + \#{?HW_PHYSICAL_DISK_STATE => ?HW_PHYSICAL_DISK_STATE_VALUES_REMAINING}. + \#{'hw.physical_disk.state' => 'remaining'} + ``` + + + """ + @spec hw_physical_disk_state :: :"hw.physical_disk.state" + def hw_physical_disk_state do + :"hw.physical_disk.state" + end + + @spec hw_physical_disk_state_values() :: hw_physical_disk_state_values() + def hw_physical_disk_state_values() do + %{ + :remaining => :remaining + } + end + + @doc """ + Type of the physical disk + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["HDD", "SSD", "10K"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_physical_disk_type() + :"hw.physical_disk.type" + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_TYPE. + 'hw.physical_disk.type' + ``` + + + """ + @spec hw_physical_disk_type :: :"hw.physical_disk.type" + def hw_physical_disk_type do + :"hw.physical_disk.type" + end + + @doc """ + Location of the sensor + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["cpu0", "ps1", "INLET", "CPU0_DIE", "AMBIENT", "MOTHERBOARD", "PS0 V3_3", "MAIN_12V", "CPU_VCORE"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_sensor_location() + :"hw.sensor_location" + + ### Erlang + + ```erlang + ?HW_SENSOR_LOCATION. + 'hw.sensor_location' + ``` + + + """ + @spec hw_sensor_location :: :"hw.sensor_location" + def hw_sensor_location do + :"hw.sensor_location" + end + + @doc """ + Serial number of the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["CNFCP0123456789"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_serial_number() + :"hw.serial_number" + + ### Erlang + + ```erlang + ?HW_SERIAL_NUMBER. + 'hw.serial_number' + ``` + + + """ + @spec hw_serial_number :: :"hw.serial_number" + def hw_serial_number do + :"hw.serial_number" + end + + @typedoc """ + The current state of the component + + + ### Enum Values + * `:degraded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Degraded + * `:failed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Failed + * `:needs_cleaning` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Needs Cleaning + * `:ok` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OK + * `:predicted_failure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Predicted Failure + """ + @type hw_state_values() :: %{ + :degraded => :degraded, + :failed => :failed, + :needs_cleaning => :needs_cleaning, + :ok => :ok, + :predicted_failure => :predicted_failure + } + @doc """ + The current state of the component + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_state() + :"hw.state" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_state_values().degraded + :degraded + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_state() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_state_values().degraded} + %{:"hw.state" => :degraded} + + ### Erlang + + ```erlang + ?HW_STATE. + 'hw.state' + + ?HW_STATE_VALUES_DEGRADED. + 'degraded' + + \#{?HW_STATE => ?HW_STATE_VALUES_DEGRADED}. + \#{'hw.state' => 'degraded'} + ``` + + + """ + @spec hw_state :: :"hw.state" + def hw_state do + :"hw.state" + end + + @spec hw_state_values() :: hw_state_values() + def hw_state_values() do + %{ + :degraded => :degraded, + :failed => :failed, + :needs_cleaning => :needs_cleaning, + :ok => :ok, + :predicted_failure => :predicted_failure + } + end + + @typedoc """ + Type of tape drive operation + + + ### Enum Values + * `:mount` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Mount + * `:unmount` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Unmount + * `:clean` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Clean + """ + @type hw_tape_drive_operation_type_values() :: %{ + :mount => :mount, + :unmount => :unmount, + :clean => :clean + } + @doc """ + Type of tape drive operation + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_tape_drive_operation_type() + :"hw.tape_drive.operation_type" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_tape_drive_operation_type_values().mount + :mount + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_tape_drive_operation_type() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_tape_drive_operation_type_values().mount} + %{:"hw.tape_drive.operation_type" => :mount} + + ### Erlang + + ```erlang + ?HW_TAPE_DRIVE_OPERATION_TYPE. + 'hw.tape_drive.operation_type' + + ?HW_TAPE_DRIVE_OPERATION_TYPE_VALUES_MOUNT. + 'mount' + + \#{?HW_TAPE_DRIVE_OPERATION_TYPE => ?HW_TAPE_DRIVE_OPERATION_TYPE_VALUES_MOUNT}. + \#{'hw.tape_drive.operation_type' => 'mount'} + ``` + + + """ + @spec hw_tape_drive_operation_type :: :"hw.tape_drive.operation_type" + def hw_tape_drive_operation_type do + :"hw.tape_drive.operation_type" + end + + @spec hw_tape_drive_operation_type_values() :: hw_tape_drive_operation_type_values() + def hw_tape_drive_operation_type_values() do + %{ + :mount => :mount, + :unmount => :unmount, + :clean => :clean + } + end + + @typedoc """ + Type of the component + + + ### Enum Values + * `:battery` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Battery + * `:cpu` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CPU + * `:disk_controller` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Disk controller + * `:enclosure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Enclosure + * `:fan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Fan + * `:gpu` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - GPU + * `:logical_disk` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Logical disk + * `:memory` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Memory + * `:network` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Network + * `:physical_disk` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Physical disk + * `:power_supply` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Power supply + * `:tape_drive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Tape drive + * `:temperature` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Temperature + * `:voltage` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Voltage + """ + @type hw_type_values() :: %{ + :battery => :battery, + :cpu => :cpu, + :disk_controller => :disk_controller, + :enclosure => :enclosure, + :fan => :fan, + :gpu => :gpu, + :logical_disk => :logical_disk, + :memory => :memory, + :network => :network, + :physical_disk => :physical_disk, + :power_supply => :power_supply, + :tape_drive => :tape_drive, + :temperature => :temperature, + :voltage => :voltage + } + @doc """ + Type of the component + + + ### Notes + + Describes the category of the hardware component for which `hw.state` is being reported. For example, `hw.type=temperature` along with `hw.state=degraded` would indicate that the temperature of the hardware component has been reported as `degraded`. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_type() + :"hw.type" + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_type_values().battery + :battery + + iex> %{OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_type() => OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_type_values().battery} + %{:"hw.type" => :battery} + + ### Erlang + + ```erlang + ?HW_TYPE. + 'hw.type' + + ?HW_TYPE_VALUES_BATTERY. + 'battery' + + \#{?HW_TYPE => ?HW_TYPE_VALUES_BATTERY}. + \#{'hw.type' => 'battery'} + ``` + + + """ + @spec hw_type :: :"hw.type" + def hw_type do + :"hw.type" + end + + @spec hw_type_values() :: hw_type_values() + def hw_type_values() do + %{ + :battery => :battery, + :cpu => :cpu, + :disk_controller => :disk_controller, + :enclosure => :enclosure, + :fan => :fan, + :gpu => :gpu, + :logical_disk => :logical_disk, + :memory => :memory, + :network => :network, + :physical_disk => :physical_disk, + :power_supply => :power_supply, + :tape_drive => :tape_drive, + :temperature => :temperature, + :voltage => :voltage + } + end + + @doc """ + Vendor name of the hardware component + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Dell", "HP", "Intel", "AMD", "LSI", "Lenovo"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HardwareAttributes.hw_vendor() + :"hw.vendor" + + ### Erlang + + ```erlang + ?HW_VENDOR. + 'hw.vendor' + ``` + + + """ + @spec hw_vendor :: :"hw.vendor" + def hw_vendor do + :"hw.vendor" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex index a84f76120..4d0b436f4 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex @@ -427,7 +427,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HostAttributes do ### Examples ``` - ["192.168.1.140", "fe80::abc2:4a28:737a:609e"] + [["192.168.1.140", "fe80::abc2:4a28:737a:609e"]] ``` @@ -464,7 +464,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HostAttributes do ### Examples ``` - ["AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"] + [["AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"]] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex index 87d7789bb..5c5c6db8c 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex @@ -89,7 +89,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @typedoc """ - Deprecated, use `network.protocol.name` instead. + Deprecated, use `network.protocol.name` and `network.protocol.version` instead. ### Enum Values * `:http_1_0` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HTTP/1.0 @@ -108,7 +108,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do :quic => :QUIC } @deprecated """ - Replaced by `network.protocol.name`. + Split into `network.protocol.name` and `network.protocol.version` """ @spec http_flavor :: :"http.flavor" def http_flavor do @@ -129,6 +129,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do @deprecated """ Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. + """ @spec http_host :: :"http.host" def http_host do @@ -300,7 +301,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @deprecated """ - Replace by `http.response.body.size`. + Replaced by `http.response.body.size`. """ @spec http_response_content_length_uncompressed :: :"http.response_content_length_uncompressed" def http_response_content_length_uncompressed do @@ -308,7 +309,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @deprecated """ - Replaced by `url.scheme` instead. + Replaced by `url.scheme`. """ @spec http_scheme :: :"http.scheme" def http_scheme do @@ -332,7 +333,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @deprecated """ - Split to `url.path` and `url.query. + Split to `url.path` and `url.query`. """ @spec http_target :: :"http.target" def http_target do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/jsonrpc_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/jsonrpc_attributes.ex new file mode 100644 index 000000000..e734ec8b8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/jsonrpc_attributes.ex @@ -0,0 +1,77 @@ +defmodule OpenTelemetry.SemConv.Incubating.JsonrpcAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Jsonrpc attributes. + """ + + @doc """ + Protocol version, as specified in the `jsonrpc` property of the request and its corresponding response. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2.0", "1.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.JsonrpcAttributes.jsonrpc_protocol_version() + :"jsonrpc.protocol.version" + + ### Erlang + + ```erlang + ?JSONRPC_PROTOCOL_VERSION. + 'jsonrpc.protocol.version' + ``` + + + """ + @spec jsonrpc_protocol_version :: :"jsonrpc.protocol.version" + def jsonrpc_protocol_version do + :"jsonrpc.protocol.version" + end + + @doc """ + A string representation of the `id` property of the request and its corresponding response. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Under the [JSON-RPC specification](https://www.jsonrpc.org/specification), the `id` property may be a string, number, null, or omitted entirely. When omitted, the request is treated as a notification. Using `null` is not equivalent to omitting the `id`, but it is discouraged. + Instrumentations **SHOULD** **NOT** capture this attribute when the `id` is `null` or omitted. + + ### Examples + + ``` + ["10", "request-7"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.JsonrpcAttributes.jsonrpc_request_id() + :"jsonrpc.request.id" + + ### Erlang + + ```erlang + ?JSONRPC_REQUEST_ID. + 'jsonrpc.request.id' + ``` + + + """ + @spec jsonrpc_request_id :: :"jsonrpc.request.id" + def jsonrpc_request_id do + :"jsonrpc.request.id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex index e220fd828..60816bac0 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/k8s_attributes.ex @@ -61,9 +61,9 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do Which states: > If generated according to one of the mechanisms defined in Rec. - ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - different from all other UUIDs generated before 3603 A.D., or is - extremely likely to be different (depending on the mechanism chosen). + > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + > different from all other UUIDs generated before 3603 A.D., or is + > extremely likely to be different (depending on the mechanism chosen). Therefore, UIDs between clusters should be extremely unlikely to conflict. @@ -190,6 +190,240 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do :"k8s.container.status.last_terminated_reason" end + @typedoc """ + The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core) + + + ### Enum Values + * `:container_creating` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container is being created. + * `:crash_loop_back_off` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container is in a crash loop back off state. + * `:create_container_config_error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - There was an error creating the container configuration. + * `:err_image_pull` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - There was an error pulling the container image. + * `:image_pull_back_off` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container image pull is in back off state. + * `:oom_killed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container was killed due to out of memory. + * `:completed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container has completed execution. + * `:error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - There was an error with the container. + * `:container_cannot_run` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container cannot run. + """ + @type k8s_container_status_reason_values() :: %{ + :container_creating => :ContainerCreating, + :crash_loop_back_off => :CrashLoopBackOff, + :create_container_config_error => :CreateContainerConfigError, + :err_image_pull => :ErrImagePull, + :image_pull_back_off => :ImagePullBackOff, + :oom_killed => :OOMKilled, + :completed => :Completed, + :error => :Error, + :container_cannot_run => :ContainerCannotRun + } + @doc """ + The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core) + + + ### Examples + + ``` + ["ContainerCreating", "CrashLoopBackOff", "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff", "OOMKilled", "Completed", "Error", "ContainerCannotRun"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_reason() + :"k8s.container.status.reason" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_reason_values().container_creating + :ContainerCreating + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_reason() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_reason_values().container_creating} + %{:"k8s.container.status.reason" => :ContainerCreating} + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STATUS_REASON. + 'k8s.container.status.reason' + + ?K8S_CONTAINER_STATUS_REASON_VALUES_CONTAINER_CREATING. + 'ContainerCreating' + + \#{?K8S_CONTAINER_STATUS_REASON => ?K8S_CONTAINER_STATUS_REASON_VALUES_CONTAINER_CREATING}. + \#{'k8s.container.status.reason' => 'ContainerCreating'} + ``` + + + """ + @spec k8s_container_status_reason :: :"k8s.container.status.reason" + def k8s_container_status_reason do + :"k8s.container.status.reason" + end + + @spec k8s_container_status_reason_values() :: k8s_container_status_reason_values() + def k8s_container_status_reason_values() do + %{ + :container_creating => :ContainerCreating, + :crash_loop_back_off => :CrashLoopBackOff, + :create_container_config_error => :CreateContainerConfigError, + :err_image_pull => :ErrImagePull, + :image_pull_back_off => :ImagePullBackOff, + :oom_killed => :OOMKilled, + :completed => :Completed, + :error => :Error, + :container_cannot_run => :ContainerCannotRun + } + end + + @typedoc """ + The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core) + + + ### Enum Values + * `:terminated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container has terminated. + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container is running. + * `:waiting` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The container is waiting. + """ + @type k8s_container_status_state_values() :: %{ + :terminated => :terminated, + :running => :running, + :waiting => :waiting + } + @doc """ + The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core) + + + ### Examples + + ``` + ["terminated", "running", "waiting"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_state() + :"k8s.container.status.state" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_state_values().terminated + :terminated + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_state() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_container_status_state_values().terminated} + %{:"k8s.container.status.state" => :terminated} + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STATUS_STATE. + 'k8s.container.status.state' + + ?K8S_CONTAINER_STATUS_STATE_VALUES_TERMINATED. + 'terminated' + + \#{?K8S_CONTAINER_STATUS_STATE => ?K8S_CONTAINER_STATUS_STATE_VALUES_TERMINATED}. + \#{'k8s.container.status.state' => 'terminated'} + ``` + + + """ + @spec k8s_container_status_state :: :"k8s.container.status.state" + def k8s_container_status_state do + :"k8s.container.status.state" + end + + @spec k8s_container_status_state_values() :: k8s_container_status_state_values() + def k8s_container_status_state_values() do + %{ + :terminated => :terminated, + :running => :running, + :waiting => :waiting + } + end + + @doc """ + The cronjob annotation placed on the CronJob, the `` being the annotation name, the value being the annotation value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - An annotation `retries` with value `4` **SHOULD** be recorded as the + `k8s.cronjob.annotation.retries` attribute with value `"4"`. + - An annotation `data` with empty string value **SHOULD** be recorded as + the `k8s.cronjob.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["4", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_annotation() + :"k8s.cronjob.annotation" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_ANNOTATION. + 'k8s.cronjob.annotation' + ``` + + + """ + @spec k8s_cronjob_annotation :: :"k8s.cronjob.annotation" + def k8s_cronjob_annotation do + :"k8s.cronjob.annotation" + end + + @doc """ + The label placed on the CronJob, the `` being the label name, the value being the label value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - A label `type` with value `weekly` **SHOULD** be recorded as the + `k8s.cronjob.label.type` attribute with value `"weekly"`. + - A label `automated` with empty string value **SHOULD** be recorded as + the `k8s.cronjob.label.automated` attribute with value `""`. + + ### Examples + + ``` + ["weekly", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_label() + :"k8s.cronjob.label" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_LABEL. + 'k8s.cronjob.label' + ``` + + + """ + @spec k8s_cronjob_label :: :"k8s.cronjob.label" + def k8s_cronjob_label do + :"k8s.cronjob.label" + end + @doc """ The name of the CronJob. @@ -257,139 +491,2232 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do end @doc """ - The name of the DaemonSet. + The annotation placed on the DaemonSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `1` **SHOULD** be recorded + as the `k8s.daemonset.annotation.replicas` attribute with value `"1"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.daemonset.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["1", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_annotation() + :"k8s.daemonset.annotation" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_ANNOTATION. + 'k8s.daemonset.annotation' + ``` + + + """ + @spec k8s_daemonset_annotation :: :"k8s.daemonset.annotation" + def k8s_daemonset_annotation do + :"k8s.daemonset.annotation" + end + + @doc """ + The label placed on the DaemonSet, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `app` with value `guestbook` **SHOULD** be recorded + as the `k8s.daemonset.label.app` attribute with value `"guestbook"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.daemonset.label.injected` attribute with value `""`. + + ### Examples + + ``` + ["guestbook", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_label() + :"k8s.daemonset.label" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_LABEL. + 'k8s.daemonset.label' + ``` + + + """ + @spec k8s_daemonset_label :: :"k8s.daemonset.label" + def k8s_daemonset_label do + :"k8s.daemonset.label" + end + + @doc """ + The name of the DaemonSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_name() + :"k8s.daemonset.name" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NAME. + 'k8s.daemonset.name' + ``` + + + """ + @spec k8s_daemonset_name :: :"k8s.daemonset.name" + def k8s_daemonset_name do + :"k8s.daemonset.name" + end + + @doc """ + The UID of the DaemonSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_uid() + :"k8s.daemonset.uid" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_UID. + 'k8s.daemonset.uid' + ``` + + + """ + @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" + def k8s_daemonset_uid do + :"k8s.daemonset.uid" + end + + @doc """ + The annotation placed on the Deployment, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `1` **SHOULD** be recorded + as the `k8s.deployment.annotation.replicas` attribute with value `"1"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.deployment.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["1", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_annotation() + :"k8s.deployment.annotation" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_ANNOTATION. + 'k8s.deployment.annotation' + ``` + + + """ + @spec k8s_deployment_annotation :: :"k8s.deployment.annotation" + def k8s_deployment_annotation do + :"k8s.deployment.annotation" + end + + @doc """ + The label placed on the Deployment, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `0` **SHOULD** be recorded + as the `k8s.deployment.label.app` attribute with value `"guestbook"`. + - A label `injected` with empty string value **SHOULD** be recorded as + the `k8s.deployment.label.injected` attribute with value `""`. + + ### Examples + + ``` + ["guestbook", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_label() + :"k8s.deployment.label" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_LABEL. + 'k8s.deployment.label' + ``` + + + """ + @spec k8s_deployment_label :: :"k8s.deployment.label" + def k8s_deployment_label do + :"k8s.deployment.label" + end + + @doc """ + The name of the Deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_name() + :"k8s.deployment.name" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_NAME. + 'k8s.deployment.name' + ``` + + + """ + @spec k8s_deployment_name :: :"k8s.deployment.name" + def k8s_deployment_name do + :"k8s.deployment.name" + end + + @doc """ + The UID of the Deployment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_uid() + :"k8s.deployment.uid" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_UID. + 'k8s.deployment.uid' + ``` + + + """ + @spec k8s_deployment_uid :: :"k8s.deployment.uid" + def k8s_deployment_uid do + :"k8s.deployment.uid" + end + + @doc """ + The type of metric source for the horizontal pod autoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute reflects the `type` field of spec.metrics[] in the HPA. + + ### Examples + + ``` + ["Resource", "ContainerResource"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_metric_type() + :"k8s.hpa.metric.type" + + ### Erlang + + ```erlang + ?K8S_HPA_METRIC_TYPE. + 'k8s.hpa.metric.type' + ``` + + + """ + @spec k8s_hpa_metric_type :: :"k8s.hpa.metric.type" + def k8s_hpa_metric_type do + :"k8s.hpa.metric.type" + end + + @doc """ + The name of the horizontal pod autoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_name() + :"k8s.hpa.name" + + ### Erlang + + ```erlang + ?K8S_HPA_NAME. + 'k8s.hpa.name' + ``` + + + """ + @spec k8s_hpa_name :: :"k8s.hpa.name" + def k8s_hpa_name do + :"k8s.hpa.name" + end + + @doc """ + The API version of the target resource to scale for the HorizontalPodAutoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec. + + ### Examples + + ``` + ["apps/v1", "autoscaling/v2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_scaletargetref_api_version() + :"k8s.hpa.scaletargetref.api_version" + + ### Erlang + + ```erlang + ?K8S_HPA_SCALETARGETREF_API_VERSION. + 'k8s.hpa.scaletargetref.api_version' + ``` + + + """ + @spec k8s_hpa_scaletargetref_api_version :: :"k8s.hpa.scaletargetref.api_version" + def k8s_hpa_scaletargetref_api_version do + :"k8s.hpa.scaletargetref.api_version" + end + + @doc """ + The kind of the target resource to scale for the HorizontalPodAutoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This maps to the `kind` field in the `scaleTargetRef` of the HPA spec. + + ### Examples + + ``` + ["Deployment", "StatefulSet"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_scaletargetref_kind() + :"k8s.hpa.scaletargetref.kind" + + ### Erlang + + ```erlang + ?K8S_HPA_SCALETARGETREF_KIND. + 'k8s.hpa.scaletargetref.kind' + ``` + + + """ + @spec k8s_hpa_scaletargetref_kind :: :"k8s.hpa.scaletargetref.kind" + def k8s_hpa_scaletargetref_kind do + :"k8s.hpa.scaletargetref.kind" + end + + @doc """ + The name of the target resource to scale for the HorizontalPodAutoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This maps to the `name` field in the `scaleTargetRef` of the HPA spec. + + ### Examples + + ``` + ["my-deployment", "my-statefulset"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_scaletargetref_name() + :"k8s.hpa.scaletargetref.name" + + ### Erlang + + ```erlang + ?K8S_HPA_SCALETARGETREF_NAME. + 'k8s.hpa.scaletargetref.name' + ``` + + + """ + @spec k8s_hpa_scaletargetref_name :: :"k8s.hpa.scaletargetref.name" + def k8s_hpa_scaletargetref_name do + :"k8s.hpa.scaletargetref.name" + end + + @doc """ + The UID of the horizontal pod autoscaler. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_uid() + :"k8s.hpa.uid" + + ### Erlang + + ```erlang + ?K8S_HPA_UID. + 'k8s.hpa.uid' + ``` + + + """ + @spec k8s_hpa_uid :: :"k8s.hpa.uid" + def k8s_hpa_uid do + :"k8s.hpa.uid" + end + + @doc """ + The size (identifier) of the K8s huge page. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2Mi"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hugepage_size() + :"k8s.hugepage.size" + + ### Erlang + + ```erlang + ?K8S_HUGEPAGE_SIZE. + 'k8s.hugepage.size' + ``` + + + """ + @spec k8s_hugepage_size :: :"k8s.hugepage.size" + def k8s_hugepage_size do + :"k8s.hugepage.size" + end + + @doc """ + The annotation placed on the Job, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `number` with value `1` **SHOULD** be recorded + as the `k8s.job.annotation.number` attribute with value `"1"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.job.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["1", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_annotation() + :"k8s.job.annotation" + + ### Erlang + + ```erlang + ?K8S_JOB_ANNOTATION. + 'k8s.job.annotation' + ``` + + + """ + @spec k8s_job_annotation :: :"k8s.job.annotation" + def k8s_job_annotation do + :"k8s.job.annotation" + end + + @doc """ + The label placed on the Job, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `jobtype` with value `ci` **SHOULD** be recorded + as the `k8s.job.label.jobtype` attribute with value `"ci"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.job.label.automated` attribute with value `""`. + + ### Examples + + ``` + ["ci", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_label() + :"k8s.job.label" + + ### Erlang + + ```erlang + ?K8S_JOB_LABEL. + 'k8s.job.label' + ``` + + + """ + @spec k8s_job_label :: :"k8s.job.label" + def k8s_job_label do + :"k8s.job.label" + end + + @doc """ + The name of the Job. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_name() + :"k8s.job.name" + + ### Erlang + + ```erlang + ?K8S_JOB_NAME. + 'k8s.job.name' + ``` + + + """ + @spec k8s_job_name :: :"k8s.job.name" + def k8s_job_name do + :"k8s.job.name" + end + + @doc """ + The UID of the Job. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_uid() + :"k8s.job.uid" + + ### Erlang + + ```erlang + ?K8S_JOB_UID. + 'k8s.job.uid' + ``` + + + """ + @spec k8s_job_uid :: :"k8s.job.uid" + def k8s_job_uid do + :"k8s.job.uid" + end + + @doc """ + The annotation placed on the Namespace, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `ttl` with value `0` **SHOULD** be recorded + as the `k8s.namespace.annotation.ttl` attribute with value `"0"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.namespace.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["0", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_annotation() + :"k8s.namespace.annotation" + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_ANNOTATION. + 'k8s.namespace.annotation' + ``` + + + """ + @spec k8s_namespace_annotation :: :"k8s.namespace.annotation" + def k8s_namespace_annotation do + :"k8s.namespace.annotation" + end + + @doc """ + The label placed on the Namespace, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `kubernetes.io/metadata.name` with value `default` **SHOULD** be recorded + as the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `"default"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.namespace.label.data` attribute with value `""`. + + ### Examples + + ``` + ["default", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_label() + :"k8s.namespace.label" + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_LABEL. + 'k8s.namespace.label' + ``` + + + """ + @spec k8s_namespace_label :: :"k8s.namespace.label" + def k8s_namespace_label do + :"k8s.namespace.label" + end + + @doc """ + The name of the namespace that the pod is running in. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["default"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_name() + :"k8s.namespace.name" + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_NAME. + 'k8s.namespace.name' + ``` + + + """ + @spec k8s_namespace_name :: :"k8s.namespace.name" + def k8s_namespace_name do + :"k8s.namespace.name" + end + + @typedoc """ + The phase of the K8s namespace. + + + ### Enum Values + * `:active` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Active namespace phase as described by [K8s API](https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase) + * `:terminating` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Terminating namespace phase as described by [K8s API](https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase) + """ + @type k8s_namespace_phase_values() :: %{ + :active => :active, + :terminating => :terminating + } + @doc """ + The phase of the K8s namespace. + + + ### Notes + + This attribute aligns with the `phase` field of the + [K8s NamespaceStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core) + + ### Examples + + ``` + ["active", "terminating"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_phase() + :"k8s.namespace.phase" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_phase_values().active + :active + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_phase() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_phase_values().active} + %{:"k8s.namespace.phase" => :active} + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_PHASE. + 'k8s.namespace.phase' + + ?K8S_NAMESPACE_PHASE_VALUES_ACTIVE. + 'active' + + \#{?K8S_NAMESPACE_PHASE => ?K8S_NAMESPACE_PHASE_VALUES_ACTIVE}. + \#{'k8s.namespace.phase' => 'active'} + ``` + + + """ + @spec k8s_namespace_phase :: :"k8s.namespace.phase" + def k8s_namespace_phase do + :"k8s.namespace.phase" + end + + @spec k8s_namespace_phase_values() :: k8s_namespace_phase_values() + def k8s_namespace_phase_values() do + %{ + :active => :active, + :terminating => :terminating + } + end + + @doc """ + The annotation placed on the Node, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - An annotation `node.alpha.kubernetes.io/ttl` with value `0` **SHOULD** be recorded as + the `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `"0"`. + - An annotation `data` with empty string value **SHOULD** be recorded as + the `k8s.node.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["0", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_annotation() + :"k8s.node.annotation" + + ### Erlang + + ```erlang + ?K8S_NODE_ANNOTATION. + 'k8s.node.annotation' + ``` + + + """ + @spec k8s_node_annotation :: :"k8s.node.annotation" + def k8s_node_annotation do + :"k8s.node.annotation" + end + + @typedoc """ + The status of the condition, one of True, False, Unknown. + + + ### Enum Values + * `:condition_true` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:condition_false` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:condition_unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type k8s_node_condition_status_values() :: %{ + :condition_true => true, + :condition_false => false, + :condition_unknown => :unknown + } + @doc """ + The status of the condition, one of True, False, Unknown. + + + ### Notes + + This attribute aligns with the `status` field of the + [NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core) + + ### Examples + + ``` + ["true", "false", "unknown"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_status() + :"k8s.node.condition.status" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_status_values().condition_true + :true + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_status() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_status_values().condition_true} + %{:"k8s.node.condition.status" => :true} + + ### Erlang + + ```erlang + ?K8S_NODE_CONDITION_STATUS. + 'k8s.node.condition.status' + + ?K8S_NODE_CONDITION_STATUS_VALUES_CONDITION_TRUE. + 'true' + + \#{?K8S_NODE_CONDITION_STATUS => ?K8S_NODE_CONDITION_STATUS_VALUES_CONDITION_TRUE}. + \#{'k8s.node.condition.status' => 'true'} + ``` + + + """ + @spec k8s_node_condition_status :: :"k8s.node.condition.status" + def k8s_node_condition_status do + :"k8s.node.condition.status" + end + + @spec k8s_node_condition_status_values() :: k8s_node_condition_status_values() + def k8s_node_condition_status_values() do + %{ + :condition_true => true, + :condition_false => false, + :condition_unknown => :unknown + } + end + + @typedoc """ + The condition type of a K8s Node. + + + ### Enum Values + * `:ready` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The node is healthy and ready to accept pods + * `:disk_pressure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Pressure exists on the disk size—that is, if the disk capacity is low + * `:memory_pressure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Pressure exists on the node memory—that is, if the node memory is low + * `:pid_pressure` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Pressure exists on the processes—that is, if there are too many processes on the node + * `:network_unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The network for the node is not correctly configured + """ + @type k8s_node_condition_type_values() :: %{ + :ready => :Ready, + :disk_pressure => :DiskPressure, + :memory_pressure => :MemoryPressure, + :pid_pressure => :PIDPressure, + :network_unavailable => :NetworkUnavailable + } + @doc """ + The condition type of a K8s Node. + + + ### Notes + + K8s Node conditions as described + by [K8s documentation](https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition). + + This attribute aligns with the `type` field of the + [NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core) + + The set of possible values is not limited to those listed here. Managed Kubernetes environments, + or custom controllers **MAY** introduce additional node condition types. + When this occurs, the exact value as reported by the Kubernetes API **SHOULD** be used. + + ### Examples + + ``` + ["Ready", "DiskPressure"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_type() + :"k8s.node.condition.type" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_type_values().ready + :Ready + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_type() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_condition_type_values().ready} + %{:"k8s.node.condition.type" => :Ready} + + ### Erlang + + ```erlang + ?K8S_NODE_CONDITION_TYPE. + 'k8s.node.condition.type' + + ?K8S_NODE_CONDITION_TYPE_VALUES_READY. + 'Ready' + + \#{?K8S_NODE_CONDITION_TYPE => ?K8S_NODE_CONDITION_TYPE_VALUES_READY}. + \#{'k8s.node.condition.type' => 'Ready'} + ``` + + + """ + @spec k8s_node_condition_type :: :"k8s.node.condition.type" + def k8s_node_condition_type do + :"k8s.node.condition.type" + end + + @spec k8s_node_condition_type_values() :: k8s_node_condition_type_values() + def k8s_node_condition_type_values() do + %{ + :ready => :Ready, + :disk_pressure => :DiskPressure, + :memory_pressure => :MemoryPressure, + :pid_pressure => :PIDPressure, + :network_unavailable => :NetworkUnavailable + } + end + + @doc """ + The label placed on the Node, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - A label `kubernetes.io/arch` with value `arm64` **SHOULD** be recorded + as the `k8s.node.label.kubernetes.io/arch` attribute with value `"arm64"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.node.label.data` attribute with value `""`. + + ### Examples + + ``` + ["arm64", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_label() + :"k8s.node.label" + + ### Erlang + + ```erlang + ?K8S_NODE_LABEL. + 'k8s.node.label' + ``` + + + """ + @spec k8s_node_label :: :"k8s.node.label" + def k8s_node_label do + :"k8s.node.label" + end + + @doc """ + The name of the Node. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["node-1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_name() + :"k8s.node.name" + + ### Erlang + + ```erlang + ?K8S_NODE_NAME. + 'k8s.node.name' + ``` + + + """ + @spec k8s_node_name :: :"k8s.node.name" + def k8s_node_name do + :"k8s.node.name" + end + + @doc """ + The UID of the Node. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_uid() + :"k8s.node.uid" + + ### Erlang + + ```erlang + ?K8S_NODE_UID. + 'k8s.node.uid' + ``` + + + """ + @spec k8s_node_uid :: :"k8s.node.uid" + def k8s_node_uid do + :"k8s.node.uid" + end + + @doc """ + The annotation placed on the Pod, the `` being the annotation name, the value being the annotation value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` **SHOULD** be recorded as + the `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `"true"`. + - An annotation `mycompany.io/arch` with value `x64` **SHOULD** be recorded as + the `k8s.pod.annotation.mycompany.io/arch` attribute with value `"x64"`. + - An annotation `data` with empty string value **SHOULD** be recorded as + the `k8s.pod.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["true", "x64", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_annotation() + :"k8s.pod.annotation" + + ### Erlang + + ```erlang + ?K8S_POD_ANNOTATION. + 'k8s.pod.annotation' + ``` + + + """ + @spec k8s_pod_annotation :: :"k8s.pod.annotation" + def k8s_pod_annotation do + :"k8s.pod.annotation" + end + + @doc """ + Specifies the hostname of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The K8s Pod spec has an optional hostname field, which can be used to specify a hostname. + Refer to [K8s docs](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field) + for more information about this field. + + This attribute aligns with the `hostname` field of the + [K8s PodSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core). + + ### Examples + + ``` + ["collector-gateway"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_hostname() + :"k8s.pod.hostname" + + ### Erlang + + ```erlang + ?K8S_POD_HOSTNAME. + 'k8s.pod.hostname' + ``` + + + """ + @spec k8s_pod_hostname :: :"k8s.pod.hostname" + def k8s_pod_hostname do + :"k8s.pod.hostname" + end + + @doc """ + IP address allocated to the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute aligns with the `podIP` field of the + [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core). + + ### Examples + + ``` + ["172.18.0.2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_ip() + :"k8s.pod.ip" + + ### Erlang + + ```erlang + ?K8S_POD_IP. + 'k8s.pod.ip' + ``` + + + """ + @spec k8s_pod_ip :: :"k8s.pod.ip" + def k8s_pod_ip do + :"k8s.pod.ip" + end + + @doc """ + The label placed on the Pod, the `` being the label name, the value being the label value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - A label `app` with value `my-app` **SHOULD** be recorded as + the `k8s.pod.label.app` attribute with value `"my-app"`. + - A label `mycompany.io/arch` with value `x64` **SHOULD** be recorded as + the `k8s.pod.label.mycompany.io/arch` attribute with value `"x64"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.pod.label.data` attribute with value `""`. + + ### Examples + + ``` + ["my-app", "x64", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_label() + :"k8s.pod.label" + + ### Erlang + + ```erlang + ?K8S_POD_LABEL. + 'k8s.pod.label' + ``` + + + """ + @spec k8s_pod_label :: :"k8s.pod.label" + def k8s_pod_label do + :"k8s.pod.label" + end + + @deprecated """ + Replaced by `k8s.pod.label`. + """ + @spec k8s_pod_labels :: :"k8s.pod.labels" + def k8s_pod_labels do + :"k8s.pod.labels" + end + + @doc """ + The name of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry-pod-autoconf"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_name() + :"k8s.pod.name" + + ### Erlang + + ```erlang + ?K8S_POD_NAME. + 'k8s.pod.name' + ``` + + + """ + @spec k8s_pod_name :: :"k8s.pod.name" + def k8s_pod_name do + :"k8s.pod.name" + end + + @doc """ + The start timestamp of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Date and time at which the object was acknowledged by the Kubelet. + This is before the Kubelet pulled the container image(s) for the pod. + + This attribute aligns with the `startTime` field of the + [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core), + in ISO 8601 (RFC 3339 compatible) format. + + ### Examples + + ``` + ["2025-12-04T08:41:03Z"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_start_time() + :"k8s.pod.start_time" + + ### Erlang + + ```erlang + ?K8S_POD_START_TIME. + 'k8s.pod.start_time' + ``` + + + """ + @spec k8s_pod_start_time :: :"k8s.pod.start_time" + def k8s_pod_start_time do + :"k8s.pod.start_time" + end + + @typedoc """ + The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) + + + ### Enum Values + * `:pending` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host. + + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted. + + * `:succeeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - All containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers. + + * `:failed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - All containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system). + + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. + + """ + @type k8s_pod_status_phase_values() :: %{ + :pending => :Pending, + :running => :Running, + :succeeded => :Succeeded, + :failed => :Failed, + :unknown => :Unknown + } + @doc """ + The phase for the pod. Corresponds to the `phase` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) + + + ### Examples + + ``` + ["Pending", "Running"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_phase() + :"k8s.pod.status.phase" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_phase_values().pending + :Pending + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_phase() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_phase_values().pending} + %{:"k8s.pod.status.phase" => :Pending} + + ### Erlang + + ```erlang + ?K8S_POD_STATUS_PHASE. + 'k8s.pod.status.phase' + + ?K8S_POD_STATUS_PHASE_VALUES_PENDING. + 'Pending' + + \#{?K8S_POD_STATUS_PHASE => ?K8S_POD_STATUS_PHASE_VALUES_PENDING}. + \#{'k8s.pod.status.phase' => 'Pending'} + ``` + + + """ + @spec k8s_pod_status_phase :: :"k8s.pod.status.phase" + def k8s_pod_status_phase do + :"k8s.pod.status.phase" + end + + @spec k8s_pod_status_phase_values() :: k8s_pod_status_phase_values() + def k8s_pod_status_phase_values() do + %{ + :pending => :Pending, + :running => :Running, + :succeeded => :Succeeded, + :failed => :Failed, + :unknown => :Unknown + } + end + + @typedoc """ + The reason for the pod state. Corresponds to the `reason` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) + + + ### Enum Values + * `:evicted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pod is evicted. + * `:node_affinity` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pod is in a status because of its node affinity + * `:node_lost` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The reason on a pod when its state cannot be confirmed as kubelet is unresponsive on the node it is (was) running. + + * `:shutdown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The node is shutdown + * `:unexpected_admission_error` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The pod was rejected admission to the node because of an error during admission that could not be categorized. + + """ + @type k8s_pod_status_reason_values() :: %{ + :evicted => :Evicted, + :node_affinity => :NodeAffinity, + :node_lost => :NodeLost, + :shutdown => :Shutdown, + :unexpected_admission_error => :UnexpectedAdmissionError + } + @doc """ + The reason for the pod state. Corresponds to the `reason` field of the: [K8s PodStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core) + + + ### Examples + + ``` + ["Evicted", "NodeAffinity"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_reason() + :"k8s.pod.status.reason" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_reason_values().evicted + :Evicted + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_reason() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_status_reason_values().evicted} + %{:"k8s.pod.status.reason" => :Evicted} + + ### Erlang + + ```erlang + ?K8S_POD_STATUS_REASON. + 'k8s.pod.status.reason' + + ?K8S_POD_STATUS_REASON_VALUES_EVICTED. + 'Evicted' + + \#{?K8S_POD_STATUS_REASON => ?K8S_POD_STATUS_REASON_VALUES_EVICTED}. + \#{'k8s.pod.status.reason' => 'Evicted'} + ``` + + + """ + @spec k8s_pod_status_reason :: :"k8s.pod.status.reason" + def k8s_pod_status_reason do + :"k8s.pod.status.reason" + end + + @spec k8s_pod_status_reason_values() :: k8s_pod_status_reason_values() + def k8s_pod_status_reason_values() do + %{ + :evicted => :Evicted, + :node_affinity => :NodeAffinity, + :node_lost => :NodeLost, + :shutdown => :Shutdown, + :unexpected_admission_error => :UnexpectedAdmissionError + } + end + + @doc """ + The UID of the Pod. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_uid() + :"k8s.pod.uid" + + ### Erlang + + ```erlang + ?K8S_POD_UID. + 'k8s.pod.uid' + ``` + + + """ + @spec k8s_pod_uid :: :"k8s.pod.uid" + def k8s_pod_uid do + :"k8s.pod.uid" + end + + @doc """ + The annotation placed on the ReplicaSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `0` **SHOULD** be recorded + as the `k8s.replicaset.annotation.replicas` attribute with value `"0"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.replicaset.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["0", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_annotation() + :"k8s.replicaset.annotation" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_ANNOTATION. + 'k8s.replicaset.annotation' + ``` + + + """ + @spec k8s_replicaset_annotation :: :"k8s.replicaset.annotation" + def k8s_replicaset_annotation do + :"k8s.replicaset.annotation" + end + + @doc """ + The label placed on the ReplicaSet, the `` being the label name, the value being the label value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `app` with value `guestbook` **SHOULD** be recorded + as the `k8s.replicaset.label.app` attribute with value `"guestbook"`. + - A label `injected` with empty string value **SHOULD** be recorded as + the `k8s.replicaset.label.injected` attribute with value `""`. + + ### Examples + + ``` + ["guestbook", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_label() + :"k8s.replicaset.label" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_LABEL. + 'k8s.replicaset.label' + ``` + + + """ + @spec k8s_replicaset_label :: :"k8s.replicaset.label" + def k8s_replicaset_label do + :"k8s.replicaset.label" + end + + @doc """ + The name of the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_name() + :"k8s.replicaset.name" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_NAME. + 'k8s.replicaset.name' + ``` + + + """ + @spec k8s_replicaset_name :: :"k8s.replicaset.name" + def k8s_replicaset_name do + :"k8s.replicaset.name" + end + + @doc """ + The UID of the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_uid() + :"k8s.replicaset.uid" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_UID. + 'k8s.replicaset.uid' + ``` + + + """ + @spec k8s_replicaset_uid :: :"k8s.replicaset.uid" + def k8s_replicaset_uid do + :"k8s.replicaset.uid" + end + + @doc """ + The name of the replication controller. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicationcontroller_name() + :"k8s.replicationcontroller.name" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_NAME. + 'k8s.replicationcontroller.name' + ``` + + + """ + @spec k8s_replicationcontroller_name :: :"k8s.replicationcontroller.name" + def k8s_replicationcontroller_name do + :"k8s.replicationcontroller.name" + end + + @doc """ + The UID of the replication controller. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicationcontroller_uid() + :"k8s.replicationcontroller.uid" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_UID. + 'k8s.replicationcontroller.uid' + ``` + + + """ + @spec k8s_replicationcontroller_uid :: :"k8s.replicationcontroller.uid" + def k8s_replicationcontroller_uid do + :"k8s.replicationcontroller.uid" + end + + @doc """ + The name of the resource quota. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_resourcequota_name() + :"k8s.resourcequota.name" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_NAME. + 'k8s.resourcequota.name' + ``` + + + """ + @spec k8s_resourcequota_name :: :"k8s.resourcequota.name" + def k8s_resourcequota_name do + :"k8s.resourcequota.name" + end + + @doc """ + The name of the K8s resource a resource quota defines. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The value for this attribute can be either the full `count/[.]` string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See [Kubernetes Resource Quotas documentation](https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count) for more details. + + ### Examples + + ``` + ["count/replicationcontrollers"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_resourcequota_resource_name() + :"k8s.resourcequota.resource_name" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_RESOURCE_NAME. + 'k8s.resourcequota.resource_name' + ``` + + + """ + @spec k8s_resourcequota_resource_name :: :"k8s.resourcequota.resource_name" + def k8s_resourcequota_resource_name do + :"k8s.resourcequota.resource_name" + end + + @doc """ + The UID of the resource quota. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_resourcequota_uid() + :"k8s.resourcequota.uid" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_UID. + 'k8s.resourcequota.uid' + ``` + + + """ + @spec k8s_resourcequota_uid :: :"k8s.resourcequota.uid" + def k8s_resourcequota_uid do + :"k8s.resourcequota.uid" + end + + @doc """ + The annotation placed on the Service, the `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - An annotation `prometheus.io/scrape` with value `true` **SHOULD** be recorded as + the `k8s.service.annotation.prometheus.io/scrape` attribute with value `"true"`. + - An annotation `data` with empty string value **SHOULD** be recorded as + the `k8s.service.annotation.data` attribute with value `""`. + + ### Examples + + ``` + ["true", ""] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_annotation() + :"k8s.service.annotation" + + ### Erlang + + ```erlang + ?K8S_SERVICE_ANNOTATION. + 'k8s.service.annotation' + ``` + + + """ + @spec k8s_service_annotation :: :"k8s.service.annotation" + def k8s_service_annotation do + :"k8s.service.annotation" + end + + @typedoc """ + The address type of the service endpoint. + + + ### Enum Values + * `:ipv4` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv4 address type + * `:ipv6` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv6 address type + * `:fqdn` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FQDN address type + """ + @type k8s_service_endpoint_address_type_values() :: %{ + :ipv4 => :IPv4, + :ipv6 => :IPv6, + :fqdn => :FQDN + } + @doc """ + The address type of the service endpoint. - ### Value type - Value must be of type `atom() | String.t()`. + ### Notes + + The network address family or type of the endpoint. + This attribute aligns with the `addressType` field of the + [K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). + It is used to differentiate metrics when a Service is backed by multiple address types + (e.g., in dual-stack clusters). + ### Examples ``` - ["opentelemetry"] + ["IPv4", "IPv6"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_name() - :"k8s.daemonset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_address_type() + :"k8s.service.endpoint.address_type" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_address_type_values().ipv4 + :IPv4 + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_address_type() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_address_type_values().ipv4} + %{:"k8s.service.endpoint.address_type" => :IPv4} ### Erlang ```erlang - ?K8S_DAEMONSET_NAME. - 'k8s.daemonset.name' + ?K8S_SERVICE_ENDPOINT_ADDRESS_TYPE. + 'k8s.service.endpoint.address_type' + + ?K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUES_IPV4. + 'IPv4' + + \#{?K8S_SERVICE_ENDPOINT_ADDRESS_TYPE => ?K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUES_IPV4}. + \#{'k8s.service.endpoint.address_type' => 'IPv4'} ``` """ - @spec k8s_daemonset_name :: :"k8s.daemonset.name" - def k8s_daemonset_name do - :"k8s.daemonset.name" + @spec k8s_service_endpoint_address_type :: :"k8s.service.endpoint.address_type" + def k8s_service_endpoint_address_type do + :"k8s.service.endpoint.address_type" + end + + @spec k8s_service_endpoint_address_type_values() :: k8s_service_endpoint_address_type_values() + def k8s_service_endpoint_address_type_values() do + %{ + :ipv4 => :IPv4, + :ipv6 => :IPv6, + :fqdn => :FQDN + } end + @typedoc """ + The condition of the service endpoint. + + + ### Enum Values + * `:ready` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The endpoint is ready to receive new connections. + * `:serving` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The endpoint is currently handling traffic. + * `:terminating` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The endpoint is in the process of shutting down. + """ + @type k8s_service_endpoint_condition_values() :: %{ + :ready => :ready, + :serving => :serving, + :terminating => :terminating + } @doc """ - The UID of the DaemonSet. + The condition of the service endpoint. - ### Value type - Value must be of type `atom() | String.t()`. + ### Notes + + The current operational condition of the service endpoint. + An endpoint can have multiple conditions set at once (e.g., both `serving` and `terminating` during rollout). + This attribute aligns with the condition fields in the [K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). + ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["ready", "serving", "terminating"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_uid() - :"k8s.daemonset.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_condition() + :"k8s.service.endpoint.condition" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_condition_values().ready + :ready + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_condition() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_condition_values().ready} + %{:"k8s.service.endpoint.condition" => :ready} ### Erlang ```erlang - ?K8S_DAEMONSET_UID. - 'k8s.daemonset.uid' + ?K8S_SERVICE_ENDPOINT_CONDITION. + 'k8s.service.endpoint.condition' + + ?K8S_SERVICE_ENDPOINT_CONDITION_VALUES_READY. + 'ready' + + \#{?K8S_SERVICE_ENDPOINT_CONDITION => ?K8S_SERVICE_ENDPOINT_CONDITION_VALUES_READY}. + \#{'k8s.service.endpoint.condition' => 'ready'} ``` """ - @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" - def k8s_daemonset_uid do - :"k8s.daemonset.uid" + @spec k8s_service_endpoint_condition :: :"k8s.service.endpoint.condition" + def k8s_service_endpoint_condition do + :"k8s.service.endpoint.condition" + end + + @spec k8s_service_endpoint_condition_values() :: k8s_service_endpoint_condition_values() + def k8s_service_endpoint_condition_values() do + %{ + :ready => :ready, + :serving => :serving, + :terminating => :terminating + } end @doc """ - The name of the Deployment. + The zone of the service endpoint. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The zone where the endpoint is located, typically corresponding to a failure domain. + This attribute aligns with the `zone` field of endpoints in the + [K8s EndpointSlice](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). + It enables zone-aware monitoring of service endpoint distribution and supports + features like [Topology Aware Routing](https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/). + + If the zone is not populated (e.g., nodes without the `topology.kubernetes.io/zone` label), + the attribute value will be an empty string. + ### Examples ``` - ["opentelemetry"] + ["us-east-1a", "us-west-2b", "zone-a", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_name() - :"k8s.deployment.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_endpoint_zone() + :"k8s.service.endpoint.zone" ### Erlang ```erlang - ?K8S_DEPLOYMENT_NAME. - 'k8s.deployment.name' + ?K8S_SERVICE_ENDPOINT_ZONE. + 'k8s.service.endpoint.zone' ``` """ - @spec k8s_deployment_name :: :"k8s.deployment.name" - def k8s_deployment_name do - :"k8s.deployment.name" + @spec k8s_service_endpoint_zone :: :"k8s.service.endpoint.zone" + def k8s_service_endpoint_zone do + :"k8s.service.endpoint.zone" end @doc """ - The UID of the Deployment. + The label placed on the Service, the `` being the label name, the value being the label value, even if the value is empty. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - A label `app` with value `my-service` **SHOULD** be recorded as + the `k8s.service.label.app` attribute with value `"my-service"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.service.label.data` attribute with value `""`. + ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["my-service", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_uid() - :"k8s.deployment.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_label() + :"k8s.service.label" ### Erlang ```erlang - ?K8S_DEPLOYMENT_UID. - 'k8s.deployment.uid' + ?K8S_SERVICE_LABEL. + 'k8s.service.label' ``` """ - @spec k8s_deployment_uid :: :"k8s.deployment.uid" - def k8s_deployment_uid do - :"k8s.deployment.uid" + @spec k8s_service_label :: :"k8s.service.label" + def k8s_service_label do + :"k8s.service.label" end @doc """ - The name of the Job. + The name of the Service. ### Value type @@ -397,164 +2724,234 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["opentelemetry"] + ["my-service"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_name() - :"k8s.job.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_name() + :"k8s.service.name" ### Erlang ```erlang - ?K8S_JOB_NAME. - 'k8s.job.name' + ?K8S_SERVICE_NAME. + 'k8s.service.name' ``` """ - @spec k8s_job_name :: :"k8s.job.name" - def k8s_job_name do - :"k8s.job.name" + @spec k8s_service_name :: :"k8s.service.name" + def k8s_service_name do + :"k8s.service.name" end @doc """ - The UID of the Job. + Whether the Service publishes not-ready endpoints. ### Value type - Value must be of type `atom() | String.t()`. + Value must be of type `boolean()`. + ### Notes + + Whether the Service is configured to publish endpoints before the pods are ready. + This attribute is typically used to indicate that a Service (such as a headless + Service for a StatefulSet) allows peer discovery before pods pass their readiness probes. + It aligns with the `publishNotReadyAddresses` field of the + [K8s ServiceSpec](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec). + ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + [true, false] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_uid() - :"k8s.job.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_publish_not_ready_addresses() + :"k8s.service.publish_not_ready_addresses" ### Erlang ```erlang - ?K8S_JOB_UID. - 'k8s.job.uid' + ?K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES. + 'k8s.service.publish_not_ready_addresses' ``` """ - @spec k8s_job_uid :: :"k8s.job.uid" - def k8s_job_uid do - :"k8s.job.uid" + @spec k8s_service_publish_not_ready_addresses :: :"k8s.service.publish_not_ready_addresses" + def k8s_service_publish_not_ready_addresses do + :"k8s.service.publish_not_ready_addresses" end @doc """ - The name of the namespace that the pod is running in. + The selector key-value pair placed on the Service, the `` being the selector key, the value being the selector value. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + These selectors are used to correlate with pod labels. Each selector key-value pair becomes a separate attribute. + + Examples: + + - A selector `app=my-app` **SHOULD** be recorded as + the `k8s.service.selector.app` attribute with value `"my-app"`. + - A selector `version=v1` **SHOULD** be recorded as + the `k8s.service.selector.version` attribute with value `"v1"`. + ### Examples ``` - ["default"] + ["my-app", "v1"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_name() - :"k8s.namespace.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_selector() + :"k8s.service.selector" ### Erlang ```erlang - ?K8S_NAMESPACE_NAME. - 'k8s.namespace.name' + ?K8S_SERVICE_SELECTOR. + 'k8s.service.selector' ``` """ - @spec k8s_namespace_name :: :"k8s.namespace.name" - def k8s_namespace_name do - :"k8s.namespace.name" + @spec k8s_service_selector :: :"k8s.service.selector" + def k8s_service_selector do + :"k8s.service.selector" end @doc """ - The name of the Node. + The traffic distribution policy for the Service. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + Specifies how traffic is distributed to endpoints for this Service. + This attribute aligns with the `trafficDistribution` field of the + [K8s ServiceSpec](https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution). + Known values include `PreferSameZone` (prefer endpoints in the same zone as the client) and + `PreferSameNode` (prefer endpoints on the same node, fallback to same zone, then cluster-wide). + If this field is not set on the Service, the attribute **SHOULD** **NOT** be emitted. + When not set, Kubernetes distributes traffic evenly across all endpoints cluster-wide. + ### Examples ``` - ["node-1"] + ["PreferSameZone", "PreferSameNode"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_name() - :"k8s.node.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_traffic_distribution() + :"k8s.service.traffic_distribution" ### Erlang ```erlang - ?K8S_NODE_NAME. - 'k8s.node.name' + ?K8S_SERVICE_TRAFFIC_DISTRIBUTION. + 'k8s.service.traffic_distribution' ``` """ - @spec k8s_node_name :: :"k8s.node.name" - def k8s_node_name do - :"k8s.node.name" + @spec k8s_service_traffic_distribution :: :"k8s.service.traffic_distribution" + def k8s_service_traffic_distribution do + :"k8s.service.traffic_distribution" end + @typedoc """ + The type of the Kubernetes Service. + + + ### Enum Values + * `:cluster_ip` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ClusterIP service type + * `:node_port` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - NodePort service type + * `:load_balancer` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - LoadBalancer service type + * `:external_name` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ExternalName service type + """ + @type k8s_service_type_values() :: %{ + :cluster_ip => :ClusterIP, + :node_port => :NodePort, + :load_balancer => :LoadBalancer, + :external_name => :ExternalName + } @doc """ - The UID of the Node. + The type of the Kubernetes Service. - ### Value type - Value must be of type `atom() | String.t()`. + ### Notes + + This attribute aligns with the `type` field of the + [K8s ServiceSpec](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec). + ### Examples ``` - ["1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"] + ["ClusterIP", "NodePort", "LoadBalancer"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_uid() - :"k8s.node.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_type() + :"k8s.service.type" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_type_values().cluster_ip + :ClusterIP + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_type() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_type_values().cluster_ip} + %{:"k8s.service.type" => :ClusterIP} ### Erlang ```erlang - ?K8S_NODE_UID. - 'k8s.node.uid' + ?K8S_SERVICE_TYPE. + 'k8s.service.type' + + ?K8S_SERVICE_TYPE_VALUES_CLUSTER_IP. + 'ClusterIP' + + \#{?K8S_SERVICE_TYPE => ?K8S_SERVICE_TYPE_VALUES_CLUSTER_IP}. + \#{'k8s.service.type' => 'ClusterIP'} ``` """ - @spec k8s_node_uid :: :"k8s.node.uid" - def k8s_node_uid do - :"k8s.node.uid" + @spec k8s_service_type :: :"k8s.service.type" + def k8s_service_type do + :"k8s.service.type" + end + + @spec k8s_service_type_values() :: k8s_service_type_values() + def k8s_service_type_values() do + %{ + :cluster_ip => :ClusterIP, + :node_port => :NodePort, + :load_balancer => :LoadBalancer, + :external_name => :ExternalName + } end @doc """ - The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. + The UID of the Service. ### Value type @@ -562,106 +2959,118 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true", "k8s.pod.annotation.mycompany.io/arch=x64", "k8s.pod.annotation.data="] + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_annotation() - :"k8s.pod.annotation" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_service_uid() + :"k8s.service.uid" ### Erlang ```erlang - ?K8S_POD_ANNOTATION. - 'k8s.pod.annotation' + ?K8S_SERVICE_UID. + 'k8s.service.uid' ``` """ - @spec k8s_pod_annotation :: :"k8s.pod.annotation" - def k8s_pod_annotation do - :"k8s.pod.annotation" + @spec k8s_service_uid :: :"k8s.service.uid" + def k8s_service_uid do + :"k8s.service.uid" end @doc """ - The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. + The annotation placed on the StatefulSet, the `` being the annotation name, the value being the annotation value, even if the value is empty. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `1` **SHOULD** be recorded + as the `k8s.statefulset.annotation.replicas` attribute with value `"1"`. + - A label `data` with empty string value **SHOULD** be recorded as + the `k8s.statefulset.annotation.data` attribute with value `""`. + ### Examples ``` - ["k8s.pod.label.app=my-app", "k8s.pod.label.mycompany.io/arch=x64", "k8s.pod.label.data="] + ["1", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_label() - :"k8s.pod.label" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_annotation() + :"k8s.statefulset.annotation" ### Erlang ```erlang - ?K8S_POD_LABEL. - 'k8s.pod.label' + ?K8S_STATEFULSET_ANNOTATION. + 'k8s.statefulset.annotation' ``` """ - @spec k8s_pod_label :: :"k8s.pod.label" - def k8s_pod_label do - :"k8s.pod.label" - end - - @deprecated """ - Replaced by `k8s.pod.label`. - """ - @spec k8s_pod_labels :: :"k8s.pod.labels" - def k8s_pod_labels do - :"k8s.pod.labels" + @spec k8s_statefulset_annotation :: :"k8s.statefulset.annotation" + def k8s_statefulset_annotation do + :"k8s.statefulset.annotation" end @doc """ - The name of the Pod. + The label placed on the StatefulSet, the `` being the label name, the value being the label value, even if the value is empty. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + + Examples: + + - A label `replicas` with value `0` **SHOULD** be recorded + as the `k8s.statefulset.label.app` attribute with value `"guestbook"`. + - A label `injected` with empty string value **SHOULD** be recorded as + the `k8s.statefulset.label.injected` attribute with value `""`. + ### Examples ``` - ["opentelemetry-pod-autoconf"] + ["guestbook", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_name() - :"k8s.pod.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_label() + :"k8s.statefulset.label" ### Erlang ```erlang - ?K8S_POD_NAME. - 'k8s.pod.name' + ?K8S_STATEFULSET_LABEL. + 'k8s.statefulset.label' ``` """ - @spec k8s_pod_name :: :"k8s.pod.name" - def k8s_pod_name do - :"k8s.pod.name" + @spec k8s_statefulset_label :: :"k8s.statefulset.label" + def k8s_statefulset_label do + :"k8s.statefulset.label" end @doc """ - The UID of the Pod. + The name of the StatefulSet. ### Value type @@ -669,32 +3078,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["opentelemetry"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_uid() - :"k8s.pod.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_name() + :"k8s.statefulset.name" ### Erlang ```erlang - ?K8S_POD_UID. - 'k8s.pod.uid' + ?K8S_STATEFULSET_NAME. + 'k8s.statefulset.name' ``` """ - @spec k8s_pod_uid :: :"k8s.pod.uid" - def k8s_pod_uid do - :"k8s.pod.uid" + @spec k8s_statefulset_name :: :"k8s.statefulset.name" + def k8s_statefulset_name do + :"k8s.statefulset.name" end @doc """ - The name of the ReplicaSet. + The UID of the StatefulSet. ### Value type @@ -702,32 +3111,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["opentelemetry"] + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_name() - :"k8s.replicaset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_uid() + :"k8s.statefulset.uid" ### Erlang ```erlang - ?K8S_REPLICASET_NAME. - 'k8s.replicaset.name' + ?K8S_STATEFULSET_UID. + 'k8s.statefulset.uid' ``` """ - @spec k8s_replicaset_name :: :"k8s.replicaset.name" - def k8s_replicaset_name do - :"k8s.replicaset.name" + @spec k8s_statefulset_uid :: :"k8s.statefulset.uid" + def k8s_statefulset_uid do + :"k8s.statefulset.uid" end @doc """ - The UID of the ReplicaSet. + The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object. ### Value type @@ -735,32 +3144,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["gold.storageclass.storage.k8s.io"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_uid() - :"k8s.replicaset.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_storageclass_name() + :"k8s.storageclass.name" ### Erlang ```erlang - ?K8S_REPLICASET_UID. - 'k8s.replicaset.uid' + ?K8S_STORAGECLASS_NAME. + 'k8s.storageclass.name' ``` """ - @spec k8s_replicaset_uid :: :"k8s.replicaset.uid" - def k8s_replicaset_uid do - :"k8s.replicaset.uid" + @spec k8s_storageclass_name :: :"k8s.storageclass.name" + def k8s_storageclass_name do + :"k8s.storageclass.name" end @doc """ - The name of the StatefulSet. + The name of the K8s volume. ### Value type @@ -768,60 +3177,102 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["opentelemetry"] + ["volume0"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_name() - :"k8s.statefulset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_name() + :"k8s.volume.name" ### Erlang ```erlang - ?K8S_STATEFULSET_NAME. - 'k8s.statefulset.name' + ?K8S_VOLUME_NAME. + 'k8s.volume.name' ``` """ - @spec k8s_statefulset_name :: :"k8s.statefulset.name" - def k8s_statefulset_name do - :"k8s.statefulset.name" + @spec k8s_volume_name :: :"k8s.volume.name" + def k8s_volume_name do + :"k8s.volume.name" end + @typedoc """ + The type of the K8s volume. + + + ### Enum Values + * `:persistent_volume_claim` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A [persistentVolumeClaim](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim) volume + * `:config_map` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A [configMap](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap) volume + * `:downward_api` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A [downwardAPI](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi) volume + * `:empty_dir` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - An [emptyDir](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir) volume + * `:secret` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A [secret](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret) volume + * `:local` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A [local](https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local) volume + """ + @type k8s_volume_type_values() :: %{ + :persistent_volume_claim => :persistentVolumeClaim, + :config_map => :configMap, + :downward_api => :downwardAPI, + :empty_dir => :emptyDir, + :secret => :secret, + :local => :local + } @doc """ - The UID of the StatefulSet. + The type of the K8s volume. - ### Value type - Value must be of type `atom() | String.t()`. ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["emptyDir", "persistentVolumeClaim"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_uid() - :"k8s.statefulset.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_type() + :"k8s.volume.type" + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_type_values().persistent_volume_claim + :persistentVolumeClaim + + iex> %{OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_type() => OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_type_values().persistent_volume_claim} + %{:"k8s.volume.type" => :persistentVolumeClaim} ### Erlang ```erlang - ?K8S_STATEFULSET_UID. - 'k8s.statefulset.uid' + ?K8S_VOLUME_TYPE. + 'k8s.volume.type' + + ?K8S_VOLUME_TYPE_VALUES_PERSISTENT_VOLUME_CLAIM. + 'persistentVolumeClaim' + + \#{?K8S_VOLUME_TYPE => ?K8S_VOLUME_TYPE_VALUES_PERSISTENT_VOLUME_CLAIM}. + \#{'k8s.volume.type' => 'persistentVolumeClaim'} ``` """ - @spec k8s_statefulset_uid :: :"k8s.statefulset.uid" - def k8s_statefulset_uid do - :"k8s.statefulset.uid" + @spec k8s_volume_type :: :"k8s.volume.type" + def k8s_volume_type do + :"k8s.volume.type" + end + + @spec k8s_volume_type_values() :: k8s_volume_type_values() + def k8s_volume_type_values() do + %{ + :persistent_volume_claim => :persistentVolumeClaim, + :config_map => :configMap, + :downward_api => :downwardAPI, + :empty_dir => :emptyDir, + :secret => :secret, + :local => :local + } end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex index c2e6e35c6..f068a494f 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/linux_attributes.ex @@ -8,49 +8,15 @@ defmodule OpenTelemetry.SemConv.Incubating.LinuxAttributes do The Linux Slab memory state ### Enum Values - * `:reclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unreclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:reclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unreclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type linux_memory_slab_state_values() :: %{ :reclaimable => :reclaimable, :unreclaimable => :unreclaimable } - @doc """ - The Linux Slab memory state - - ### Examples - - ``` - ["reclaimable", "unreclaimable"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state() - :"linux.memory.slab.state" - - iex> OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state_values().reclaimable - :reclaimable - - iex> %{OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state() => OpenTelemetry.SemConv.Incubating.LinuxAttributes.linux_memory_slab_state_values().reclaimable} - %{:"linux.memory.slab.state" => :reclaimable} - - ### Erlang - - ```erlang - ?LINUX_MEMORY_SLAB_STATE. - 'linux.memory.slab.state' - - ?LINUX_MEMORY_SLAB_STATE_VALUES_RECLAIMABLE. - 'reclaimable' - - \#{?LINUX_MEMORY_SLAB_STATE => ?LINUX_MEMORY_SLAB_STATE_VALUES_RECLAIMABLE}. - \#{'linux.memory.slab.state' => 'reclaimable'} - ``` - - + @deprecated """ + Replaced by `system.memory.linux.slab.state`. """ @spec linux_memory_slab_state :: :"linux.memory.slab.state" def linux_memory_slab_state do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex index 4e896783f..a377425fa 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex @@ -195,7 +195,7 @@ defmodule OpenTelemetry.SemConv.Incubating.LogAttributes do end @doc """ - The complete orignal Log Record. + The complete original Log Record. ### Value type diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mainframe_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mainframe_attributes.ex new file mode 100644 index 000000000..3f7a59271 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mainframe_attributes.ex @@ -0,0 +1,38 @@ +defmodule OpenTelemetry.SemConv.Incubating.MainframeAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Mainframe attributes. + """ + + @doc """ + Name of the logical partition that hosts a systems with a mainframe operating system. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["LPAR01"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.MainframeAttributes.mainframe_lpar_name() + :"mainframe.lpar.name" + + ### Erlang + + ```erlang + ?MAINFRAME_LPAR_NAME. + 'mainframe.lpar.name' + ``` + + + """ + @spec mainframe_lpar_name :: :"mainframe.lpar.name" + def mainframe_lpar_name do + :"mainframe.lpar.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mcp_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mcp_attributes.ex new file mode 100644 index 000000000..93f2375db --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/mcp_attributes.ex @@ -0,0 +1,256 @@ +defmodule OpenTelemetry.SemConv.Incubating.McpAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Mcp attributes. + """ + + @typedoc """ + The name of the request or notification method. + + ### Enum Values + * `:notifications_cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification cancelling a previously-issued request. + + * `:initialize` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to initialize the MCP client. + + * `:notifications_initialized` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that the MCP client has been initialized. + + * `:notifications_progress` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating the progress for a long-running operation. + + * `:ping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to check that the other party is still alive. + + * `:resources_list` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to list resources available on server. + + * `:resources_templates_list` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to list resource templates available on server. + + * `:resources_read` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to read a resource. + + * `:notifications_resources_list_changed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that the list of resources has changed. + + * `:resources_subscribe` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to subscribe to a resource. + + * `:resources_unsubscribe` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to unsubscribe from resource updates. + + * `:notifications_resources_updated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that a resource has been updated. + + * `:prompts_list` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to list prompts available on server. + + * `:prompts_get` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to get a prompt. + + * `:notifications_prompts_list_changed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that the list of prompts has changed. + + * `:tools_list` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to list tools available on server. + + * `:tools_call` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to call a tool. + + * `:notifications_tools_list_changed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that the list of tools has changed. + + * `:logging_set_level` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to set the logging level. + + * `:notifications_message` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that a message has been received. + + * `:sampling_create_message` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to create a sampling message. + + * `:completion_complete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to complete a prompt. + + * `:roots_list` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request to list roots available on server. + + * `:notifications_roots_list_changed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Notification indicating that the list of roots has changed. + + * `:elicitation_create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Request from the server to elicit additional information from the user via the client + + """ + @type mcp_method_name_values() :: %{ + :notifications_cancelled => :"notifications/cancelled", + :initialize => :initialize, + :notifications_initialized => :"notifications/initialized", + :notifications_progress => :"notifications/progress", + :ping => :ping, + :resources_list => :"resources/list", + :resources_templates_list => :"resources/templates/list", + :resources_read => :"resources/read", + :notifications_resources_list_changed => :"notifications/resources/list_changed", + :resources_subscribe => :"resources/subscribe", + :resources_unsubscribe => :"resources/unsubscribe", + :notifications_resources_updated => :"notifications/resources/updated", + :prompts_list => :"prompts/list", + :prompts_get => :"prompts/get", + :notifications_prompts_list_changed => :"notifications/prompts/list_changed", + :tools_list => :"tools/list", + :tools_call => :"tools/call", + :notifications_tools_list_changed => :"notifications/tools/list_changed", + :logging_set_level => :"logging/setLevel", + :notifications_message => :"notifications/message", + :sampling_create_message => :"sampling/createMessage", + :completion_complete => :"completion/complete", + :roots_list => :"roots/list", + :notifications_roots_list_changed => :"notifications/roots/list_changed", + :elicitation_create => :"elicitation/create" + } + @doc """ + The name of the request or notification method. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_method_name() + :"mcp.method.name" + + iex> OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_method_name_values().notifications_cancelled + :"notifications/cancelled" + + iex> %{OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_method_name() => OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_method_name_values().notifications_cancelled} + %{:"mcp.method.name" => :"notifications/cancelled"} + + ### Erlang + + ```erlang + ?MCP_METHOD_NAME. + 'mcp.method.name' + + ?MCP_METHOD_NAME_VALUES_NOTIFICATIONS_CANCELLED. + 'notifications/cancelled' + + \#{?MCP_METHOD_NAME => ?MCP_METHOD_NAME_VALUES_NOTIFICATIONS_CANCELLED}. + \#{'mcp.method.name' => 'notifications/cancelled'} + ``` + + + """ + @spec mcp_method_name :: :"mcp.method.name" + def mcp_method_name do + :"mcp.method.name" + end + + @spec mcp_method_name_values() :: mcp_method_name_values() + def mcp_method_name_values() do + %{ + :notifications_cancelled => :"notifications/cancelled", + :initialize => :initialize, + :notifications_initialized => :"notifications/initialized", + :notifications_progress => :"notifications/progress", + :ping => :ping, + :resources_list => :"resources/list", + :resources_templates_list => :"resources/templates/list", + :resources_read => :"resources/read", + :notifications_resources_list_changed => :"notifications/resources/list_changed", + :resources_subscribe => :"resources/subscribe", + :resources_unsubscribe => :"resources/unsubscribe", + :notifications_resources_updated => :"notifications/resources/updated", + :prompts_list => :"prompts/list", + :prompts_get => :"prompts/get", + :notifications_prompts_list_changed => :"notifications/prompts/list_changed", + :tools_list => :"tools/list", + :tools_call => :"tools/call", + :notifications_tools_list_changed => :"notifications/tools/list_changed", + :logging_set_level => :"logging/setLevel", + :notifications_message => :"notifications/message", + :sampling_create_message => :"sampling/createMessage", + :completion_complete => :"completion/complete", + :roots_list => :"roots/list", + :notifications_roots_list_changed => :"notifications/roots/list_changed", + :elicitation_create => :"elicitation/create" + } + end + + @doc """ + The [version](https://modelcontextprotocol.io/specification/versioning) of the Model Context Protocol used. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["2025-06-18"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_protocol_version() + :"mcp.protocol.version" + + ### Erlang + + ```erlang + ?MCP_PROTOCOL_VERSION. + 'mcp.protocol.version' + ``` + + + """ + @spec mcp_protocol_version :: :"mcp.protocol.version" + def mcp_protocol_version do + :"mcp.protocol.version" + end + + @doc """ + The value of the resource uri. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This is a URI of the resource provided in the following requests or notifications: `resources/read`, `resources/subscribe`, `resources/unsubscribe`, or `notifications/resources/updated`. + + ### Examples + + ``` + ["postgres://database/customers/schema", "file:///home/user/documents/report.pdf"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_resource_uri() + :"mcp.resource.uri" + + ### Erlang + + ```erlang + ?MCP_RESOURCE_URI. + 'mcp.resource.uri' + ``` + + + """ + @spec mcp_resource_uri :: :"mcp.resource.uri" + def mcp_resource_uri do + :"mcp.resource.uri" + end + + @doc """ + Identifies [MCP session](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management). + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["191c4850af6c49e08843a3f6c80e5046"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.McpAttributes.mcp_session_id() + :"mcp.session.id" + + ### Erlang + + ```erlang + ?MCP_SESSION_ID. + 'mcp.session.id' + ``` + + + """ + @spec mcp_session_id :: :"mcp.session.id" + def mcp_session_id do + :"mcp.session.id" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex index a9f83b375..13cafa93d 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex @@ -307,7 +307,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do end @deprecated """ - No replacement at this time. + Removed. No replacement at this time. """ @spec messaging_destination_publish_anonymous :: :"messaging.destination_publish.anonymous" def messaging_destination_publish_anonymous do @@ -315,7 +315,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do end @deprecated """ - No replacement at this time. + Removed. No replacement at this time. """ @spec messaging_destination_publish_name :: :"messaging.destination_publish.name" def messaging_destination_publish_name do @@ -324,7 +324,6 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do @deprecated """ Replaced by `messaging.consumer.group.name`. - """ @spec messaging_eventhubs_consumer_group :: :"messaging.eventhubs.consumer.group" def messaging_eventhubs_consumer_group do @@ -499,7 +498,6 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do @deprecated """ Replaced by `messaging.consumer.group.name`. - """ @spec messaging_kafka_consumer_group :: :"messaging.kafka.consumer.group" def messaging_kafka_consumer_group do @@ -507,7 +505,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do end @deprecated """ - Replaced by `messaging.destination.partition.id`. + Record string representation of the partition id in `messaging.destination.partition.id` attribute. """ @spec messaging_kafka_destination_partition :: :"messaging.kafka.destination.partition" def messaging_kafka_destination_partition do @@ -553,7 +551,6 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do @deprecated """ Replaced by `messaging.kafka.offset`. - """ @spec messaging_kafka_message_offset :: :"messaging.kafka.message.offset" def messaging_kafka_message_offset do @@ -807,9 +804,9 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do ### Enum Values - * `:publish` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created. + * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch sending scenarios. - * `:create` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios. + * `:send` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are provided for sending to an intermediary. If a single message is sent, the context of the "Send" span can be used as the creation context and no "Create" span needs to be created. * `:receive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages. @@ -818,14 +815,16 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do * `:settle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - One or more messages are settled. * `:deliver` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated. Use `process` instead.~~ + * `:publish` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated. Use `send` instead.~~ """ @type messaging_operation_type_values() :: %{ - :publish => :publish, :create => :create, + :send => :send, :receive => :receive, :process => :process, :settle => :settle, - :deliver => :deliver + :deliver => :deliver, + :publish => :publish } @doc """ A string identifying the type of the messaging operation. @@ -842,11 +841,11 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type() :"messaging.operation.type" - iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().publish - :publish + iex> OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().create + :create - iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().publish} - %{:"messaging.operation.type" => :publish} + iex> %{OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type() => OpenTelemetry.SemConv.Incubating.MessagingAttributes.messaging_operation_type_values().create} + %{:"messaging.operation.type" => :create} ### Erlang @@ -854,11 +853,11 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do ?MESSAGING_OPERATION_TYPE. 'messaging.operation.type' - ?MESSAGING_OPERATION_TYPE_VALUES_PUBLISH. - 'publish' + ?MESSAGING_OPERATION_TYPE_VALUES_CREATE. + 'create' - \#{?MESSAGING_OPERATION_TYPE => ?MESSAGING_OPERATION_TYPE_VALUES_PUBLISH}. - \#{'messaging.operation.type' => 'publish'} + \#{?MESSAGING_OPERATION_TYPE => ?MESSAGING_OPERATION_TYPE_VALUES_CREATE}. + \#{'messaging.operation.type' => 'create'} ``` @@ -871,12 +870,13 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do @spec messaging_operation_type_values() :: messaging_operation_type_values() def messaging_operation_type_values() do %{ - :publish => :publish, :create => :create, + :send => :send, :receive => :receive, :process => :process, :settle => :settle, - :deliver => :deliver + :deliver => :deliver, + :publish => :publish } end @@ -1125,7 +1125,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do ### Examples ``` - ["keyA", "keyB"] + [["keyA", "keyB"]] ``` @@ -1280,8 +1280,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do end @deprecated """ - Replaced by `messaging.servicebus.destination.subscription_name`. - + Replaced by `messaging.destination.subscription.name`. """ @spec messaging_servicebus_destination_subscription_name :: :"messaging.servicebus.destination.subscription_name" @@ -1427,6 +1426,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do ### Enum Values * `:activemq` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache ActiveMQ + * `:"aws.sns"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Simple Notification Service (SNS) * `:aws_sqs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Amazon Simple Queue Service (SQS) * `:eventgrid` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Event Grid * `:eventhubs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure Event Hubs @@ -1440,6 +1440,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do """ @type messaging_system_values() :: %{ :activemq => :activemq, + :"aws.sns" => :"aws.sns", :aws_sqs => :aws_sqs, :eventgrid => :eventgrid, :eventhubs => :eventhubs, @@ -1496,6 +1497,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do def messaging_system_values() do %{ :activemq => :activemq, + :"aws.sns" => :"aws.sns", :aws_sqs => :aws_sqs, :eventgrid => :eventgrid, :eventhubs => :eventhubs, diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex index dafaa0582..b0ac34bf7 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex @@ -142,7 +142,7 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do end @deprecated """ - Removed. + Removed. No replacement at this time. """ @spec net_sock_peer_name :: :"net.sock.peer.name" def net_sock_peer_name do @@ -161,8 +161,8 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do Deprecated, use `network.transport`. ### Enum Values - * `:ip_tcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:ip_udp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ip_tcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:ip_udp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:pipe` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Named or anonymous pipe. * `:inproc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - In-process communication. * `:other` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Something else (non IP-based). @@ -321,6 +321,97 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do :"network.carrier.name" end + @typedoc """ + The state of network connection + + ### Enum Values + * `:closed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:close_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:closing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:established` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:fin_wait_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:fin_wait_2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:last_ack` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:listen` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:syn_received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:syn_sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:time_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type network_connection_state_values() :: %{ + :closed => :closed, + :close_wait => :close_wait, + :closing => :closing, + :established => :established, + :fin_wait_1 => :fin_wait_1, + :fin_wait_2 => :fin_wait_2, + :last_ack => :last_ack, + :listen => :listen, + :syn_received => :syn_received, + :syn_sent => :syn_sent, + :time_wait => :time_wait + } + @doc """ + The state of network connection + + ### Notes + + Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2) + ### Examples + + ``` + ["close_wait"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_state() + :"network.connection.state" + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_state_values().closed + :closed + + iex> %{OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_state() => OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_connection_state_values().closed} + %{:"network.connection.state" => :closed} + + ### Erlang + + ```erlang + ?NETWORK_CONNECTION_STATE. + 'network.connection.state' + + ?NETWORK_CONNECTION_STATE_VALUES_CLOSED. + 'closed' + + \#{?NETWORK_CONNECTION_STATE => ?NETWORK_CONNECTION_STATE_VALUES_CLOSED}. + \#{'network.connection.state' => 'closed'} + ``` + + + """ + @spec network_connection_state :: :"network.connection.state" + def network_connection_state do + :"network.connection.state" + end + + @spec network_connection_state_values() :: network_connection_state_values() + def network_connection_state_values() do + %{ + :closed => :closed, + :close_wait => :close_wait, + :closing => :closing, + :established => :established, + :fin_wait_1 => :fin_wait_1, + :fin_wait_2 => :fin_wait_2, + :last_ack => :last_ack, + :listen => :listen, + :syn_received => :syn_received, + :syn_sent => :syn_sent, + :time_wait => :time_wait + } + end + @typedoc """ This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. @@ -443,11 +534,11 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do The internet connection type. ### Enum Values - * `:wifi` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:wired` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:cell` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:wifi` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:wired` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:cell` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type network_connection_type_values() :: %{ :wifi => :wifi, @@ -509,12 +600,44 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do } end + @doc """ + The network interface name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["lo", "eth0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NetworkAttributes.network_interface_name() + :"network.interface.name" + + ### Erlang + + ```erlang + ?NETWORK_INTERFACE_NAME. + 'network.interface.name' + ``` + + + """ + @spec network_interface_name :: :"network.interface.name" + def network_interface_name do + :"network.interface.name" + end + @typedoc """ The network IO operation direction. ### Enum Values - * `:transmit` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:receive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:transmit` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:receive` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type network_io_direction_values() :: %{ :transmit => :transmit, diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/nfs_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/nfs_attributes.ex new file mode 100644 index 000000000..38effc9cb --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/nfs_attributes.ex @@ -0,0 +1,71 @@ +defmodule OpenTelemetry.SemConv.Incubating.NfsAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Nfs attributes. + """ + + @doc """ + NFSv4+ operation name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["OPEN", "READ", "GETATTR"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NfsAttributes.nfs_operation_name() + :"nfs.operation.name" + + ### Erlang + + ```erlang + ?NFS_OPERATION_NAME. + 'nfs.operation.name' + ``` + + + """ + @spec nfs_operation_name :: :"nfs.operation.name" + def nfs_operation_name do + :"nfs.operation.name" + end + + @doc """ + Linux: one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + hit + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.NfsAttributes.nfs_server_repcache_status() + :"nfs.server.repcache.status" + + ### Erlang + + ```erlang + ?NFS_SERVER_REPCACHE_STATUS. + 'nfs.server.repcache.status' + ``` + + + """ + @spec nfs_server_repcache_status :: :"nfs.server.repcache.status" + def nfs_server_repcache_status do + :"nfs.server.repcache.status" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex index 7bed10eac..d7390358d 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oci_attributes.ex @@ -13,7 +13,7 @@ defmodule OpenTelemetry.SemConv.Incubating.OCIAttributes do ### Notes Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). - An example can be found in [Example Image Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). + An example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest). ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/onc_rpc_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/onc_rpc_attributes.ex new file mode 100644 index 000000000..d3e6686f7 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/onc_rpc_attributes.ex @@ -0,0 +1,124 @@ +defmodule OpenTelemetry.SemConv.Incubating.OncRpcAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Onc_Rpc attributes. + """ + + @doc """ + ONC/Sun RPC procedure name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["OPEN", "READ", "GETATTR"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OncRpcAttributes.onc_rpc_procedure_name() + :"onc_rpc.procedure.name" + + ### Erlang + + ```erlang + ?ONC_RPC_PROCEDURE_NAME. + 'onc_rpc.procedure.name' + ``` + + + """ + @spec onc_rpc_procedure_name :: :"onc_rpc.procedure.name" + def onc_rpc_procedure_name do + :"onc_rpc.procedure.name" + end + + @doc """ + ONC/Sun RPC procedure number. + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OncRpcAttributes.onc_rpc_procedure_number() + :"onc_rpc.procedure.number" + + ### Erlang + + ```erlang + ?ONC_RPC_PROCEDURE_NUMBER. + 'onc_rpc.procedure.number' + ``` + + + """ + @spec onc_rpc_procedure_number :: :"onc_rpc.procedure.number" + def onc_rpc_procedure_number do + :"onc_rpc.procedure.number" + end + + @doc """ + ONC/Sun RPC program name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["portmapper", "nfs"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OncRpcAttributes.onc_rpc_program_name() + :"onc_rpc.program.name" + + ### Erlang + + ```erlang + ?ONC_RPC_PROGRAM_NAME. + 'onc_rpc.program.name' + ``` + + + """ + @spec onc_rpc_program_name :: :"onc_rpc.program.name" + def onc_rpc_program_name do + :"onc_rpc.program.name" + end + + @doc """ + ONC/Sun RPC program version. + ### Value type + + Value must be of type `integer()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OncRpcAttributes.onc_rpc_version() + :"onc_rpc.version" + + ### Erlang + + ```erlang + ?ONC_RPC_VERSION. + 'onc_rpc.version' + ``` + + + """ + @spec onc_rpc_version :: :"onc_rpc.version" + def onc_rpc_version do + :"onc_rpc.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openai_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openai_attributes.ex new file mode 100644 index 000000000..56238bb6b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openai_attributes.ex @@ -0,0 +1,187 @@ +defmodule OpenTelemetry.SemConv.Incubating.OpenaiAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Openai attributes. + """ + + @typedoc """ + The type of OpenAI API being used. + + ### Enum Values + * `:chat_completions` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The OpenAI [Chat Completions API](https://developers.openai.com/api/reference/chat-completions/overview). + * `:responses` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The OpenAI [Responses API](https://developers.openai.com/api/reference/responses/overview). + """ + @type openai_api_type_values() :: %{ + :chat_completions => :chat_completions, + :responses => :responses + } + @doc """ + The type of OpenAI API being used. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_api_type() + :"openai.api.type" + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_api_type_values().chat_completions + :chat_completions + + iex> %{OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_api_type() => OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_api_type_values().chat_completions} + %{:"openai.api.type" => :chat_completions} + + ### Erlang + + ```erlang + ?OPENAI_API_TYPE. + 'openai.api.type' + + ?OPENAI_API_TYPE_VALUES_CHAT_COMPLETIONS. + 'chat_completions' + + \#{?OPENAI_API_TYPE => ?OPENAI_API_TYPE_VALUES_CHAT_COMPLETIONS}. + \#{'openai.api.type' => 'chat_completions'} + ``` + + + """ + @spec openai_api_type :: :"openai.api.type" + def openai_api_type do + :"openai.api.type" + end + + @spec openai_api_type_values() :: openai_api_type_values() + def openai_api_type_values() do + %{ + :chat_completions => :chat_completions, + :responses => :responses + } + end + + @typedoc """ + The service tier requested. May be a specific tier, default, or auto. + + ### Enum Values + * `:auto` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The system will utilize scale tier credits until they are exhausted. + * `:default` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The system will utilize the default scale tier. + """ + @type openai_request_service_tier_values() :: %{ + :auto => :auto, + :default => :default + } + @doc """ + The service tier requested. May be a specific tier, default, or auto. + + ### Examples + + ``` + ["auto", "default"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_request_service_tier() + :"openai.request.service_tier" + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_request_service_tier_values().auto + :auto + + iex> %{OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_request_service_tier() => OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_request_service_tier_values().auto} + %{:"openai.request.service_tier" => :auto} + + ### Erlang + + ```erlang + ?OPENAI_REQUEST_SERVICE_TIER. + 'openai.request.service_tier' + + ?OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO. + 'auto' + + \#{?OPENAI_REQUEST_SERVICE_TIER => ?OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO}. + \#{'openai.request.service_tier' => 'auto'} + ``` + + + """ + @spec openai_request_service_tier :: :"openai.request.service_tier" + def openai_request_service_tier do + :"openai.request.service_tier" + end + + @spec openai_request_service_tier_values() :: openai_request_service_tier_values() + def openai_request_service_tier_values() do + %{ + :auto => :auto, + :default => :default + } + end + + @doc """ + The service tier used for the response. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["scale", "default"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_response_service_tier() + :"openai.response.service_tier" + + ### Erlang + + ```erlang + ?OPENAI_RESPONSE_SERVICE_TIER. + 'openai.response.service_tier' + ``` + + + """ + @spec openai_response_service_tier :: :"openai.response.service_tier" + def openai_response_service_tier do + :"openai.response.service_tier" + end + + @doc """ + A fingerprint to track any eventual change in the Generative AI environment. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["fp_44709d6fcb"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenaiAttributes.openai_response_system_fingerprint() + :"openai.response.system_fingerprint" + + ### Erlang + + ```erlang + ?OPENAI_RESPONSE_SYSTEM_FINGERPRINT. + 'openai.response.system_fingerprint' + ``` + + + """ + @spec openai_response_system_fingerprint :: :"openai.response.system_fingerprint" + def openai_response_system_fingerprint do + :"openai.response.system_fingerprint" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openshift_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openshift_attributes.ex new file mode 100644 index 000000000..fdeb11376 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/openshift_attributes.ex @@ -0,0 +1,72 @@ +defmodule OpenTelemetry.SemConv.Incubating.OpenshiftAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Openshift attributes. + """ + + @doc """ + The name of the cluster quota. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenshiftAttributes.openshift_clusterquota_name() + :"openshift.clusterquota.name" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_NAME. + 'openshift.clusterquota.name' + ``` + + + """ + @spec openshift_clusterquota_name :: :"openshift.clusterquota.name" + def openshift_clusterquota_name do + :"openshift.clusterquota.name" + end + + @doc """ + The UID of the cluster quota. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OpenshiftAttributes.openshift_clusterquota_uid() + :"openshift.clusterquota.uid" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_UID. + 'openshift.clusterquota.uid' + ``` + + + """ + @spec openshift_clusterquota_uid :: :"openshift.clusterquota.uid" + def openshift_clusterquota_uid do + :"openshift.clusterquota.uid" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracle_cloud_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracle_cloud_attributes.ex new file mode 100644 index 000000000..f21b4749f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracle_cloud_attributes.ex @@ -0,0 +1,43 @@ +defmodule OpenTelemetry.SemConv.Incubating.OracleCloudAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Oracle_Cloud attributes. + """ + + @doc """ + The OCI realm identifier that indicates the isolated partition in which the tenancy and its resources reside. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + See [OCI documentation on realms](https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm) + + ### Examples + + ``` + ["oc1", "oc2"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracleCloudAttributes.oracle_cloud_realm() + :"oracle_cloud.realm" + + ### Erlang + + ```erlang + ?ORACLE_CLOUD_REALM. + 'oracle_cloud.realm' + ``` + + + """ + @spec oracle_cloud_realm :: :"oracle_cloud.realm" + def oracle_cloud_realm do + :"oracle_cloud.realm" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracledb_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracledb_attributes.ex new file mode 100644 index 000000000..0827b6166 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/oracledb_attributes.ex @@ -0,0 +1,204 @@ +defmodule OpenTelemetry.SemConv.Incubating.OracledbAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Oracledb attributes. + """ + + @doc """ + The database domain associated with the connection. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute **SHOULD** be set to the value of the `DB_DOMAIN` initialization parameter, + as exposed in `v$parameter`. `DB_DOMAIN` defines the domain portion of the global + database name and **SHOULD** be configured when a database is, or may become, part of a + distributed environment. Its value consists of one or more valid identifiers + (alphanumeric ASCII characters) separated by periods. + + ### Examples + + ``` + ["example.com", "corp.internal", "prod.db.local"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracledbAttributes.oracle_db_domain() + :"oracle.db.domain" + + ### Erlang + + ```erlang + ?ORACLE_DB_DOMAIN. + 'oracle.db.domain' + ``` + + + """ + @spec oracle_db_domain :: :"oracle.db.domain" + def oracle_db_domain do + :"oracle.db.domain" + end + + @doc """ + The instance name associated with the connection in an Oracle Real Application Clusters environment. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + There can be multiple instances associated with a single database service. It indicates the + unique instance name to which the connection is currently bound. For non-RAC databases, this value + defaults to the `oracle.db.name`. + + ### Examples + + ``` + ["ORCL1", "ORCL2", "ORCL3"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracledbAttributes.oracle_db_instance_name() + :"oracle.db.instance.name" + + ### Erlang + + ```erlang + ?ORACLE_DB_INSTANCE_NAME. + 'oracle.db.instance.name' + ``` + + + """ + @spec oracle_db_instance_name :: :"oracle.db.instance.name" + def oracle_db_instance_name do + :"oracle.db.instance.name" + end + + @doc """ + The database name associated with the connection. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute **SHOULD** be set to the value of the parameter `DB_NAME` exposed in `v$parameter`. + + ### Examples + + ``` + ["ORCL1", "FREE"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracledbAttributes.oracle_db_name() + :"oracle.db.name" + + ### Erlang + + ```erlang + ?ORACLE_DB_NAME. + 'oracle.db.name' + ``` + + + """ + @spec oracle_db_name :: :"oracle.db.name" + def oracle_db_name do + :"oracle.db.name" + end + + @doc """ + The pluggable database (PDB) name associated with the connection. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute **SHOULD** reflect the PDB that the session is currently connected to. + If instrumentation cannot reliably obtain the active PDB name for each operation + without issuing an additional query (such as `SELECT SYS_CONTEXT`), it is + RECOMMENDED to fall back to the PDB name specified at connection establishment. + + ### Examples + + ``` + ["PDB1", "FREEPDB"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracledbAttributes.oracle_db_pdb() + :"oracle.db.pdb" + + ### Erlang + + ```erlang + ?ORACLE_DB_PDB. + 'oracle.db.pdb' + ``` + + + """ + @spec oracle_db_pdb :: :"oracle.db.pdb" + def oracle_db_pdb do + :"oracle.db.pdb" + end + + @doc """ + The service name currently associated with the database connection. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The effective service name for a connection can change during its lifetime, + for example after executing sql, `ALTER SESSION`. If an instrumentation cannot reliably + obtain the current service name for each operation without issuing an additional + query (such as `SELECT SYS_CONTEXT`), it is RECOMMENDED to fall back to the + service name originally provided at connection establishment. + + ### Examples + + ``` + ["order-processing-service", "db_low.adb.oraclecloud.com", "db_high.adb.oraclecloud.com"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OracledbAttributes.oracle_db_service() + :"oracle.db.service" + + ### Erlang + + ```erlang + ?ORACLE_DB_SERVICE. + 'oracle.db.service' + ``` + + + """ + @spec oracle_db_service :: :"oracle.db.service" + def oracle_db_service do + :"oracle.db.service" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex index 26c35d09e..1efedccef 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/os_attributes.ex @@ -116,7 +116,8 @@ defmodule OpenTelemetry.SemConv.Incubating.OSAttributes do * `:hpux` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - HP-UX (Hewlett Packard Unix) * `:aix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - AIX (Advanced Interactive eXecutive) * `:solaris` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SunOS, Oracle Solaris - * `:z_os` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM z/OS + * `:z_os` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated. Use `zos` instead.~~ + * `:zos` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IBM z/OS """ @type os_type_values() :: %{ :windows => :windows, @@ -129,7 +130,8 @@ defmodule OpenTelemetry.SemConv.Incubating.OSAttributes do :hpux => :hpux, :aix => :aix, :solaris => :solaris, - :z_os => :z_os + :z_os => :z_os, + :zos => :zos } @doc """ The operating system type. @@ -182,7 +184,8 @@ defmodule OpenTelemetry.SemConv.Incubating.OSAttributes do :hpux => :hpux, :aix => :aix, :solaris => :solaris, - :z_os => :z_os + :z_os => :z_os, + :zos => :zos } end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex index d0fc65f49..c77510ba0 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex @@ -3,9 +3,230 @@ defmodule OpenTelemetry.SemConv.Incubating.OtelAttributes do @moduledoc """ OpenTelemetry Semantic Conventions for Otel attributes. """ + defdelegate otel_scope_name(), to: OpenTelemetry.SemConv.OtelAttributes + + defdelegate otel_scope_version(), to: OpenTelemetry.SemConv.OtelAttributes + + defdelegate otel_status_code(), to: OpenTelemetry.SemConv.OtelAttributes + + defdelegate otel_status_code_values(), to: OpenTelemetry.SemConv.OtelAttributes + + defdelegate otel_status_description(), to: OpenTelemetry.SemConv.OtelAttributes + + @doc """ + A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### 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 `/` pattern, e.g. `batching_span_processor/0`. + Hereby `otel.component.type` refers to the corresponding attribute value of the component. + + The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed. + For example, `` **MAY** be implemented by using a monotonically increasing counter (starting with `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 `batching_span_processor/0` + as `otel.component.name`, the second one `batching_span_processor/1` and so on. + These values will therefore be reused in the case of an application restart. + + ### Examples + + ``` + ["otlp_grpc_span_exporter/0", "custom-name"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_component_name() + :"otel.component.name" + + ### Erlang + + ```erlang + ?OTEL_COMPONENT_NAME. + 'otel.component.name' + ``` + + + """ + @spec otel_component_name :: :"otel.component.name" + def otel_component_name do + :"otel.component.name" + end + + @typedoc """ + A name identifying the type of the OpenTelemetry component. + + + ### Enum Values + * `:batching_span_processor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The builtin SDK batching span processor + + * `:simple_span_processor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The builtin SDK simple span processor + + * `:batching_log_processor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The builtin SDK batching log record processor + + * `:simple_log_processor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The builtin SDK simple log record processor + + * `:otlp_grpc_span_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP span exporter over gRPC with protobuf serialization + + * `:otlp_http_span_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP span exporter over HTTP with protobuf serialization + + * `:otlp_http_json_span_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP span exporter over HTTP with JSON serialization + + * `:zipkin_http_span_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Zipkin span exporter over HTTP + + * `:otlp_grpc_log_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP log record exporter over gRPC with protobuf serialization + + * `:otlp_http_log_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP log record exporter over HTTP with protobuf serialization + + * `:otlp_http_json_log_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP log record exporter over HTTP with JSON serialization + + * `:periodic_metric_reader` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The builtin SDK periodically exporting metric reader + + * `:otlp_grpc_metric_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP metric exporter over gRPC with protobuf serialization + + * `:otlp_http_metric_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP metric exporter over HTTP with protobuf serialization + + * `:otlp_http_json_metric_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OTLP metric exporter over HTTP with JSON serialization + + * `:prometheus_http_text_metric_exporter` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Prometheus metric exporter over HTTP with the default text-based format + + """ + @type otel_component_type_values() :: %{ + :batching_span_processor => :batching_span_processor, + :simple_span_processor => :simple_span_processor, + :batching_log_processor => :batching_log_processor, + :simple_log_processor => :simple_log_processor, + :otlp_grpc_span_exporter => :otlp_grpc_span_exporter, + :otlp_http_span_exporter => :otlp_http_span_exporter, + :otlp_http_json_span_exporter => :otlp_http_json_span_exporter, + :zipkin_http_span_exporter => :zipkin_http_span_exporter, + :otlp_grpc_log_exporter => :otlp_grpc_log_exporter, + :otlp_http_log_exporter => :otlp_http_log_exporter, + :otlp_http_json_log_exporter => :otlp_http_json_log_exporter, + :periodic_metric_reader => :periodic_metric_reader, + :otlp_grpc_metric_exporter => :otlp_grpc_metric_exporter, + :otlp_http_metric_exporter => :otlp_http_metric_exporter, + :otlp_http_json_metric_exporter => :otlp_http_json_metric_exporter, + :prometheus_http_text_metric_exporter => :prometheus_http_text_metric_exporter + } + @doc """ + 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. + + ### Examples + + ``` + ["batching_span_processor", "com.example.MySpanExporter"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_component_type() + :"otel.component.type" + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_component_type_values().batching_span_processor + :batching_span_processor + + iex> %{OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_component_type() => OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_component_type_values().batching_span_processor} + %{:"otel.component.type" => :batching_span_processor} + + ### Erlang + + ```erlang + ?OTEL_COMPONENT_TYPE. + 'otel.component.type' + + ?OTEL_COMPONENT_TYPE_VALUES_BATCHING_SPAN_PROCESSOR. + 'batching_span_processor' + + \#{?OTEL_COMPONENT_TYPE => ?OTEL_COMPONENT_TYPE_VALUES_BATCHING_SPAN_PROCESSOR}. + \#{'otel.component.type' => 'batching_span_processor'} + ``` + + + """ + @spec otel_component_type :: :"otel.component.type" + def otel_component_type do + :"otel.component.type" + end + + @spec otel_component_type_values() :: otel_component_type_values() + def otel_component_type_values() do + %{ + :batching_span_processor => :batching_span_processor, + :simple_span_processor => :simple_span_processor, + :batching_log_processor => :batching_log_processor, + :simple_log_processor => :simple_log_processor, + :otlp_grpc_span_exporter => :otlp_grpc_span_exporter, + :otlp_http_span_exporter => :otlp_http_span_exporter, + :otlp_http_json_span_exporter => :otlp_http_json_span_exporter, + :zipkin_http_span_exporter => :zipkin_http_span_exporter, + :otlp_grpc_log_exporter => :otlp_grpc_log_exporter, + :otlp_http_log_exporter => :otlp_http_log_exporter, + :otlp_http_json_log_exporter => :otlp_http_json_log_exporter, + :periodic_metric_reader => :periodic_metric_reader, + :otlp_grpc_metric_exporter => :otlp_grpc_metric_exporter, + :otlp_http_metric_exporter => :otlp_http_metric_exporter, + :otlp_http_json_metric_exporter => :otlp_http_json_metric_exporter, + :prometheus_http_text_metric_exporter => :prometheus_http_text_metric_exporter + } + end + + @doc """ + Identifies the class / type of event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute **SHOULD** be used by non-OTLP exporters when destination does not support `EventName` or equivalent field. This attribute **MAY** be used by applications using existing logging libraries so that it can be used to set the `EventName` field by Collector or SDK components. + + ### Examples + + ``` + ["browser.mouse.click", "device.app.lifecycle"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_event_name() + :"otel.event.name" + + ### Erlang + + ```erlang + ?OTEL_EVENT_NAME. + 'otel.event.name' + ``` + + + """ + @spec otel_event_name :: :"otel.event.name" + def otel_event_name do + :"otel.event.name" + end @deprecated """ - use the `otel.scope.name` attribute. + Replaced by `otel.scope.name`. """ @spec otel_library_name :: :"otel.library.name" def otel_library_name do @@ -13,10 +234,160 @@ defmodule OpenTelemetry.SemConv.Incubating.OtelAttributes do end @deprecated """ - use the `otel.scope.version` attribute. + Replaced by `otel.scope.version`. """ @spec otel_library_version :: :"otel.library.version" def otel_library_version do :"otel.library.version" end + + @doc """ + The schema URL of the instrumentation scope. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["https://opentelemetry.io/schemas/1.31.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_scope_schema_url() + :"otel.scope.schema_url" + + ### Erlang + + ```erlang + ?OTEL_SCOPE_SCHEMA_URL. + 'otel.scope.schema_url' + ``` + + + """ + @spec otel_scope_schema_url :: :"otel.scope.schema_url" + def otel_scope_schema_url do + :"otel.scope.schema_url" + end + + @typedoc """ + Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) + + ### Enum Values + * `:none` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span does not have a parent, it is a root span + * `:local` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span has a parent and the parent's span context [isRemote()](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) is false + * `:remote` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span has a parent and the parent's span context [isRemote()](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) is true + """ + @type otel_span_parent_origin_values() :: %{ + :none => :none, + :local => :local, + :remote => :remote + } + @doc """ + Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote) + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_parent_origin() + :"otel.span.parent.origin" + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_parent_origin_values().none + :none + + iex> %{OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_parent_origin() => OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_parent_origin_values().none} + %{:"otel.span.parent.origin" => :none} + + ### Erlang + + ```erlang + ?OTEL_SPAN_PARENT_ORIGIN. + 'otel.span.parent.origin' + + ?OTEL_SPAN_PARENT_ORIGIN_VALUES_NONE. + 'none' + + \#{?OTEL_SPAN_PARENT_ORIGIN => ?OTEL_SPAN_PARENT_ORIGIN_VALUES_NONE}. + \#{'otel.span.parent.origin' => 'none'} + ``` + + + """ + @spec otel_span_parent_origin :: :"otel.span.parent.origin" + def otel_span_parent_origin do + :"otel.span.parent.origin" + end + + @spec otel_span_parent_origin_values() :: otel_span_parent_origin_values() + def otel_span_parent_origin_values() do + %{ + :none => :none, + :local => :local, + :remote => :remote + } + end + + @typedoc """ + The result value of the sampler for this span + + ### Enum Values + * `:drop` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span is not sampled and not recording + * `:record_only` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span is not sampled, but recording + * `:record_and_sample` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - The span is sampled and recording + """ + @type otel_span_sampling_result_values() :: %{ + :drop => :DROP, + :record_only => :RECORD_ONLY, + :record_and_sample => :RECORD_AND_SAMPLE + } + @doc """ + The result value of the sampler for this span + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_sampling_result() + :"otel.span.sampling_result" + + iex> OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_sampling_result_values().drop + :DROP + + iex> %{OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_sampling_result() => OpenTelemetry.SemConv.Incubating.OtelAttributes.otel_span_sampling_result_values().drop} + %{:"otel.span.sampling_result" => :DROP} + + ### Erlang + + ```erlang + ?OTEL_SPAN_SAMPLING_RESULT. + 'otel.span.sampling_result' + + ?OTEL_SPAN_SAMPLING_RESULT_VALUES_DROP. + 'DROP' + + \#{?OTEL_SPAN_SAMPLING_RESULT => ?OTEL_SPAN_SAMPLING_RESULT_VALUES_DROP}. + \#{'otel.span.sampling_result' => 'DROP'} + ``` + + + """ + @spec otel_span_sampling_result :: :"otel.span.sampling_result" + def otel_span_sampling_result do + :"otel.span.sampling_result" + end + + @spec otel_span_sampling_result_values() :: otel_span_sampling_result_values() + def otel_span_sampling_result_values() do + %{ + :drop => :DROP, + :record_only => :RECORD_ONLY, + :record_and_sample => :RECORD_AND_SAMPLE + } + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex index 1ea717e06..bc7eddbcf 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/peer_attributes.ex @@ -4,33 +4,8 @@ defmodule OpenTelemetry.SemConv.Incubating.PeerAttributes do OpenTelemetry Semantic Conventions for Peer attributes. """ - @doc """ - The [`service.name`](/docs/resource/README.md#service) of the remote service. **SHOULD** be equal to the actual `service.name` resource attribute of the remote service if any. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - AuthTokenCache - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.PeerAttributes.peer_service() - :"peer.service" - - ### Erlang - - ```erlang - ?PEER_SERVICE. - 'peer.service' - ``` - - + @deprecated """ + Replaced by `service.peer.name`. """ @spec peer_service :: :"peer.service" def peer_service do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pprof_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pprof_attributes.ex new file mode 100644 index 000000000..b28ce6d2c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pprof_attributes.ex @@ -0,0 +1,356 @@ +defmodule OpenTelemetry.SemConv.Incubating.PprofAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Pprof attributes. + """ + + @doc """ + Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_location_is_folded() + :"pprof.location.is_folded" + + ### Erlang + + ```erlang + ?PPROF_LOCATION_IS_FOLDED. + 'pprof.location.is_folded' + ``` + + + """ + @spec pprof_location_is_folded :: :"pprof.location.is_folded" + def pprof_location_is_folded do + :"pprof.location.is_folded" + end + + @doc """ + Indicates that there are filenames related to this mapping. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_mapping_has_filenames() + :"pprof.mapping.has_filenames" + + ### Erlang + + ```erlang + ?PPROF_MAPPING_HAS_FILENAMES. + 'pprof.mapping.has_filenames' + ``` + + + """ + @spec pprof_mapping_has_filenames :: :"pprof.mapping.has_filenames" + def pprof_mapping_has_filenames do + :"pprof.mapping.has_filenames" + end + + @doc """ + Indicates that there are functions related to this mapping. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_mapping_has_functions() + :"pprof.mapping.has_functions" + + ### Erlang + + ```erlang + ?PPROF_MAPPING_HAS_FUNCTIONS. + 'pprof.mapping.has_functions' + ``` + + + """ + @spec pprof_mapping_has_functions :: :"pprof.mapping.has_functions" + def pprof_mapping_has_functions do + :"pprof.mapping.has_functions" + end + + @doc """ + Indicates that there are inline frames related to this mapping. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_mapping_has_inline_frames() + :"pprof.mapping.has_inline_frames" + + ### Erlang + + ```erlang + ?PPROF_MAPPING_HAS_INLINE_FRAMES. + 'pprof.mapping.has_inline_frames' + ``` + + + """ + @spec pprof_mapping_has_inline_frames :: :"pprof.mapping.has_inline_frames" + def pprof_mapping_has_inline_frames do + :"pprof.mapping.has_inline_frames" + end + + @doc """ + Indicates that there are line numbers related to this mapping. + + ### Value type + + Value must be of type `boolean()`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_mapping_has_line_numbers() + :"pprof.mapping.has_line_numbers" + + ### Erlang + + ```erlang + ?PPROF_MAPPING_HAS_LINE_NUMBERS. + 'pprof.mapping.has_line_numbers' + ``` + + + """ + @spec pprof_mapping_has_line_numbers :: :"pprof.mapping.has_line_numbers" + def pprof_mapping_has_line_numbers do + :"pprof.mapping.has_line_numbers" + end + + @doc """ + Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. + + ### Value type + + Value must be of type `[atom() | String.t()]`. + ### Examples + + ``` + [["hello world", "bazinga"]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_profile_comment() + :"pprof.profile.comment" + + ### Erlang + + ```erlang + ?PPROF_PROFILE_COMMENT. + 'pprof.profile.comment' + ``` + + + """ + @spec pprof_profile_comment :: :"pprof.profile.comment" + def pprof_profile_comment do + :"pprof.profile.comment" + end + + @doc """ + Documentation link for this profile type. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The URL must be absolute and may be missing if the profile was generated by code that did not supply a link + + ### Examples + + ``` + ["http://pprof.example.com/cpu-profile.html"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_profile_doc_url() + :"pprof.profile.doc_url" + + ### Erlang + + ```erlang + ?PPROF_PROFILE_DOC_URL. + 'pprof.profile.doc_url' + ``` + + + """ + @spec pprof_profile_doc_url :: :"pprof.profile.doc_url" + def pprof_profile_doc_url do + :"pprof.profile.doc_url" + end + + @doc """ + Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/foobar/"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_profile_drop_frames() + :"pprof.profile.drop_frames" + + ### Erlang + + ```erlang + ?PPROF_PROFILE_DROP_FRAMES. + 'pprof.profile.drop_frames' + ``` + + + """ + @spec pprof_profile_drop_frames :: :"pprof.profile.drop_frames" + def pprof_profile_drop_frames do + :"pprof.profile.drop_frames" + end + + @doc """ + Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/bazinga/"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_profile_keep_frames() + :"pprof.profile.keep_frames" + + ### Erlang + + ```erlang + ?PPROF_PROFILE_KEEP_FRAMES. + 'pprof.profile.keep_frames' + ``` + + + """ + @spec pprof_profile_keep_frames :: :"pprof.profile.keep_frames" + def pprof_profile_keep_frames do + :"pprof.profile.keep_frames" + end + + @doc """ + Records the pprof's default_sample_type in the original profile. Not set if the default sample type was missing. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + This attribute, if present, **MUST** be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). + + ### Examples + + ``` + ["cpu"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_scope_default_sample_type() + :"pprof.scope.default_sample_type" + + ### Erlang + + ```erlang + ?PPROF_SCOPE_DEFAULT_SAMPLE_TYPE. + 'pprof.scope.default_sample_type' + ``` + + + """ + @spec pprof_scope_default_sample_type :: :"pprof.scope.default_sample_type" + def pprof_scope_default_sample_type do + :"pprof.scope.default_sample_type" + end + + @doc """ + Records the indexes of the sample types in the original profile. + + ### Value type + + Value must be of type `[integer()]`. + ### Notes + + This attribute, if present, **MUST** be set at the scope level (resource_profiles[].scope_profiles[].scope.attributes[]). + + ### Examples + + ``` + [[3, 0, 1, 2]] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.PprofAttributes.pprof_scope_sample_type_order() + :"pprof.scope.sample_type_order" + + ### Erlang + + ```erlang + ?PPROF_SCOPE_SAMPLE_TYPE_ORDER. + 'pprof.scope.sample_type_order' + ``` + + + """ + @spec pprof_scope_sample_type_order :: :"pprof.scope.sample_type_order" + def pprof_scope_sample_type_order do + :"pprof.scope.sample_type_order" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex index a05d0e91e..3b9037e69 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/process_attributes.ex @@ -4,6 +4,43 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do OpenTelemetry Semantic Conventions for Process attributes. """ + @doc """ + Length of the process.command_args array + + ### Value type + + Value must be of type `integer()`. + ### Notes + + This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity. + + ### Examples + + ``` + [4] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_args_count() + :"process.args_count" + + ### Erlang + + ```erlang + ?PROCESS_ARGS_COUNT. + 'process.args_count' + ``` + + + """ + @spec process_args_count :: :"process.args_count" + def process_args_count do + :"process.args_count" + end + @doc """ 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`. @@ -38,7 +75,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do end @doc """ - 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`. + 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`. **SHOULD** **NOT** be collected by default unless there is sanitization that excludes sensitive data. ### Value type @@ -46,7 +83,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do ### Examples ``` - ["cmd/otecol", "--config=config.yaml"] + [["cmd/otecol", "--config=config.yaml"]] ``` @@ -71,7 +108,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do end @doc """ - 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. + 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. **SHOULD** **NOT** be collected by default unless there is sanitization that excludes sensitive data. ### Value type @@ -107,8 +144,8 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do Specifies whether the context switches for this data point were voluntary or involuntary. ### Enum Values - * `:voluntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:involuntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:voluntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:involuntary` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type process_context_switch_type_values() :: %{ :voluntary => :voluntary, @@ -123,32 +160,32 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do ### Elixir iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type() - :"process.context_switch_type" + :"process.context_switch.type" iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type_values().voluntary :voluntary iex> %{OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type() => OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_context_switch_type_values().voluntary} - %{:"process.context_switch_type" => :voluntary} + %{:"process.context_switch.type" => :voluntary} ### Erlang ```erlang ?PROCESS_CONTEXT_SWITCH_TYPE. - 'process.context_switch_type' + 'process.context_switch.type' ?PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY. 'voluntary' \#{?PROCESS_CONTEXT_SWITCH_TYPE => ?PROCESS_CONTEXT_SWITCH_TYPE_VALUES_VOLUNTARY}. - \#{'process.context_switch_type' => 'voluntary'} + \#{'process.context_switch.type' => 'voluntary'} ``` """ - @spec process_context_switch_type :: :"process.context_switch_type" + @spec process_context_switch_type :: :"process.context_switch.type" def process_context_switch_type do - :"process.context_switch_type" + :"process.context_switch.type" end @spec process_context_switch_type_values() :: process_context_switch_type_values() @@ -163,9 +200,9 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do Deprecated, use `cpu.mode` instead. ### Enum Values - * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type process_cpu_state_values() :: %{ :system => :system, @@ -173,7 +210,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do :wait => :wait } @deprecated """ - Replaced by `cpu.mode` + Replaced by `cpu.mode`. """ @spec process_cpu_state :: :"process.cpu.state" def process_cpu_state do @@ -223,7 +260,158 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do end @doc """ - 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`. + Process environment variables, `` being the environment variable name, the value being the environment variable value. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Examples: + + - an environment variable `USER` with value `"ubuntu"` **SHOULD** be recorded + as the `process.environment_variable.USER` attribute with value `"ubuntu"`. + + - an environment variable `PATH` with value `"/usr/local/bin:/usr/bin"` + **SHOULD** be recorded as the `process.environment_variable.PATH` attribute + with value `"/usr/local/bin:/usr/bin"`. + + ### Examples + + ``` + ["ubuntu", "/usr/local/bin:/usr/bin"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_environment_variable() + :"process.environment_variable" + + ### Erlang + + ```erlang + ?PROCESS_ENVIRONMENT_VARIABLE. + 'process.environment_variable' + ``` + + + """ + @spec process_environment_variable :: :"process.environment_variable" + def process_environment_variable do + :"process.environment_variable" + end + + @doc """ + The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["c89b11207f6479603b0d49bf291c092c2b719293"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_executable_build_id_gnu() + :"process.executable.build_id.gnu" + + ### Erlang + + ```erlang + ?PROCESS_EXECUTABLE_BUILD_ID_GNU. + 'process.executable.build_id.gnu' + ``` + + + """ + @spec process_executable_build_id_gnu :: :"process.executable.build_id.gnu" + def process_executable_build_id_gnu do + :"process.executable.build_id.gnu" + end + + @doc """ + The Go build ID as retrieved by `go tool buildid `. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_executable_build_id_go() + :"process.executable.build_id.go" + + ### Erlang + + ```erlang + ?PROCESS_EXECUTABLE_BUILD_ID_GO. + 'process.executable.build_id.go' + ``` + + + """ + @spec process_executable_build_id_go :: :"process.executable.build_id.go" + def process_executable_build_id_go do + :"process.executable.build_id.go" + end + + @doc """ + Profiling specific build ID for executables. See the OTel specification for Profiles for more information. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["600DCAFE4A110000F2BF38C493F5FB92"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_executable_build_id_htlhash() + :"process.executable.build_id.htlhash" + + ### Erlang + + ```erlang + ?PROCESS_EXECUTABLE_BUILD_ID_HTLHASH. + 'process.executable.build_id.htlhash' + ``` + + + """ + @spec process_executable_build_id_htlhash :: :"process.executable.build_id.htlhash" + def process_executable_build_id_htlhash do + :"process.executable.build_id.htlhash" + end + + @deprecated """ + Replaced by `process.executable.build_id.htlhash`. + """ + @spec process_executable_build_id_profiling :: :"process.executable.build_id.profiling" + def process_executable_build_id_profiling do + :"process.executable.build_id.profiling" + end + + @doc """ + The name of the process executable. On Linux based systems, this **SHOULD** be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this **SHOULD** be set to the base name of `GetProcessImageFileNameW`. ### Value type @@ -415,6 +603,42 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do :"process.interactive" end + @doc """ + The control group associated with the process. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Control groups (cgroups) are a kernel feature used to organize and manage process resources. This attribute provides the path(s) to the cgroup(s) associated with the process, which should match the contents of the [/proc/\[PID\]/cgroup](https://man7.org/linux/man-pages/man7/cgroups.7.html) file. + + ### Examples + + ``` + ["1:name=systemd:/user.slice/user-1000.slice/session-3.scope", "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_linux_cgroup() + :"process.linux.cgroup" + + ### Erlang + + ```erlang + ?PROCESS_LINUX_CGROUP. + 'process.linux.cgroup' + ``` + + + """ + @spec process_linux_cgroup :: :"process.linux.cgroup" + def process_linux_cgroup do + :"process.linux.cgroup" + end + @doc """ The username of the user that owns the process. @@ -449,49 +673,18 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do end @typedoc """ - The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. - + Deprecated, use `system.paging.fault.type` instead. ### Enum Values - * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type process_paging_fault_type_values() :: %{ :major => :major, :minor => :minor } - @doc """ - The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. - - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type() - :"process.paging.fault_type" - - iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type_values().major - :major - - iex> %{OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type() => OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_paging_fault_type_values().major} - %{:"process.paging.fault_type" => :major} - - ### Erlang - - ```erlang - ?PROCESS_PAGING_FAULT_TYPE. - 'process.paging.fault_type' - - ?PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR. - 'major' - - \#{?PROCESS_PAGING_FAULT_TYPE => ?PROCESS_PAGING_FAULT_TYPE_VALUES_MAJOR}. - \#{'process.paging.fault_type' => 'major'} - ``` - - + @deprecated """ + Replaced by `system.paging.fault.type`. """ @spec process_paging_fault_type :: :"process.paging.fault_type" def process_paging_fault_type do @@ -836,6 +1029,112 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do :"process.session_leader.pid" end + @typedoc """ + The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + + + ### Enum Values + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type process_state_values() :: %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + @doc """ + The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + + + ### Examples + + ``` + ["running"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_state() + :"process.state" + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_state_values().running + :running + + iex> %{OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_state() => OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_state_values().running} + %{:"process.state" => :running} + + ### Erlang + + ```erlang + ?PROCESS_STATE. + 'process.state' + + ?PROCESS_STATE_VALUES_RUNNING. + 'running' + + \#{?PROCESS_STATE => ?PROCESS_STATE_VALUES_RUNNING}. + \#{'process.state' => 'running'} + ``` + + + """ + @spec process_state :: :"process.state" + def process_state do + :"process.state" + end + + @spec process_state_values() :: process_state_values() + def process_state_values() do + %{ + :running => :running, + :sleeping => :sleeping, + :stopped => :stopped, + :defunct => :defunct + } + end + + @doc """ + Process title (proctitle) + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop. + + ### Examples + + ``` + ["cat /etc/hostname", "xfce4-session", "bash"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_title() + :"process.title" + + ### Erlang + + ```erlang + ?PROCESS_TITLE. + 'process.title' + ``` + + + """ + @spec process_title :: :"process.title" + def process_title do + :"process.title" + end + @doc """ The effective user ID (EUID) of the process. @@ -938,4 +1237,37 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do def process_vpid do :"process.vpid" end + + @doc """ + The working directory of the process. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["/root"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProcessAttributes.process_working_directory() + :"process.working_directory" + + ### Erlang + + ```erlang + ?PROCESS_WORKING_DIRECTORY. + 'process.working_directory' + ``` + + + """ + @spec process_working_directory :: :"process.working_directory" + def process_working_directory do + :"process.working_directory" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/profile_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/profile_attributes.ex new file mode 100644 index 000000000..b51306b4f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/profile_attributes.ex @@ -0,0 +1,111 @@ +defmodule OpenTelemetry.SemConv.Incubating.ProfileAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Profile attributes. + """ + + @typedoc """ + Describes the interpreter or compiler of a single frame. + + + ### Enum Values + * `:dotnet` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [.NET](https://wikipedia.org/wiki/.NET) + + * `:jvm` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [JVM](https://wikipedia.org/wiki/Java_virtual_machine) + + * `:kernel` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Kernel](https://wikipedia.org/wiki/Kernel_(operating_system)) + + * `:native` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Can be one of but not limited to [C](https://wikipedia.org/wiki/C_(programming_language)), [C++](https://wikipedia.org/wiki/C%2B%2B), [Go](https://wikipedia.org/wiki/Go_(programming_language)) or [Rust](https://wikipedia.org/wiki/Rust_(programming_language)). If possible, a more precise value MUST be used. + + * `:perl` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Perl](https://wikipedia.org/wiki/Perl) + + * `:php` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [PHP](https://wikipedia.org/wiki/PHP) + + * `:cpython` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Python](https://wikipedia.org/wiki/Python_(programming_language)) + + * `:ruby` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Ruby](https://wikipedia.org/wiki/Ruby_(programming_language)) + + * `:v8js` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [V8JS](https://wikipedia.org/wiki/V8_(JavaScript_engine)) + + * `:beam` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Erlang](https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)) + + * `:go` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Go](https://wikipedia.org/wiki/Go_(programming_language)), + + * `:rust` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Rust](https://wikipedia.org/wiki/Rust_(programming_language)) + + """ + @type profile_frame_type_values() :: %{ + :dotnet => :dotnet, + :jvm => :jvm, + :kernel => :kernel, + :native => :native, + :perl => :perl, + :php => :php, + :cpython => :cpython, + :ruby => :ruby, + :v8js => :v8js, + :beam => :beam, + :go => :go, + :rust => :rust + } + @doc """ + Describes the interpreter or compiler of a single frame. + + + ### Examples + + ``` + ["cpython"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ProfileAttributes.profile_frame_type() + :"profile.frame.type" + + iex> OpenTelemetry.SemConv.Incubating.ProfileAttributes.profile_frame_type_values().dotnet + :dotnet + + iex> %{OpenTelemetry.SemConv.Incubating.ProfileAttributes.profile_frame_type() => OpenTelemetry.SemConv.Incubating.ProfileAttributes.profile_frame_type_values().dotnet} + %{:"profile.frame.type" => :dotnet} + + ### Erlang + + ```erlang + ?PROFILE_FRAME_TYPE. + 'profile.frame.type' + + ?PROFILE_FRAME_TYPE_VALUES_DOTNET. + 'dotnet' + + \#{?PROFILE_FRAME_TYPE => ?PROFILE_FRAME_TYPE_VALUES_DOTNET}. + \#{'profile.frame.type' => 'dotnet'} + ``` + + + """ + @spec profile_frame_type :: :"profile.frame.type" + def profile_frame_type do + :"profile.frame.type" + end + + @spec profile_frame_type_values() :: profile_frame_type_values() + def profile_frame_type_values() do + %{ + :dotnet => :dotnet, + :jvm => :jvm, + :kernel => :kernel, + :native => :native, + :perl => :perl, + :php => :php, + :cpython => :cpython, + :ruby => :ruby, + :v8js => :v8js, + :beam => :beam, + :go => :go, + :rust => :rust + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex index 21ff59ae6..78f2e4fc0 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex @@ -5,7 +5,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do """ @deprecated """ - Replaced by `rpc.message.compressed_size`. + Deprecated, no replacement at this time. """ @spec message_compressed_size :: :"message.compressed_size" def message_compressed_size do @@ -13,7 +13,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do end @deprecated """ - Replaced by `rpc.message.id`. + Deprecated, no replacement at this time. """ @spec message_id :: :"message.id" def message_id do @@ -21,18 +21,18 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do end @typedoc """ - Deprecated, use `rpc.message.type` instead. + Deprecated, no replacement at this time. ### Enum Values - * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type message_type_values() :: %{ :sent => :SENT, :received => :RECEIVED } @deprecated """ - Replaced by `rpc.message.type`. + Deprecated, no replacement at this time. """ @spec message_type :: :"message.type" def message_type do @@ -48,7 +48,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do end @deprecated """ - Replaced by `rpc.message.uncompressed_size`. + Deprecated, no replacement at this time. """ @spec message_uncompressed_size :: :"message.uncompressed_size" def message_uncompressed_size do @@ -56,25 +56,25 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do end @typedoc """ - The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + Deprecated, use `rpc.response.status_code` attribute instead. ### Enum Values - * `:cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:invalid_argument` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:deadline_exceeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:not_found` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:already_exists` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:permission_denied` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:resource_exhausted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:failed_precondition` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:aborted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:out_of_range` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unimplemented` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:internal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:data_loss` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:unauthenticated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unknown` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:invalid_argument` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:deadline_exceeded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:not_found` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:already_exists` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:permission_denied` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:resource_exhausted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:failed_precondition` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:aborted` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:out_of_range` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unimplemented` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:internal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unavailable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:data_loss` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unauthenticated` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type rpc_connect_rpc_error_code_values() :: %{ :cancelled => :cancelled, @@ -94,37 +94,8 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do :data_loss => :data_loss, :unauthenticated => :unauthenticated } - @doc """ - The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code() - :"rpc.connect_rpc.error_code" - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled - :cancelled - - iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_error_code_values().cancelled} - %{:"rpc.connect_rpc.error_code" => :cancelled} - - ### Erlang - - ```erlang - ?RPC_CONNECT_RPC_ERROR_CODE. - 'rpc.connect_rpc.error_code' - - ?RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED. - 'cancelled' - - \#{?RPC_CONNECT_RPC_ERROR_CODE => ?RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED}. - \#{'rpc.connect_rpc.error_code' => 'cancelled'} - ``` - - + @deprecated """ + Replaced by `rpc.response.status_code`. """ @spec rpc_connect_rpc_error_code :: :"rpc.connect_rpc.error_code" def rpc_connect_rpc_error_code do @@ -153,148 +124,32 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do } end - @doc """ - Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - - ### Value type - - Value must be of type `[atom() | String.t()]`. - ### Notes - - Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - - ### Examples - - ``` - ["rpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_request_metadata() - :"rpc.connect_rpc.request.metadata" - - ### Erlang - - ```erlang - ?RPC_CONNECT_RPC_REQUEST_METADATA. - 'rpc.connect_rpc.request.metadata' - ``` - - + @deprecated """ + Replaced by `rpc.request.metadata`. """ @spec rpc_connect_rpc_request_metadata :: :"rpc.connect_rpc.request.metadata" def rpc_connect_rpc_request_metadata do :"rpc.connect_rpc.request.metadata" end - @doc """ - Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - - ### Value type - - Value must be of type `[atom() | String.t()]`. - ### Notes - - Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - - ### Examples - - ``` - ["rpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_connect_rpc_response_metadata() - :"rpc.connect_rpc.response.metadata" - - ### Erlang - - ```erlang - ?RPC_CONNECT_RPC_RESPONSE_METADATA. - 'rpc.connect_rpc.response.metadata' - ``` - - + @deprecated """ + Replaced by `rpc.response.metadata`. """ @spec rpc_connect_rpc_response_metadata :: :"rpc.connect_rpc.response.metadata" def rpc_connect_rpc_response_metadata do :"rpc.connect_rpc.response.metadata" end - @doc """ - gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - - ### Value type - - Value must be of type `[atom() | String.t()]`. - ### Notes - - Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - - ### Examples - - ``` - ["rpc.grpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_request_metadata() - :"rpc.grpc.request.metadata" - - ### Erlang - - ```erlang - ?RPC_GRPC_REQUEST_METADATA. - 'rpc.grpc.request.metadata' - ``` - - + @deprecated """ + Replaced by `rpc.request.metadata`. """ @spec rpc_grpc_request_metadata :: :"rpc.grpc.request.metadata" def rpc_grpc_request_metadata do :"rpc.grpc.request.metadata" end - @doc """ - gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - - ### Value type - - Value must be of type `[atom() | String.t()]`. - ### Notes - - Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - - ### Examples - - ``` - ["rpc.grpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_response_metadata() - :"rpc.grpc.response.metadata" - - ### Erlang - - ```erlang - ?RPC_GRPC_RESPONSE_METADATA. - 'rpc.grpc.response.metadata' - ``` - - + @deprecated """ + Replaced by `rpc.response.metadata`. """ @spec rpc_grpc_response_metadata :: :"rpc.grpc.response.metadata" def rpc_grpc_response_metadata do @@ -302,7 +157,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do end @typedoc """ - The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + Deprecated, use string representation on the `rpc.response.status_code` attribute instead. ### Enum Values * `:ok` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - OK @@ -342,37 +197,8 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do :data_loss => 15, :unauthenticated => 16 } - @doc """ - The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code() - :"rpc.grpc.status_code" - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok - 0 - - iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_grpc_status_code_values().ok} - %{:"rpc.grpc.status_code" => 0} - - ### Erlang - - ```erlang - ?RPC_GRPC_STATUS_CODE. - 'rpc.grpc.status_code' - - ?RPC_GRPC_STATUS_CODE_VALUES_OK. - '0' - - \#{?RPC_GRPC_STATUS_CODE => ?RPC_GRPC_STATUS_CODE_VALUES_OK}. - \#{'rpc.grpc.status_code' => '0'} - ``` - - + @deprecated """ + Use string representation of the gRPC status code on the `rpc.response.status_code` attribute. """ @spec rpc_grpc_status_code :: :"rpc.grpc.status_code" def rpc_grpc_status_code do @@ -402,349 +228,309 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do } end - @doc """ - `error.code` property of response if it is an error response. - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [-32700, 100] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_code() - :"rpc.jsonrpc.error_code" - - ### Erlang - - ```erlang - ?RPC_JSONRPC_ERROR_CODE. - 'rpc.jsonrpc.error_code' - ``` - - + @deprecated """ + Use string representation of the error code on the `rpc.response.status_code` attribute. """ @spec rpc_jsonrpc_error_code :: :"rpc.jsonrpc.error_code" def rpc_jsonrpc_error_code do :"rpc.jsonrpc.error_code" end - @doc """ - `error.message` property of response if it is an error response. - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples - - ``` - ["Parse error", "User already exists"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_error_message() - :"rpc.jsonrpc.error_message" - - ### Erlang - - ```erlang - ?RPC_JSONRPC_ERROR_MESSAGE. - 'rpc.jsonrpc.error_message' - ``` - - + @deprecated """ + Use the span status description when reporting JSON-RPC spans. """ @spec rpc_jsonrpc_error_message :: :"rpc.jsonrpc.error_message" def rpc_jsonrpc_error_message do :"rpc.jsonrpc.error_message" end - @doc """ - `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. - - ### Value type - - Value must be of type `atom() | String.t()`. - ### Examples + @deprecated """ + Replaced by `jsonrpc.request.id`. + """ + @spec rpc_jsonrpc_request_id :: :"rpc.jsonrpc.request_id" + def rpc_jsonrpc_request_id do + :"rpc.jsonrpc.request_id" + end - ``` - ["10", "request-7", ""] - ``` + @deprecated """ + Replaced by `jsonrpc.protocol.version`. + """ + @spec rpc_jsonrpc_version :: :"rpc.jsonrpc.version" + def rpc_jsonrpc_version do + :"rpc.jsonrpc.version" + end - + @deprecated """ + Deprecated, no replacement at this time. + """ + @spec rpc_message_compressed_size :: :"rpc.message.compressed_size" + def rpc_message_compressed_size do + :"rpc.message.compressed_size" + end - ### Elixir + @deprecated """ + Deprecated, no replacement at this time. + """ + @spec rpc_message_id :: :"rpc.message.id" + def rpc_message_id do + :"rpc.message.id" + end - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_request_id() - :"rpc.jsonrpc.request_id" + @typedoc """ + Whether this is a received or sent message. - ### Erlang + ### Enum Values + * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type rpc_message_type_values() :: %{ + :sent => :SENT, + :received => :RECEIVED + } + @deprecated """ + Deprecated, no replacement at this time. + """ + @spec rpc_message_type :: :"rpc.message.type" + def rpc_message_type do + :"rpc.message.type" + end - ```erlang - ?RPC_JSONRPC_REQUEST_ID. - 'rpc.jsonrpc.request_id' - ``` + @spec rpc_message_type_values() :: rpc_message_type_values() + def rpc_message_type_values() do + %{ + :sent => :SENT, + :received => :RECEIVED + } + end - + @deprecated """ + Deprecated, no replacement at this time. """ - @spec rpc_jsonrpc_request_id :: :"rpc.jsonrpc.request_id" - def rpc_jsonrpc_request_id do - :"rpc.jsonrpc.request_id" + @spec rpc_message_uncompressed_size :: :"rpc.message.uncompressed_size" + def rpc_message_uncompressed_size do + :"rpc.message.uncompressed_size" end @doc """ - Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. + The fully-qualified logical name of the method from the RPC interface perspective. ### Value type Value must be of type `atom() | String.t()`. - ### Examples - - ``` - ["2.0", "1.0"] - ``` - - + ### Notes - ### Elixir + The method name **MAY** have unbounded cardinality in edge or error cases. - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_jsonrpc_version() - :"rpc.jsonrpc.version" + Some RPC frameworks or libraries provide a fixed set of recognized methods + for client stubs and server implementations. Instrumentations for such + frameworks **MUST** set this attribute to the original method name only + when the method is recognized by the framework or library. - ### Erlang + When the method is not recognized, for example, when the server receives + a request for a method that is not predefined on the server, or when + instrumentation is not able to reliably detect if the method is predefined, + the attribute **MUST** be set to `_OTHER`. In such cases, tracing + instrumentations **MUST** also set `rpc.method_original` attribute to + the original method value. - ```erlang - ?RPC_JSONRPC_VERSION. - 'rpc.jsonrpc.version' - ``` + If the RPC instrumentation could end up converting valid RPC methods to + `_OTHER`, then it **SHOULD** provide a way to configure the list of recognized + RPC methods. - - """ - @spec rpc_jsonrpc_version :: :"rpc.jsonrpc.version" - def rpc_jsonrpc_version do - :"rpc.jsonrpc.version" - end + The `rpc.method` can be different from the name of any implementing + method/function. + The `code.function.name` attribute may be used to record the fully-qualified + method actually executing the call on the server side, or the + RPC client stub method on the client side. - @doc """ - Compressed size of the message in bytes. - ### Value type + ### Examples - Value must be of type `integer()`. + ``` + ["com.example.ExampleService/exampleMethod", "EchoService/Echo", "_OTHER"] + ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_compressed_size() - :"rpc.message.compressed_size" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_method() + :"rpc.method" ### Erlang ```erlang - ?RPC_MESSAGE_COMPRESSED_SIZE. - 'rpc.message.compressed_size' + ?RPC_METHOD. + 'rpc.method' ``` """ - @spec rpc_message_compressed_size :: :"rpc.message.compressed_size" - def rpc_message_compressed_size do - :"rpc.message.compressed_size" + @spec rpc_method :: :"rpc.method" + def rpc_method do + :"rpc.method" end @doc """ - MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. + The original name of the method used by the client. + ### Value type - Value must be of type `integer()`. - ### Notes + Value must be of type `atom() | String.t()`. + ### Examples - This way we guarantee that the values will be consistent between different implementations. + ``` + ["com.myservice.EchoService/catchAll", "com.myservice.EchoService/unknownMethod", "InvalidMethod"] + ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_id() - :"rpc.message.id" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_method_original() + :"rpc.method_original" ### Erlang ```erlang - ?RPC_MESSAGE_ID. - 'rpc.message.id' + ?RPC_METHOD_ORIGINAL. + 'rpc.method_original' ``` """ - @spec rpc_message_id :: :"rpc.message.id" - def rpc_message_id do - :"rpc.message.id" + @spec rpc_method_original :: :"rpc.method_original" + def rpc_method_original do + :"rpc.method_original" end - @typedoc """ - Whether this is a received or sent message. - - ### Enum Values - * `:sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:received` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ - @type rpc_message_type_values() :: %{ - :sent => :SENT, - :received => :RECEIVED - } @doc """ - Whether this is a received or sent message. - + RPC request metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type() - :"rpc.message.type" - - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent - :SENT + ### Value type - iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_type_values().sent} - %{:"rpc.message.type" => :SENT} + Value must be of type `[atom() | String.t()]`. + ### Notes - ### Erlang + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. + Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - ```erlang - ?RPC_MESSAGE_TYPE. - 'rpc.message.type' + For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` **SHOULD** be recorded as + `rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` - ?RPC_MESSAGE_TYPE_VALUES_SENT. - 'SENT' + ### Examples - \#{?RPC_MESSAGE_TYPE => ?RPC_MESSAGE_TYPE_VALUES_SENT}. - \#{'rpc.message.type' => 'SENT'} ``` - - - """ - @spec rpc_message_type :: :"rpc.message.type" - def rpc_message_type do - :"rpc.message.type" - end - - @spec rpc_message_type_values() :: rpc_message_type_values() - def rpc_message_type_values() do - %{ - :sent => :SENT, - :received => :RECEIVED - } - end - - @doc """ - Uncompressed size of the message in bytes. - ### Value type - - Value must be of type `integer()`. + [["1.2.3.4", "1.2.3.5"]] + ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_message_uncompressed_size() - :"rpc.message.uncompressed_size" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_request_metadata() + :"rpc.request.metadata" ### Erlang ```erlang - ?RPC_MESSAGE_UNCOMPRESSED_SIZE. - 'rpc.message.uncompressed_size' + ?RPC_REQUEST_METADATA. + 'rpc.request.metadata' ``` """ - @spec rpc_message_uncompressed_size :: :"rpc.message.uncompressed_size" - def rpc_message_uncompressed_size do - :"rpc.message.uncompressed_size" + @spec rpc_request_metadata :: :"rpc.request.metadata" + def rpc_request_metadata do + :"rpc.request.metadata" end @doc """ - The name of the (logical) method being called, must be equal to the $method part in the span name. + RPC response metadata, `` being the normalized RPC metadata key (lowercase), the value being the metadata values. + ### Value type - Value must be of type `atom() | String.t()`. + Value must be of type `[atom() | String.t()]`. ### 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). + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. + Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + For example, a property `my-custom-key` with value `["attribute_value"]` **SHOULD** be recorded as + the `rpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` ### Examples ``` - exampleMethod + [["attribute_value"]] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_method() - :"rpc.method" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_response_metadata() + :"rpc.response.metadata" ### Erlang ```erlang - ?RPC_METHOD. - 'rpc.method' + ?RPC_RESPONSE_METADATA. + 'rpc.response.metadata' ``` """ - @spec rpc_method :: :"rpc.method" - def rpc_method do - :"rpc.method" + @spec rpc_response_metadata :: :"rpc.response.metadata" + def rpc_response_metadata do + :"rpc.response.metadata" end @doc """ - The full (logical) name of the service being called, including its package name, if applicable. + Status code of the RPC returned by the RPC server or generated by the client ### Value type Value must be of type `atom() | String.t()`. ### 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). + Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes. + Semantic conventions for individual RPC frameworks **SHOULD** document what `rpc.response.status_code` means in the context of that system and which values are considered to represent errors. ### Examples ``` - myservice.EchoService + ["OK", "DEADLINE_EXCEEDED", "-32602"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_service() - :"rpc.service" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_response_status_code() + :"rpc.response.status_code" ### Erlang ```erlang - ?RPC_SERVICE. - 'rpc.service' + ?RPC_RESPONSE_STATUS_CODE. + 'rpc.response.status_code' ``` """ + @spec rpc_response_status_code :: :"rpc.response.status_code" + def rpc_response_status_code do + :"rpc.response.status_code" + end + + @deprecated """ + Value should be included in `rpc.method` which is expected to be a fully-qualified name. + """ @spec rpc_service :: :"rpc.service" def rpc_service do :"rpc.service" end @typedoc """ - A string identifying the remoting system. See below for a list of well-known identifiers. + Deprecated, use `rpc.system.name` attribute instead. ### Enum Values * `:grpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - gRPC @@ -752,59 +538,102 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do * `:dotnet_wcf` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - .NET WCF * `:apache_dubbo` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Dubbo * `:connect_rpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Connect RPC + * `:onc_rpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [ONC RPC (Sun RPC)](https://datatracker.ietf.org/doc/html/rfc5531) + * `:jsonrpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - JSON-RPC """ @type rpc_system_values() :: %{ :grpc => :grpc, :java_rmi => :java_rmi, :dotnet_wcf => :dotnet_wcf, :apache_dubbo => :apache_dubbo, - :connect_rpc => :connect_rpc + :connect_rpc => :connect_rpc, + :onc_rpc => :onc_rpc, + :jsonrpc => :jsonrpc + } + @deprecated """ + Replaced by `rpc.system.name`. + """ + @spec rpc_system :: :"rpc.system" + def rpc_system do + :"rpc.system" + end + + @spec rpc_system_values() :: rpc_system_values() + def rpc_system_values() do + %{ + :grpc => :grpc, + :java_rmi => :java_rmi, + :dotnet_wcf => :dotnet_wcf, + :apache_dubbo => :apache_dubbo, + :connect_rpc => :connect_rpc, + :onc_rpc => :onc_rpc, + :jsonrpc => :jsonrpc + } + end + + @typedoc """ + The Remote Procedure Call (RPC) system. + + ### Enum Values + * `:grpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [gRPC](https://grpc.io/) + * `:dubbo` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Apache Dubbo](https://dubbo.apache.org/) + * `:connectrpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Connect RPC](https://connectrpc.com/) + * `:jsonrpc` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [JSON-RPC](https://www.jsonrpc.org/) + """ + @type rpc_system_name_values() :: %{ + :grpc => :grpc, + :dubbo => :dubbo, + :connectrpc => :connectrpc, + :jsonrpc => :jsonrpc } @doc """ - A string identifying the remoting system. See below for a list of well-known identifiers. + The Remote Procedure Call (RPC) system. + + ### Notes + + The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC. ### Elixir - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system() - :"rpc.system" + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_name() + :"rpc.system.name" - iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc + iex> OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_name_values().grpc :grpc - iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_values().grpc} - %{:"rpc.system" => :grpc} + iex> %{OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_name() => OpenTelemetry.SemConv.Incubating.RPCAttributes.rpc_system_name_values().grpc} + %{:"rpc.system.name" => :grpc} ### Erlang ```erlang - ?RPC_SYSTEM. - 'rpc.system' + ?RPC_SYSTEM_NAME. + 'rpc.system.name' - ?RPC_SYSTEM_VALUES_GRPC. + ?RPC_SYSTEM_NAME_VALUES_GRPC. 'grpc' - \#{?RPC_SYSTEM => ?RPC_SYSTEM_VALUES_GRPC}. - \#{'rpc.system' => 'grpc'} + \#{?RPC_SYSTEM_NAME => ?RPC_SYSTEM_NAME_VALUES_GRPC}. + \#{'rpc.system.name' => 'grpc'} ``` """ - @spec rpc_system :: :"rpc.system" - def rpc_system do - :"rpc.system" + @spec rpc_system_name :: :"rpc.system.name" + def rpc_system_name do + :"rpc.system.name" end - @spec rpc_system_values() :: rpc_system_values() - def rpc_system_values() do + @spec rpc_system_name_values() :: rpc_system_name_values() + def rpc_system_name_values() do %{ :grpc => :grpc, - :java_rmi => :java_rmi, - :dotnet_wcf => :dotnet_wcf, - :apache_dubbo => :apache_dubbo, - :connect_rpc => :connect_rpc + :dubbo => :dubbo, + :connectrpc => :connectrpc, + :jsonrpc => :jsonrpc } end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/security_rule_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/security_rule_attributes.ex new file mode 100644 index 000000000..4796ce0a3 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/security_rule_attributes.ex @@ -0,0 +1,274 @@ +defmodule OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Security_Rule attributes. + """ + + @doc """ + A categorization value keyword used by the entity using the rule for detection of this event + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Attempted Information Leak"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_category() + :"security_rule.category" + + ### Erlang + + ```erlang + ?SECURITY_RULE_CATEGORY. + 'security_rule.category' + ``` + + + """ + @spec security_rule_category :: :"security_rule.category" + def security_rule_category do + :"security_rule.category" + end + + @doc """ + The description of the rule generating the event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Block requests to public DNS over HTTPS / TLS protocols"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_description() + :"security_rule.description" + + ### Erlang + + ```erlang + ?SECURITY_RULE_DESCRIPTION. + 'security_rule.description' + ``` + + + """ + @spec security_rule_description :: :"security_rule.description" + def security_rule_description do + :"security_rule.description" + end + + @doc """ + Name of the license under which the rule used to generate this event is made available. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Apache 2.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_license() + :"security_rule.license" + + ### Erlang + + ```erlang + ?SECURITY_RULE_LICENSE. + 'security_rule.license' + ``` + + + """ + @spec security_rule_license :: :"security_rule.license" + def security_rule_license do + :"security_rule.license" + end + + @doc """ + The name of the rule or signature generating the event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["BLOCK_DNS_over_TLS"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_name() + :"security_rule.name" + + ### Erlang + + ```erlang + ?SECURITY_RULE_NAME. + 'security_rule.name' + ``` + + + """ + @spec security_rule_name :: :"security_rule.name" + def security_rule_name do + :"security_rule.name" + end + + @doc """ + Reference URL to additional information about the rule used to generate this event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The URL can point to the vendor’s documentation about the rule. If that’s not available, it can also be a link to a more general page describing this type of alert. + + ### Examples + + ``` + ["https://en.wikipedia.org/wiki/DNS_over_TLS"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_reference() + :"security_rule.reference" + + ### Erlang + + ```erlang + ?SECURITY_RULE_REFERENCE. + 'security_rule.reference' + ``` + + + """ + @spec security_rule_reference :: :"security_rule.reference" + def security_rule_reference do + :"security_rule.reference" + end + + @doc """ + Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["Standard_Protocol_Filters"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_ruleset_name() + :"security_rule.ruleset.name" + + ### Erlang + + ```erlang + ?SECURITY_RULE_RULESET_NAME. + 'security_rule.ruleset.name' + ``` + + + """ + @spec security_rule_ruleset_name :: :"security_rule.ruleset.name" + def security_rule_ruleset_name do + :"security_rule.ruleset.name" + end + + @doc """ + A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["550e8400-e29b-41d4-a716-446655440000", "1100110011"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_uuid() + :"security_rule.uuid" + + ### Erlang + + ```erlang + ?SECURITY_RULE_UUID. + 'security_rule.uuid' + ``` + + + """ + @spec security_rule_uuid :: :"security_rule.uuid" + def security_rule_uuid do + :"security_rule.uuid" + end + + @doc """ + The version / revision of the rule being used for analysis. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["1.0.0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SecurityRuleAttributes.security_rule_version() + :"security_rule.version" + + ### Erlang + + ```erlang + ?SECURITY_RULE_VERSION. + 'security_rule.version' + ``` + + + """ + @spec security_rule_version :: :"security_rule.version" + def security_rule_version do + :"security_rule.version" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex index 9654e3191..8c8663aaa 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex @@ -3,82 +3,130 @@ defmodule OpenTelemetry.SemConv.Incubating.ServiceAttributes do @moduledoc """ OpenTelemetry Semantic Conventions for Service attributes. """ + defdelegate service_instance_id(), to: OpenTelemetry.SemConv.ServiceAttributes + defdelegate service_name(), to: OpenTelemetry.SemConv.ServiceAttributes + defdelegate service_namespace(), to: OpenTelemetry.SemConv.ServiceAttributes + defdelegate service_version(), to: OpenTelemetry.SemConv.ServiceAttributes + @typedoc """ + The operational criticality of the service. + + + ### Enum Values + * `:critical` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Service is business-critical; downtime directly impacts revenue, user experience, or core functionality. + + * `:high` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Service is important but has degradation tolerance or fallback mechanisms. + + * `:medium` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Service provides supplementary functionality; degradation has limited user impact. + + * `:low` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Service is non-essential to core operations; used for background tasks or internal tools. + + """ + @type service_criticality_values() :: %{ + :critical => :critical, + :high => :high, + :medium => :medium, + :low => :low + } @doc """ - The string ID of the service instance. + The operational criticality of the service. - ### Value type - Value must be of type `atom() | String.t()`. ### 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). - - Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC - 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of - this value if stability is desirable. In that case, the ID **SHOULD** be used as source of a UUID Version 5 and - **SHOULD** use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. - - UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is - needed. Similar to what can be seen in the man page for the - [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) file, the underlying - data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it - or not via another resource attribute. - - For applications running behind an application server (like unicorn), we do not recommend using one identifier - for all processes participating in the application. Instead, it's recommended each division (e.g. a worker - thread in unicorn) to have its own instance.id. - - It's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the - service instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will - likely be wrong, as the Collector might not know from which container within that pod the telemetry originated. - However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance - for that telemetry. This is typically the case for scraping receivers, as they know the target address and - port. + Application developers are encouraged to set `service.criticality` to express the operational importance of their services. Telemetry consumers **MAY** use this attribute to optimize telemetry collection or improve user experience. ### Examples ``` - ["627cc493-f310-47de-96bd-71410b7dec09"] + ["critical", "high", "medium", "low"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_instance_id() - :"service.instance.id" + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_criticality() + :"service.criticality" + + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_criticality_values().critical + :critical + + iex> %{OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_criticality() => OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_criticality_values().critical} + %{:"service.criticality" => :critical} ### Erlang ```erlang - ?SERVICE_INSTANCE_ID. - 'service.instance.id' + ?SERVICE_CRITICALITY. + 'service.criticality' + + ?SERVICE_CRITICALITY_VALUES_CRITICAL. + 'critical' + + \#{?SERVICE_CRITICALITY => ?SERVICE_CRITICALITY_VALUES_CRITICAL}. + \#{'service.criticality' => 'critical'} ``` """ - @spec service_instance_id :: :"service.instance.id" - def service_instance_id do - :"service.instance.id" + @spec service_criticality :: :"service.criticality" + def service_criticality do + :"service.criticality" + end + + @spec service_criticality_values() :: service_criticality_values() + def service_criticality_values() do + %{ + :critical => :critical, + :high => :high, + :medium => :medium, + :low => :low + } end @doc """ - A namespace for `service.name`. + Logical name of the service on the other side of the connection. **SHOULD** be equal to the actual [`service.name`](/docs/resource/README.md#service) resource attribute of the remote service if any. ### Value type Value must be of type `atom() | String.t()`. - ### Notes + ### Examples + + ``` + ["shoppingcart"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_peer_name() + :"service.peer.name" + + ### Erlang + + ```erlang + ?SERVICE_PEER_NAME. + 'service.peer.name' + ``` + + + """ + @spec service_peer_name :: :"service.peer.name" + def service_peer_name do + :"service.peer.name" + end - 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. + @doc """ + Logical namespace of the service on the other side of the connection. **SHOULD** be equal to the actual [`service.namespace`](/docs/resource/README.md#service) resource attribute of the remote service if any. + ### Value type + + Value must be of type `atom() | String.t()`. ### Examples ``` @@ -89,20 +137,20 @@ defmodule OpenTelemetry.SemConv.Incubating.ServiceAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_namespace() - :"service.namespace" + iex> OpenTelemetry.SemConv.Incubating.ServiceAttributes.service_peer_namespace() + :"service.peer.namespace" ### Erlang ```erlang - ?SERVICE_NAMESPACE. - 'service.namespace' + ?SERVICE_PEER_NAMESPACE. + 'service.peer.namespace' ``` """ - @spec service_namespace :: :"service.namespace" - def service_namespace do - :"service.namespace" + @spec service_peer_namespace :: :"service.peer.namespace" + def service_peer_namespace do + :"service.peer.namespace" end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex index 07fcfbdb1..9fb8ffb15 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex @@ -4,32 +4,8 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do OpenTelemetry Semantic Conventions for System attributes. """ - @doc """ - The logical CPU number [0..n-1] - ### Value type - - Value must be of type `integer()`. - ### Examples - - ``` - [1] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_cpu_logical_number() - :"system.cpu.logical_number" - - ### Erlang - - ```erlang - ?SYSTEM_CPU_LOGICAL_NUMBER. - 'system.cpu.logical_number' - ``` - - + @deprecated """ + Replaced by `cpu.logical_number`. """ @spec system_cpu_logical_number :: :"system.cpu.logical_number" def system_cpu_logical_number do @@ -40,13 +16,13 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do Deprecated, use `cpu.mode` instead. ### Enum Values - * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:user` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:system` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:nice` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:iowait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:interrupt` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:steal` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_cpu_state_values() :: %{ :user => :user, @@ -58,7 +34,7 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do :steal => :steal } @deprecated """ - Replaced by `cpu.mode` + Replaced by `cpu.mode`. """ @spec system_cpu_state :: :"system.cpu.state" def system_cpu_state do @@ -178,9 +154,9 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do The filesystem state ### Enum Values - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:reserved` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:reserved` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_filesystem_state_values() :: %{ :used => :used, @@ -242,12 +218,12 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do The filesystem type ### Enum Values - * `:fat32` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:exfat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:ntfs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:refs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:hfsplus` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:ext4` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:fat32` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:exfat` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:ntfs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:refs` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:hfsplus` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:ext4` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_filesystem_type_values() :: %{ :fat32 => :fat32, @@ -311,15 +287,76 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do } end + @typedoc """ + The Linux Slab memory state + + ### Enum Values + * `:reclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:unreclaimable` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type system_memory_linux_slab_state_values() :: %{ + :reclaimable => :reclaimable, + :unreclaimable => :unreclaimable + } + @doc """ + The Linux Slab memory state + + ### Examples + + ``` + ["reclaimable", "unreclaimable"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_linux_slab_state() + :"system.memory.linux.slab.state" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_linux_slab_state_values().reclaimable + :reclaimable + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_linux_slab_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_memory_linux_slab_state_values().reclaimable} + %{:"system.memory.linux.slab.state" => :reclaimable} + + ### Erlang + + ```erlang + ?SYSTEM_MEMORY_LINUX_SLAB_STATE. + 'system.memory.linux.slab.state' + + ?SYSTEM_MEMORY_LINUX_SLAB_STATE_VALUES_RECLAIMABLE. + 'reclaimable' + + \#{?SYSTEM_MEMORY_LINUX_SLAB_STATE => ?SYSTEM_MEMORY_LINUX_SLAB_STATE_VALUES_RECLAIMABLE}. + \#{'system.memory.linux.slab.state' => 'reclaimable'} + ``` + + + """ + @spec system_memory_linux_slab_state :: :"system.memory.linux.slab.state" + def system_memory_linux_slab_state do + :"system.memory.linux.slab.state" + end + + @spec system_memory_linux_slab_state_values() :: system_memory_linux_slab_state_values() + def system_memory_linux_slab_state_values() do + %{ + :reclaimable => :reclaimable, + :unreclaimable => :unreclaimable + } + end + @typedoc """ The memory state ### Enum Values - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:shared` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:buffers` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:cached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Actual used virtual memory in bytes. + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:shared` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~~~ + * `:buffers` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:cached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_memory_state_values() :: %{ :used => :used, @@ -382,21 +419,21 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do end @typedoc """ - A stateless protocol **MUST** **NOT** set this attribute + Deprecated, use `network.connection.state` instead. ### Enum Values - * `:close` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:close_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:closing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:established` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:fin_wait_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:fin_wait_2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:last_ack` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:listen` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:syn_recv` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:syn_sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:time_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:close` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:close_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:closing` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:delete` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:established` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:fin_wait_1` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:fin_wait_2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:last_ack` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:listen` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:syn_recv` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:syn_sent` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:time_wait` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_network_state_values() :: %{ :close => :close, @@ -412,42 +449,8 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do :syn_sent => :syn_sent, :time_wait => :time_wait } - @doc """ - A stateless protocol **MUST** **NOT** set this attribute - - ### Examples - - ``` - ["close_wait"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state() - :"system.network.state" - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state_values().close - :close - - iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_network_state_values().close} - %{:"system.network.state" => :close} - - ### Erlang - - ```erlang - ?SYSTEM_NETWORK_STATE. - 'system.network.state' - - ?SYSTEM_NETWORK_STATE_VALUES_CLOSE. - 'close' - - \#{?SYSTEM_NETWORK_STATE => ?SYSTEM_NETWORK_STATE_VALUES_CLOSE}. - \#{'system.network.state' => 'close'} - ``` - - + @deprecated """ + Replaced by `network.connection.state`. """ @spec system_network_state :: :"system.network.state" def system_network_state do @@ -476,8 +479,8 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do The paging access direction ### Enum Values - * `:in` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:out` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:in` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:out` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_paging_direction_values() :: %{ :in => :in, @@ -533,12 +536,73 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do } end + @typedoc """ + The paging fault type + + ### Enum Values + * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + """ + @type system_paging_fault_type_values() :: %{ + :major => :major, + :minor => :minor + } + @doc """ + The paging fault type + + ### Examples + + ``` + ["minor"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_fault_type() + :"system.paging.fault.type" + + iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_fault_type_values().major + :major + + iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_fault_type() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_fault_type_values().major} + %{:"system.paging.fault.type" => :major} + + ### Erlang + + ```erlang + ?SYSTEM_PAGING_FAULT_TYPE. + 'system.paging.fault.type' + + ?SYSTEM_PAGING_FAULT_TYPE_VALUES_MAJOR. + 'major' + + \#{?SYSTEM_PAGING_FAULT_TYPE => ?SYSTEM_PAGING_FAULT_TYPE_VALUES_MAJOR}. + \#{'system.paging.fault.type' => 'major'} + ``` + + + """ + @spec system_paging_fault_type :: :"system.paging.fault.type" + def system_paging_fault_type do + :"system.paging.fault.type" + end + + @spec system_paging_fault_type_values() :: system_paging_fault_type_values() + def system_paging_fault_type_values() do + %{ + :major => :major, + :minor => :minor + } + end + @typedoc """ The memory paging state ### Enum Values - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:free` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_paging_state_values() :: %{ :used => :used, @@ -595,52 +659,18 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do end @typedoc """ - The memory paging type + Deprecated, use `system.paging.fault.type` instead. ### Enum Values - * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:major` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:minor` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_paging_type_values() :: %{ :major => :major, :minor => :minor } - @doc """ - The memory paging type - - ### Examples - - ``` - ["minor"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type() - :"system.paging.type" - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type_values().major - :major - - iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_paging_type_values().major} - %{:"system.paging.type" => :major} - - ### Erlang - - ```erlang - ?SYSTEM_PAGING_TYPE. - 'system.paging.type' - - ?SYSTEM_PAGING_TYPE_VALUES_MAJOR. - 'major' - - \#{?SYSTEM_PAGING_TYPE => ?SYSTEM_PAGING_TYPE_VALUES_MAJOR}. - \#{'system.paging.type' => 'major'} - ``` - - + @deprecated """ + Replaced by `system.paging.fault.type`. """ @spec system_paging_type :: :"system.paging.type" def system_paging_type do @@ -656,14 +686,13 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do end @typedoc """ - The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) - + Deprecated, use `process.state` instead. ### Enum Values - * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_process_status_values() :: %{ :running => :running, @@ -671,43 +700,8 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do :stopped => :stopped, :defunct => :defunct } - @doc """ - The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) - - - ### Examples - - ``` - ["running"] - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status() - :"system.process.status" - - iex> OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status_values().running - :running - - iex> %{OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status() => OpenTelemetry.SemConv.Incubating.SystemAttributes.system_process_status_values().running} - %{:"system.process.status" => :running} - - ### Erlang - - ```erlang - ?SYSTEM_PROCESS_STATUS. - 'system.process.status' - - ?SYSTEM_PROCESS_STATUS_VALUES_RUNNING. - 'running' - - \#{?SYSTEM_PROCESS_STATUS => ?SYSTEM_PROCESS_STATUS_VALUES_RUNNING}. - \#{'system.process.status' => 'running'} - ``` - - + @deprecated """ + Replaced by `process.state`. """ @spec system_process_status :: :"system.process.status" def system_process_status do @@ -725,13 +719,13 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do end @typedoc """ - Deprecated, use `system.process.status` instead. + Deprecated, use `process.state` instead. ### Enum Values - * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:running` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:sleeping` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:stopped` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:defunct` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type system_processes_status_values() :: %{ :running => :running, @@ -740,7 +734,7 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do :defunct => :defunct } @deprecated """ - Replaced by `system.process.status`. + Replaced by `process.state`. """ @spec system_processes_status :: :"system.processes.status" def system_processes_status do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex index 4360c5067..d73154404 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/test_attributes.ex @@ -5,7 +5,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TestAttributes do """ @doc """ - The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). + The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case). ### Value type @@ -101,7 +101,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TestAttributes do end @doc """ - The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). + The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite). ### Value type diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex index 4d236c824..8a87bc74e 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/thread_attributes.ex @@ -10,6 +10,20 @@ defmodule OpenTelemetry.SemConv.Incubating.ThreadAttributes do ### Value type Value must be of type `integer()`. + ### Notes + + + Examples of where the value can be extracted from: + + | Language or platform | Source | + | --- | --- | + | JVM | `Thread.currentThread().threadId()` | + | .NET | `Thread.CurrentThread.ManagedThreadId` | + | Python | `threading.current_thread().ident` | + | Ruby | `Thread.current.object_id` | + | C++ | `std::this_thread::get_id()` | + | Erlang | `erlang:self()` | + ### Examples ``` @@ -43,6 +57,19 @@ defmodule OpenTelemetry.SemConv.Incubating.ThreadAttributes do ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + + Examples of where the value can be extracted from: + + | Language or platform | Source | + | --- | --- | + | JVM | `Thread.currentThread().getName()` | + | .NET | `Thread.CurrentThread.Name` | + | Python | `threading.current_thread().name` | + | Ruby | `Thread.current.name` | + | Erlang | `erlang:process_info(self(), registered_name)` | + ### Examples ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex index 2f171b6c0..1e3c47e16 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex @@ -83,7 +83,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do ### Examples ``` - ["MII...", "MI..."] + [["MII...", "MI..."]] ``` @@ -335,7 +335,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do end @deprecated """ - Replaced by `server.address. + Replaced by `server.address`. """ @spec tls_client_server_name :: :"tls.client.server_name" def tls_client_server_name do @@ -382,7 +382,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do ### Examples ``` - ["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."] + [["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"]] ``` @@ -504,19 +504,19 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do end @typedoc """ - Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) ### Enum Values - * `:ssl` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:tls` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:ssl` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - + * `:tls` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ @type tls_protocol_name_values() :: %{ :ssl => :ssl, :tls => :tls } @doc """ - Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) @@ -562,7 +562,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do end @doc """ - Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values) ### Value type @@ -668,7 +668,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do ### Examples ``` - ["MII...", "MI..."] + [["MII...", "MI..."]] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex index 82665c4ad..b125af100 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/url_attributes.ex @@ -166,7 +166,7 @@ defmodule OpenTelemetry.SemConv.Incubating.URLAttributes do Value must be of type `atom() | String.t()`. ### Notes - This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. + This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. ### Examples @@ -273,7 +273,7 @@ defmodule OpenTelemetry.SemConv.Incubating.URLAttributes do Value must be of type `atom() | String.t()`. ### Notes - This value can be determined precisely with the [public suffix list](http://publicsuffix.org). + This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex index b9d8c84cb..b306ef5ca 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_agent_attributes.ex @@ -13,7 +13,7 @@ defmodule OpenTelemetry.SemConv.Incubating.UserAgentAttributes do Value must be of type `atom() | String.t()`. ### Notes - [Example](https://www.whatsmyua.info) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name **SHOULD** be selected. In such a scenario it should align with `user_agent.version` + [Example](https://uaparser.dev/#demo) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name **SHOULD** be selected. In such a scenario it should align with `user_agent.version` ### Examples @@ -42,6 +42,141 @@ defmodule OpenTelemetry.SemConv.Incubating.UserAgentAttributes do :"user_agent.name" end + @doc """ + Human readable operating system name. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + For mapping user agent strings to OS names, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized. + + ### Examples + + ``` + ["iOS", "Android", "Ubuntu"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_os_name() + :"user_agent.os.name" + + ### Erlang + + ```erlang + ?USER_AGENT_OS_NAME. + 'user_agent.os.name' + ``` + + + """ + @spec user_agent_os_name :: :"user_agent.os.name" + def user_agent_os_name do + :"user_agent.os.name" + end + + @doc """ + The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + For mapping user agent strings to OS versions, libraries such as [ua-parser](https://github.com/ua-parser) can be utilized. + + ### Examples + + ``` + ["14.2.1", "18.04.1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_os_version() + :"user_agent.os.version" + + ### Erlang + + ```erlang + ?USER_AGENT_OS_VERSION. + 'user_agent.os.version' + ``` + + + """ + @spec user_agent_os_version :: :"user_agent.os.version" + def user_agent_os_version do + :"user_agent.os.version" + end + + @typedoc """ + Specifies the category of synthetic traffic, such as tests or bots. + + + ### Enum Values + * `:bot` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Bot source. + * `:test` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Synthetic test source. + """ + @type user_agent_synthetic_type_values() :: %{ + :bot => :bot, + :test => :test + } + @doc """ + Specifies the category of synthetic traffic, such as tests or bots. + + + ### Notes + + This attribute **MAY** be derived from the contents of the `user_agent.original` attribute. Components that populate the attribute are responsible for determining what they consider to be synthetic bot or test traffic. This attribute can either be set for self-identification purposes, or on telemetry detected to be generated as a result of a synthetic request. This attribute is useful for distinguishing between genuine client traffic and synthetic traffic generated by bots or tests. + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_synthetic_type() + :"user_agent.synthetic.type" + + iex> OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_synthetic_type_values().bot + :bot + + iex> %{OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_synthetic_type() => OpenTelemetry.SemConv.Incubating.UserAgentAttributes.user_agent_synthetic_type_values().bot} + %{:"user_agent.synthetic.type" => :bot} + + ### Erlang + + ```erlang + ?USER_AGENT_SYNTHETIC_TYPE. + 'user_agent.synthetic.type' + + ?USER_AGENT_SYNTHETIC_TYPE_VALUES_BOT. + 'bot' + + \#{?USER_AGENT_SYNTHETIC_TYPE => ?USER_AGENT_SYNTHETIC_TYPE_VALUES_BOT}. + \#{'user_agent.synthetic.type' => 'bot'} + ``` + + + """ + @spec user_agent_synthetic_type :: :"user_agent.synthetic.type" + def user_agent_synthetic_type do + :"user_agent.synthetic.type" + end + + @spec user_agent_synthetic_type_values() :: user_agent_synthetic_type_values() + def user_agent_synthetic_type_values() do + %{ + :bot => :bot, + :test => :test + } + end + @doc """ Version of the user-agent extracted from original. Usually refers to the browser's version @@ -50,7 +185,7 @@ defmodule OpenTelemetry.SemConv.Incubating.UserAgentAttributes do Value must be of type `atom() | String.t()`. ### Notes - [Example](https://www.whatsmyua.info) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version **SHOULD** be selected. In such a scenario it should align with `user_agent.name` + [Example](https://uaparser.dev/#demo) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version **SHOULD** be selected. In such a scenario it should align with `user_agent.name` ### Examples diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex index 94b0ad1ad..41485f295 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/user_attributes.ex @@ -182,7 +182,7 @@ defmodule OpenTelemetry.SemConv.Incubating.UserAttributes do ### Examples ``` - ["admin", "reporting_user"] + [["admin", "reporting_user"]] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex index a339fa715..04e2f5b30 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex @@ -5,7 +5,7 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do """ @doc """ - The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. + The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. ### Value type @@ -20,25 +20,94 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_change_id() - :"vcs.repository.change.id" + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_id() + :"vcs.change.id" ### Erlang ```erlang - ?VCS_REPOSITORY_CHANGE_ID. - 'vcs.repository.change.id' + ?VCS_CHANGE_ID. + 'vcs.change.id' ``` """ - @spec vcs_repository_change_id :: :"vcs.repository.change.id" - def vcs_repository_change_id do - :"vcs.repository.change.id" + @spec vcs_change_id :: :"vcs.change.id" + def vcs_change_id do + :"vcs.change.id" end + @typedoc """ + The state of the change (pull request/merge request/changelist). + + + ### Enum Values + * `:open` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Open means the change is currently active and under review. It hasn't been merged into the target branch yet, and it's still possible to make changes or add comments. + * `:wip` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - WIP (work-in-progress, draft) means the change is still in progress and not yet ready for a full review. It might still undergo significant changes. + * `:closed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Closed means the merge request has been closed without merging. This can happen for various reasons, such as the changes being deemed unnecessary, the issue being resolved in another way, or the author deciding to withdraw the request. + * `:merged` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Merged indicates that the change has been successfully integrated into the target codebase. + """ + @type vcs_change_state_values() :: %{ + :open => :open, + :wip => :wip, + :closed => :closed, + :merged => :merged + } @doc """ - The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. + The state of the change (pull request/merge request/changelist). + + + ### Examples + + ``` + ["open", "closed", "merged"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_state() + :"vcs.change.state" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_state_values().open + :open + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_state() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_state_values().open} + %{:"vcs.change.state" => :open} + + ### Erlang + + ```erlang + ?VCS_CHANGE_STATE. + 'vcs.change.state' + + ?VCS_CHANGE_STATE_VALUES_OPEN. + 'open' + + \#{?VCS_CHANGE_STATE => ?VCS_CHANGE_STATE_VALUES_OPEN}. + \#{'vcs.change.state' => 'open'} + ``` + + + """ + @spec vcs_change_state :: :"vcs.change.state" + def vcs_change_state do + :"vcs.change.state" + end + + @spec vcs_change_state_values() :: vcs_change_state_values() + def vcs_change_state_values() do + %{ + :open => :open, + :wip => :wip, + :closed => :closed, + :merged => :merged + } + end + + @doc """ + The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. ### Value type @@ -53,21 +122,189 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_change_title() - :"vcs.repository.change.title" + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_change_title() + :"vcs.change.title" ### Erlang ```erlang - ?VCS_REPOSITORY_CHANGE_TITLE. - 'vcs.repository.change.title' + ?VCS_CHANGE_TITLE. + 'vcs.change.title' ``` """ - @spec vcs_repository_change_title :: :"vcs.repository.change.title" - def vcs_repository_change_title do - :"vcs.repository.change.title" + @spec vcs_change_title :: :"vcs.change.title" + def vcs_change_title do + :"vcs.change.title" + end + + @typedoc """ + The type of line change being measured on a branch or change. + + + ### Enum Values + * `:added` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - How many lines were added. + * `:removed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - How many lines were removed. + """ + @type vcs_line_change_type_values() :: %{ + :added => :added, + :removed => :removed + } + @doc """ + The type of line change being measured on a branch or change. + + + ### Examples + + ``` + ["added", "removed"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_line_change_type() + :"vcs.line_change.type" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_line_change_type_values().added + :added + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_line_change_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_line_change_type_values().added} + %{:"vcs.line_change.type" => :added} + + ### Erlang + + ```erlang + ?VCS_LINE_CHANGE_TYPE. + 'vcs.line_change.type' + + ?VCS_LINE_CHANGE_TYPE_VALUES_ADDED. + 'added' + + \#{?VCS_LINE_CHANGE_TYPE => ?VCS_LINE_CHANGE_TYPE_VALUES_ADDED}. + \#{'vcs.line_change.type' => 'added'} + ``` + + + """ + @spec vcs_line_change_type :: :"vcs.line_change.type" + def vcs_line_change_type do + :"vcs.line_change.type" + end + + @spec vcs_line_change_type_values() :: vcs_line_change_type_values() + def vcs_line_change_type_values() do + %{ + :added => :added, + :removed => :removed + } + end + + @doc """ + The group owner within the version control system. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["my-org", "myteam", "business-unit"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_owner_name() + :"vcs.owner.name" + + ### Erlang + + ```erlang + ?VCS_OWNER_NAME. + 'vcs.owner.name' + ``` + + + """ + @spec vcs_owner_name :: :"vcs.owner.name" + def vcs_owner_name do + :"vcs.owner.name" + end + + @typedoc """ + The name of the version control system provider. + + + ### Enum Values + * `:github` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [GitHub](https://github.com) + * `:gitlab` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [GitLab](https://gitlab.com) + * `:gittea` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `gitea` instead.~~ + * `:gitea` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Gitea](https://gitea.io) + * `:bitbucket` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [Bitbucket](https://bitbucket.org) + """ + @type vcs_provider_name_values() :: %{ + :github => :github, + :gitlab => :gitlab, + :gittea => :gittea, + :gitea => :gitea, + :bitbucket => :bitbucket + } + @doc """ + The name of the version control system provider. + + + ### Examples + + ``` + ["github", "gitlab", "gitea", "bitbucket"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_provider_name() + :"vcs.provider.name" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_provider_name_values().github + :github + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_provider_name() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_provider_name_values().github} + %{:"vcs.provider.name" => :github} + + ### Erlang + + ```erlang + ?VCS_PROVIDER_NAME. + 'vcs.provider.name' + + ?VCS_PROVIDER_NAME_VALUES_GITHUB. + 'github' + + \#{?VCS_PROVIDER_NAME => ?VCS_PROVIDER_NAME_VALUES_GITHUB}. + \#{'vcs.provider.name' => 'github'} + ``` + + + """ + @spec vcs_provider_name :: :"vcs.provider.name" + def vcs_provider_name do + :"vcs.provider.name" + end + + @spec vcs_provider_name_values() :: vcs_provider_name_values() + def vcs_provider_name_values() do + %{ + :github => :github, + :gitlab => :gitlab, + :gittea => :gittea, + :gitea => :gitea, + :bitbucket => :bitbucket + } end @doc """ @@ -76,6 +313,12 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + `base` refers to the starting point of a change. For example, `main` + would be the base reference of type branch if you've created a new + reference of type branch from it and created new commits. + ### Examples ``` @@ -86,21 +329,21 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_name() - :"vcs.repository.ref.name" + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_name() + :"vcs.ref.base.name" ### Erlang ```erlang - ?VCS_REPOSITORY_REF_NAME. - 'vcs.repository.ref.name' + ?VCS_REF_BASE_NAME. + 'vcs.ref.base.name' ``` """ - @spec vcs_repository_ref_name :: :"vcs.repository.ref.name" - def vcs_repository_ref_name do - :"vcs.repository.ref.name" + @spec vcs_ref_base_name :: :"vcs.ref.base.name" + def vcs_ref_base_name do + :"vcs.ref.base.name" end @doc """ @@ -111,15 +354,19 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do Value must be of type `atom() | String.t()`. ### Notes - The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), + `base` refers to the starting point of a change. For example, `main` + would be the base reference of type branch if you've created a new + reference of type branch from it and created new commits. The + revision can be a full [hash value (see + glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the recorded change to a ref within a repository pointing to a commit [commit](https://git-scm.com/docs/git-commit) object. It does - not necessarily have to be a hash; it can simply define a - [revision number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) + not necessarily have to be a hash; it can simply define a [revision + number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) which is an integer that is monotonically increasing. In cases where - it is identical to the `ref.name`, it **SHOULD** still be included. It is - up to the implementer to decide which value to set as the revision - based on the VCS system and situational context. + it is identical to the `ref.base.name`, it **SHOULD** still be included. + It is up to the implementer to decide which value to set as the + revision based on the VCS system and situational context. ### Examples @@ -131,21 +378,21 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_revision() - :"vcs.repository.ref.revision" + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_revision() + :"vcs.ref.base.revision" ### Erlang ```erlang - ?VCS_REPOSITORY_REF_REVISION. - 'vcs.repository.ref.revision' + ?VCS_REF_BASE_REVISION. + 'vcs.ref.base.revision' ``` """ - @spec vcs_repository_ref_revision :: :"vcs.repository.ref.revision" - def vcs_repository_ref_revision do - :"vcs.repository.ref.revision" + @spec vcs_ref_base_revision :: :"vcs.ref.base.revision" + def vcs_ref_base_revision do + :"vcs.ref.base.revision" end @typedoc """ @@ -156,7 +403,7 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do * `:branch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) * `:tag` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) """ - @type vcs_repository_ref_type_values() :: %{ + @type vcs_ref_base_type_values() :: %{ :branch => :branch, :tag => :tag } @@ -164,6 +411,12 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + ### Notes + + `base` refers to the starting point of a change. For example, `main` + would be the base reference of type branch if you've created a new + reference of type branch from it and created new commits. + ### Examples ``` @@ -174,30 +427,345 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type() - :"vcs.repository.ref.type" + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_type() + :"vcs.ref.base.type" - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type_values().branch + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_type_values().branch :branch - iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_ref_type_values().branch} - %{:"vcs.repository.ref.type" => :branch} + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_base_type_values().branch} + %{:"vcs.ref.base.type" => :branch} ### Erlang ```erlang - ?VCS_REPOSITORY_REF_TYPE. - 'vcs.repository.ref.type' + ?VCS_REF_BASE_TYPE. + 'vcs.ref.base.type' - ?VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH. + ?VCS_REF_BASE_TYPE_VALUES_BRANCH. 'branch' - \#{?VCS_REPOSITORY_REF_TYPE => ?VCS_REPOSITORY_REF_TYPE_VALUES_BRANCH}. - \#{'vcs.repository.ref.type' => 'branch'} + \#{?VCS_REF_BASE_TYPE => ?VCS_REF_BASE_TYPE_VALUES_BRANCH}. + \#{'vcs.ref.base.type' => 'branch'} ``` """ + @spec vcs_ref_base_type :: :"vcs.ref.base.type" + def vcs_ref_base_type do + :"vcs.ref.base.type" + end + + @spec vcs_ref_base_type_values() :: vcs_ref_base_type_values() + def vcs_ref_base_type_values() do + %{ + :branch => :branch, + :tag => :tag + } + end + + @doc """ + The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + `head` refers to where you are right now; the current reference at a + given time. + + ### Examples + + ``` + ["my-feature-branch", "tag-1-test"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_name() + :"vcs.ref.head.name" + + ### Erlang + + ```erlang + ?VCS_REF_HEAD_NAME. + 'vcs.ref.head.name' + ``` + + + """ + @spec vcs_ref_head_name :: :"vcs.ref.head.name" + def vcs_ref_head_name do + :"vcs.ref.head.name" + end + + @doc """ + The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + `head` refers to where you are right now; the current reference at a + given time.The revision can be a full [hash value (see + glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), + of the recorded change to a ref within a repository pointing to a + commit [commit](https://git-scm.com/docs/git-commit) object. It does + not necessarily have to be a hash; it can simply define a [revision + number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) + which is an integer that is monotonically increasing. In cases where + it is identical to the `ref.head.name`, it **SHOULD** still be included. + It is up to the implementer to decide which value to set as the + revision based on the VCS system and situational context. + + ### Examples + + ``` + ["9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", "main", "123", "HEAD"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_revision() + :"vcs.ref.head.revision" + + ### Erlang + + ```erlang + ?VCS_REF_HEAD_REVISION. + 'vcs.ref.head.revision' + ``` + + + """ + @spec vcs_ref_head_revision :: :"vcs.ref.head.revision" + def vcs_ref_head_revision do + :"vcs.ref.head.revision" + end + + @typedoc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Enum Values + * `:branch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) + * `:tag` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) + """ + @type vcs_ref_head_type_values() :: %{ + :branch => :branch, + :tag => :tag + } + @doc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Notes + + `head` refers to where you are right now; the current reference at a + given time. + + ### Examples + + ``` + ["branch", "tag"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_type() + :"vcs.ref.head.type" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_type_values().branch + :branch + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_head_type_values().branch} + %{:"vcs.ref.head.type" => :branch} + + ### Erlang + + ```erlang + ?VCS_REF_HEAD_TYPE. + 'vcs.ref.head.type' + + ?VCS_REF_HEAD_TYPE_VALUES_BRANCH. + 'branch' + + \#{?VCS_REF_HEAD_TYPE => ?VCS_REF_HEAD_TYPE_VALUES_BRANCH}. + \#{'vcs.ref.head.type' => 'branch'} + ``` + + + """ + @spec vcs_ref_head_type :: :"vcs.ref.head.type" + def vcs_ref_head_type do + :"vcs.ref.head.type" + end + + @spec vcs_ref_head_type_values() :: vcs_ref_head_type_values() + def vcs_ref_head_type_values() do + %{ + :branch => :branch, + :tag => :tag + } + end + + @typedoc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Enum Values + * `:branch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) + * `:tag` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) + """ + @type vcs_ref_type_values() :: %{ + :branch => :branch, + :tag => :tag + } + @doc """ + The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. + + + ### Examples + + ``` + ["branch", "tag"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_type() + :"vcs.ref.type" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_type_values().branch + :branch + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_type() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_ref_type_values().branch} + %{:"vcs.ref.type" => :branch} + + ### Erlang + + ```erlang + ?VCS_REF_TYPE. + 'vcs.ref.type' + + ?VCS_REF_TYPE_VALUES_BRANCH. + 'branch' + + \#{?VCS_REF_TYPE => ?VCS_REF_TYPE_VALUES_BRANCH}. + \#{'vcs.ref.type' => 'branch'} + ``` + + + """ + @spec vcs_ref_type :: :"vcs.ref.type" + def vcs_ref_type do + :"vcs.ref.type" + end + + @spec vcs_ref_type_values() :: vcs_ref_type_values() + def vcs_ref_type_values() do + %{ + :branch => :branch, + :tag => :tag + } + end + + @deprecated """ + Replaced by `vcs.change.id`. + """ + @spec vcs_repository_change_id :: :"vcs.repository.change.id" + def vcs_repository_change_id do + :"vcs.repository.change.id" + end + + @deprecated """ + Replaced by `vcs.change.title`. + """ + @spec vcs_repository_change_title :: :"vcs.repository.change.title" + def vcs_repository_change_title do + :"vcs.repository.change.title" + end + + @doc """ + The human readable name of the repository. It **SHOULD** **NOT** include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + Due to it only being the name, it can clash with forks of the same + repository if collecting telemetry across multiple orgs or groups in + the same backends. + + ### Examples + + ``` + ["semantic-conventions", "my-cool-repo"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_name() + :"vcs.repository.name" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_NAME. + 'vcs.repository.name' + ``` + + + """ + @spec vcs_repository_name :: :"vcs.repository.name" + def vcs_repository_name do + :"vcs.repository.name" + end + + @deprecated """ + Replaced by `vcs.ref.head.name`. + """ + @spec vcs_repository_ref_name :: :"vcs.repository.ref.name" + def vcs_repository_ref_name do + :"vcs.repository.ref.name" + end + + @deprecated """ + Replaced by `vcs.ref.head.revision`. + """ + @spec vcs_repository_ref_revision :: :"vcs.repository.ref.revision" + def vcs_repository_ref_revision do + :"vcs.repository.ref.revision" + end + + @typedoc """ + Deprecated, use `vcs.ref.head.type` instead. + + + ### Enum Values + * `:branch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) + * `:tag` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) + """ + @type vcs_repository_ref_type_values() :: %{ + :branch => :branch, + :tag => :tag + } + @deprecated """ + Replaced by `vcs.ref.head.type`. + """ @spec vcs_repository_ref_type :: :"vcs.repository.ref.type" def vcs_repository_ref_type do :"vcs.repository.ref.type" @@ -212,11 +780,16 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do end @doc """ - The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. + The [canonical URL](https://support.google.com/webmasters/answer/10347851) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + In Git Version Control Systems, the canonical URL **SHOULD** **NOT** include + the `.git` extension. + ### Examples ``` @@ -243,4 +816,67 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do def vcs_repository_url_full do :"vcs.repository.url.full" end + + @typedoc """ + The type of revision comparison. + + + ### Enum Values + * `:behind` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - How many revisions the change is behind the target ref. + * `:ahead` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - How many revisions the change is ahead of the target ref. + """ + @type vcs_revision_delta_direction_values() :: %{ + :behind => :behind, + :ahead => :ahead + } + @doc """ + The type of revision comparison. + + + ### Examples + + ``` + ["ahead", "behind"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_revision_delta_direction() + :"vcs.revision_delta.direction" + + iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_revision_delta_direction_values().behind + :behind + + iex> %{OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_revision_delta_direction() => OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_revision_delta_direction_values().behind} + %{:"vcs.revision_delta.direction" => :behind} + + ### Erlang + + ```erlang + ?VCS_REVISION_DELTA_DIRECTION. + 'vcs.revision_delta.direction' + + ?VCS_REVISION_DELTA_DIRECTION_VALUES_BEHIND. + 'behind' + + \#{?VCS_REVISION_DELTA_DIRECTION => ?VCS_REVISION_DELTA_DIRECTION_VALUES_BEHIND}. + \#{'vcs.revision_delta.direction' => 'behind'} + ``` + + + """ + @spec vcs_revision_delta_direction :: :"vcs.revision_delta.direction" + def vcs_revision_delta_direction do + :"vcs.revision_delta.direction" + end + + @spec vcs_revision_delta_direction_values() :: vcs_revision_delta_direction_values() + def vcs_revision_delta_direction_values() do + %{ + :behind => :behind, + :ahead => :ahead + } + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/zos_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/zos_attributes.ex new file mode 100644 index 000000000..6fc977011 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/zos_attributes.ex @@ -0,0 +1,70 @@ +defmodule OpenTelemetry.SemConv.Incubating.ZosAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Zos attributes. + """ + + @doc """ + The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["SYS1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ZosAttributes.zos_smf_id() + :"zos.smf.id" + + ### Erlang + + ```erlang + ?ZOS_SMF_ID. + 'zos.smf.id' + ``` + + + """ + @spec zos_smf_id :: :"zos.smf.id" + def zos_smf_id do + :"zos.smf.id" + end + + @doc """ + The name of the SYSPLEX to which the z/OS system belongs too. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["SYSPLEX1"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ZosAttributes.zos_sysplex_name() + :"zos.sysplex.name" + + ### Erlang + + ```erlang + ?ZOS_SYSPLEX_NAME. + 'zos.sysplex.name' + ``` + + + """ + @spec zos_sysplex_name :: :"zos.sysplex.name" + def zos_sysplex_name do + :"zos.sysplex.name" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/azure_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/azure_metrics.ex new file mode 100644 index 000000000..2ee1d3b17 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/azure_metrics.ex @@ -0,0 +1,61 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.AzureMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Azure metrics. + """ + @doc """ + Number of active client instances. + + Instrument: `updowncounter` + Unit: `{instance}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.AzureMetrics.azure_cosmosdb_client_active_instance_count() + :"azure.cosmosdb.client.active_instance.count" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT. + 'azure.cosmosdb.client.active_instance.count' + ``` + + + """ + + @spec azure_cosmosdb_client_active_instance_count :: + :"azure.cosmosdb.client.active_instance.count" + def azure_cosmosdb_client_active_instance_count do + :"azure.cosmosdb.client.active_instance.count" + end + + @doc """ + [Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation. + + Instrument: `histogram` + Unit: `{request_unit}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.AzureMetrics.azure_cosmosdb_client_operation_request_charge() + :"azure.cosmosdb.client.operation.request_charge" + + ### Erlang + + ```erlang + ?AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE. + 'azure.cosmosdb.client.operation.request_charge' + ``` + + + """ + + @spec azure_cosmosdb_client_operation_request_charge :: + :"azure.cosmosdb.client.operation.request_charge" + def azure_cosmosdb_client_operation_request_charge do + :"azure.cosmosdb.client.operation.request_charge" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cicd_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cicd_metrics.ex new file mode 100644 index 000000000..3fa81a7bd --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cicd_metrics.ex @@ -0,0 +1,148 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cicd metrics. + """ + @doc """ + The number of pipeline runs currently active in the system by state. + + Instrument: `updowncounter` + Unit: `{run}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics.cicd_pipeline_run_active() + :"cicd.pipeline.run.active" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_ACTIVE. + 'cicd.pipeline.run.active' + ``` + + + """ + + @spec cicd_pipeline_run_active :: :"cicd.pipeline.run.active" + def cicd_pipeline_run_active do + :"cicd.pipeline.run.active" + end + + @doc """ + Duration of a pipeline run grouped by pipeline, state and result. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics.cicd_pipeline_run_duration() + :"cicd.pipeline.run.duration" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_DURATION. + 'cicd.pipeline.run.duration' + ``` + + + """ + + @spec cicd_pipeline_run_duration :: :"cicd.pipeline.run.duration" + def cicd_pipeline_run_duration do + :"cicd.pipeline.run.duration" + end + + @doc """ + The number of errors encountered in pipeline runs (eg. compile, test failures). + + Instrument: `counter` + Unit: `{error}` + ### Notes + + There might be errors in a pipeline run that are non fatal (eg. they are suppressed) or in a parallel stage multiple stages could have a fatal error. + This means that this error count might not be the same as the count of metric `cicd.pipeline.run.duration` with run result `failure`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics.cicd_pipeline_run_errors() + :"cicd.pipeline.run.errors" + + ### Erlang + + ```erlang + ?CICD_PIPELINE_RUN_ERRORS. + 'cicd.pipeline.run.errors' + ``` + + + """ + + @spec cicd_pipeline_run_errors :: :"cicd.pipeline.run.errors" + def cicd_pipeline_run_errors do + :"cicd.pipeline.run.errors" + end + + @doc """ + The number of errors in a component of the CICD system (eg. controller, scheduler, agent). + + Instrument: `counter` + Unit: `{error}` + ### Notes + + Errors in pipeline run execution are explicitly excluded. Ie a test failure is not counted in this metric. + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics.cicd_system_errors() + :"cicd.system.errors" + + ### Erlang + + ```erlang + ?CICD_SYSTEM_ERRORS. + 'cicd.system.errors' + ``` + + + """ + + @spec cicd_system_errors :: :"cicd.system.errors" + def cicd_system_errors do + :"cicd.system.errors" + end + + @doc """ + The number of workers on the CICD system by state. + + Instrument: `updowncounter` + Unit: `{count}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CicdMetrics.cicd_worker_count() + :"cicd.worker.count" + + ### Erlang + + ```erlang + ?CICD_WORKER_COUNT. + 'cicd.worker.count' + ``` + + + """ + + @spec cicd_worker_count :: :"cicd.worker.count" + def cicd_worker_count do + :"cicd.worker.count" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex index afb594d17..c307de1f9 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex @@ -4,7 +4,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do OpenTelemetry Semantic Conventions for Container metrics. """ @doc """ - Total CPU time consumed + Total CPU time consumed. Instrument: `counter` Unit: `s` @@ -34,6 +34,37 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do :"container.cpu.time" end + @doc """ + Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. + + Instrument: `gauge` + Unit: `{cpu}` + ### Notes + + CPU usage of the specific container on all available CPU cores, averaged over the sample window + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_cpu_usage() + :"container.cpu.usage" + + ### Erlang + + ```erlang + ?CONTAINER_CPU_USAGE. + 'container.cpu.usage' + ``` + + + """ + + @spec container_cpu_usage :: :"container.cpu.usage" + def container_cpu_usage do + :"container.cpu.usage" + end + @doc """ Disk bytes for the container. @@ -65,6 +96,207 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do :"container.disk.io" end + @doc """ + Container filesystem available bytes. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + In K8s, this metric is derived from the + [FsStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [ContainerStats.Rootfs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#ContainerStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_filesystem_available() + :"container.filesystem.available" + + ### Erlang + + ```erlang + ?CONTAINER_FILESYSTEM_AVAILABLE. + 'container.filesystem.available' + ``` + + + """ + + @spec container_filesystem_available :: :"container.filesystem.available" + def container_filesystem_available do + :"container.filesystem.available" + end + + @doc """ + Container filesystem capacity. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + In K8s, this metric is derived from the + [FsStats.CapacityBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [ContainerStats.Rootfs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#ContainerStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_filesystem_capacity() + :"container.filesystem.capacity" + + ### Erlang + + ```erlang + ?CONTAINER_FILESYSTEM_CAPACITY. + 'container.filesystem.capacity' + ``` + + + """ + + @spec container_filesystem_capacity :: :"container.filesystem.capacity" + def container_filesystem_capacity do + :"container.filesystem.capacity" + end + + @doc """ + Container filesystem usage. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This may not equal capacity - available. + + In K8s, this metric is derived from the + [FsStats.UsedBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [ContainerStats.Rootfs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#ContainerStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_filesystem_usage() + :"container.filesystem.usage" + + ### Erlang + + ```erlang + ?CONTAINER_FILESYSTEM_USAGE. + 'container.filesystem.usage' + ``` + + + """ + + @spec container_filesystem_usage :: :"container.filesystem.usage" + def container_filesystem_usage do + :"container.filesystem.usage" + end + + @doc """ + Container memory available. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit is undefined, the available bytes is omitted. + In general, this metric can be derived from [cadvisor](https://github.com/google/cadvisor/blob/v0.53.0/docs/storage/prometheus.md#prometheus-container-metrics) and by subtracting the `container_memory_working_set_bytes` metric from the `container_spec_memory_limit_bytes` metric. + In K8s, this metric is derived from the [MemoryStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_memory_available() + :"container.memory.available" + + ### Erlang + + ```erlang + ?CONTAINER_MEMORY_AVAILABLE. + 'container.memory.available' + ``` + + + """ + + @spec container_memory_available :: :"container.memory.available" + def container_memory_available do + :"container.memory.available" + end + + @doc """ + Container memory paging faults. + + Instrument: `counter` + Unit: `{fault}` + ### Notes + + In general, this metric can be derived from [cadvisor](https://github.com/google/cadvisor/blob/v0.53.0/docs/storage/prometheus.md#prometheus-container-metrics) and specifically the `container_memory_failures_total{failure_type=pgfault, scope=container}` and `container_memory_failures_total{failure_type=pgmajfault, scope=container}`metric. + In K8s, this metric is derived from the [MemoryStats.PageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) and [MemoryStats.MajorPageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_memory_paging_faults() + :"container.memory.paging.faults" + + ### Erlang + + ```erlang + ?CONTAINER_MEMORY_PAGING_FAULTS. + 'container.memory.paging.faults' + ``` + + + """ + + @spec container_memory_paging_faults :: :"container.memory.paging.faults" + def container_memory_paging_faults do + :"container.memory.paging.faults" + end + + @doc """ + Container memory RSS. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + In general, this metric can be derived from [cadvisor](https://github.com/google/cadvisor/blob/v0.53.0/docs/storage/prometheus.md#prometheus-container-metrics) and specifically the `container_memory_rss` metric. + In K8s, this metric is derived from the [MemoryStats.RSSBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_memory_rss() + :"container.memory.rss" + + ### Erlang + + ```erlang + ?CONTAINER_MEMORY_RSS. + 'container.memory.rss' + ``` + + + """ + + @spec container_memory_rss :: :"container.memory.rss" + def container_memory_rss do + :"container.memory.rss" + end + @doc """ Memory usage of the container. @@ -96,6 +328,38 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do :"container.memory.usage" end + @doc """ + Container memory working set. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + In general, this metric can be derived from [cadvisor](https://github.com/google/cadvisor/blob/v0.53.0/docs/storage/prometheus.md#prometheus-container-metrics) and specifically the `container_memory_working_set_bytes` metric. + In K8s, this metric is derived from the [MemoryStats.WorkingSetBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_memory_working_set() + :"container.memory.working_set" + + ### Erlang + + ```erlang + ?CONTAINER_MEMORY_WORKING_SET. + 'container.memory.working_set' + ``` + + + """ + + @spec container_memory_working_set :: :"container.memory.working_set" + def container_memory_working_set do + :"container.memory.working_set" + end + @doc """ Network bytes for the container. @@ -126,4 +390,36 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics do def container_network_io do :"container.network.io" end + + @doc """ + The time the container has been running. + + Instrument: `gauge` + Unit: `s` + ### Notes + + Instrumentations **SHOULD** use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. + The actual accuracy would depend on the instrumentation and operating system. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ContainerMetrics.container_uptime() + :"container.uptime" + + ### Erlang + + ```erlang + ?CONTAINER_UPTIME. + 'container.uptime' + ``` + + + """ + + @spec container_uptime :: :"container.uptime" + def container_uptime do + :"container.uptime" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpu_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpu_metrics.ex new file mode 100644 index 000000000..f6ab2a399 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpu_metrics.ex @@ -0,0 +1,33 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.CpuMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cpu metrics. + """ + + @deprecated """ + Replaced by `system.cpu.frequency`. + """ + + @spec cpu_frequency :: :"cpu.frequency" + def cpu_frequency do + :"cpu.frequency" + end + + @deprecated """ + Replaced by `system.cpu.time`. + """ + + @spec cpu_time :: :"cpu.time" + def cpu_time do + :"cpu.time" + end + + @deprecated """ + Replaced by `system.cpu.utilization`. + """ + + @spec cpu_utilization :: :"cpu.utilization" + def cpu_utilization do + :"cpu.utilization" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpython_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpython_metrics.ex new file mode 100644 index 000000000..3e83bc787 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpython_metrics.ex @@ -0,0 +1,98 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.CpythonMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Cpython metrics. + """ + @doc """ + The total number of objects collected inside a generation since interpreter start. + + Instrument: `counter` + Unit: `{object}` + ### Notes + + This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CpythonMetrics.cpython_gc_collected_objects() + :"cpython.gc.collected_objects" + + ### Erlang + + ```erlang + ?CPYTHON_GC_COLLECTED_OBJECTS. + 'cpython.gc.collected_objects' + ``` + + + """ + + @spec cpython_gc_collected_objects :: :"cpython.gc.collected_objects" + def cpython_gc_collected_objects do + :"cpython.gc.collected_objects" + end + + @doc """ + The number of times a generation was collected since interpreter start. + + Instrument: `counter` + Unit: `{collection}` + ### Notes + + This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CpythonMetrics.cpython_gc_collections() + :"cpython.gc.collections" + + ### Erlang + + ```erlang + ?CPYTHON_GC_COLLECTIONS. + 'cpython.gc.collections' + ``` + + + """ + + @spec cpython_gc_collections :: :"cpython.gc.collections" + def cpython_gc_collections do + :"cpython.gc.collections" + end + + @doc """ + The total number of objects which were found to be uncollectable inside a generation since interpreter start. + + Instrument: `counter` + Unit: `{object}` + ### Notes + + This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CpythonMetrics.cpython_gc_uncollectable_objects() + :"cpython.gc.uncollectable_objects" + + ### Erlang + + ```erlang + ?CPYTHON_GC_UNCOLLECTABLE_OBJECTS. + 'cpython.gc.uncollectable_objects' + ``` + + + """ + + @spec cpython_gc_uncollectable_objects :: :"cpython.gc.uncollectable_objects" + def cpython_gc_uncollectable_objects do + :"cpython.gc.uncollectable_objects" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex index e8b1e6657..9e9cf6961 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex @@ -4,7 +4,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do OpenTelemetry Semantic Conventions for DB metrics. """ @doc """ - The number of connections that are currently in state described by the `state` attribute + The number of connections that are currently in state described by the `state` attribute. Instrument: `updowncounter` Unit: `{connection}` @@ -31,7 +31,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The time it took to create a new connection + The time it took to create a new connection. Instrument: `histogram` Unit: `s` @@ -58,7 +58,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The maximum number of idle open connections allowed + The maximum number of idle open connections allowed. Instrument: `updowncounter` Unit: `{connection}` @@ -85,7 +85,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The minimum number of idle open connections allowed + The minimum number of idle open connections allowed. Instrument: `updowncounter` Unit: `{connection}` @@ -112,7 +112,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The maximum number of open connections allowed + The maximum number of open connections allowed. Instrument: `updowncounter` Unit: `{connection}` @@ -139,7 +139,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The number of pending requests for an open connection, cumulative for the entire pool + The number of current pending requests for an open connection. Instrument: `updowncounter` Unit: `{request}` @@ -166,7 +166,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The number of connection timeouts that have occurred trying to obtain a connection from the pool + The number of connection timeouts that have occurred trying to obtain a connection from the pool. Instrument: `counter` Unit: `{timeout}` @@ -193,7 +193,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The time between borrowing a connection and returning it to the pool + The time between borrowing a connection and returning it to the pool. Instrument: `histogram` Unit: `s` @@ -220,7 +220,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @doc """ - The time it took to obtain an open connection from the pool + The time it took to obtain an open connection from the pool. Instrument: `histogram` Unit: `s` @@ -247,7 +247,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @deprecated """ - Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. + Replaced by `db.client.connection.create_time` with unit `s`. """ @spec db_client_connections_create_time :: :"db.client.connections.create_time" @@ -310,7 +310,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @deprecated """ - Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. + Replaced by `db.client.connection.use_time` with unit `s`. """ @spec db_client_connections_use_time :: :"db.client.connections.use_time" @@ -319,7 +319,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do end @deprecated """ - Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. + Replaced by `db.client.connection.wait_time` with unit `s`. """ @spec db_client_connections_wait_time :: :"db.client.connections.wait_time" @@ -327,34 +327,49 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do :"db.client.connections.wait_time" end - @doc """ - Duration of database client operations. + @deprecated """ + Replaced by `azure.cosmosdb.client.active_instance.count`. + """ - Instrument: `histogram` - Unit: `s` - ### Notes + @spec db_client_cosmosdb_active_instance_count :: :"db.client.cosmosdb.active_instance.count" + def db_client_cosmosdb_active_instance_count do + :"db.client.cosmosdb.active_instance.count" + end - Batch operations **SHOULD** be recorded as a single operation. + @deprecated """ + Replaced by `azure.cosmosdb.client.operation.request_charge`. + """ + + @spec db_client_cosmosdb_operation_request_charge :: + :"db.client.cosmosdb.operation.request_charge" + def db_client_cosmosdb_operation_request_charge do + :"db.client.cosmosdb.operation.request_charge" + end + @doc """ + The actual number of records returned by the database operation. + + Instrument: `histogram` + Unit: `{row}` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_operation_duration() - :"db.client.operation.duration" + iex> OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics.db_client_response_returned_rows() + :"db.client.response.returned_rows" ### Erlang ```erlang - ?DB_CLIENT_OPERATION_DURATION. - 'db.client.operation.duration' + ?DB_CLIENT_RESPONSE_RETURNED_ROWS. + 'db.client.response.returned_rows' ``` """ - @spec db_client_operation_duration :: :"db.client.operation.duration" - def db_client_operation_duration do - :"db.client.operation.duration" + @spec db_client_response_returned_rows :: :"db.client.response.returned_rows" + def db_client_response_returned_rows do + :"db.client.response.returned_rows" end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex index 950c5f9c2..1d79ac496 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/faas_metrics.ex @@ -4,7 +4,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do OpenTelemetry Semantic Conventions for FAAS metrics. """ @doc """ - Number of invocation cold starts + Number of invocation cold starts. Instrument: `counter` Unit: `{coldstart}` @@ -31,7 +31,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Distribution of CPU usage per invocation + Distribution of CPU usage per invocation. Instrument: `histogram` Unit: `s` @@ -58,7 +58,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Number of invocation errors + Number of invocation errors. Instrument: `counter` Unit: `{error}` @@ -85,7 +85,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Measures the duration of the function's initialization, such as a cold start + Measures the duration of the function's initialization, such as a cold start. Instrument: `histogram` Unit: `s` @@ -112,7 +112,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Number of successful invocations + Number of successful invocations. Instrument: `counter` Unit: `{invocation}` @@ -139,7 +139,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Measures the duration of the function's logic execution + Measures the duration of the function's logic execution. Instrument: `histogram` Unit: `s` @@ -166,7 +166,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Distribution of max memory usage per invocation + Distribution of max memory usage per invocation. Instrument: `histogram` Unit: `By` @@ -193,7 +193,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Distribution of net I/O usage per invocation + Distribution of net I/O usage per invocation. Instrument: `histogram` Unit: `By` @@ -220,7 +220,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.FAASMetrics do end @doc """ - Number of invocation timeouts + Number of invocation timeouts. Instrument: `counter` Unit: `{timeout}` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex index 2a2d8b9bf..03082c63a 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex @@ -4,7 +4,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do OpenTelemetry Semantic Conventions for Gen_Ai metrics. """ @doc """ - GenAI operation duration + GenAI operation duration. Instrument: `histogram` Unit: `s` @@ -31,7 +31,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do end @doc """ - Measures number of input and output tokens used + Number of input and output tokens used. Instrument: `histogram` Unit: `{token}` @@ -58,7 +58,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do end @doc """ - Generative AI server request duration such as time-to-last byte or last output token + Generative AI server request duration such as time-to-last byte or last output token. Instrument: `histogram` Unit: `s` @@ -85,7 +85,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do end @doc """ - Time per output token generated after the first token for successful responses + Time per output token generated after the first token for successful responses. Instrument: `histogram` Unit: `s` @@ -112,7 +112,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do end @doc """ - Time to generate first token for successful responses + Time to generate first token for successful responses. Instrument: `histogram` Unit: `s` diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/hw_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/hw_metrics.ex new file mode 100644 index 000000000..a11f2c0f8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/hw_metrics.ex @@ -0,0 +1,1157 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Hw metrics. + """ + @doc """ + Remaining fraction of battery charge. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_battery_charge() + :"hw.battery.charge" + + ### Erlang + + ```erlang + ?HW_BATTERY_CHARGE. + 'hw.battery.charge' + ``` + + + """ + + @spec hw_battery_charge :: :"hw.battery.charge" + def hw_battery_charge do + :"hw.battery.charge" + end + + @doc """ + Lower limit of battery charge fraction to ensure proper operation. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_battery_charge_limit() + :"hw.battery.charge.limit" + + ### Erlang + + ```erlang + ?HW_BATTERY_CHARGE_LIMIT. + 'hw.battery.charge.limit' + ``` + + + """ + + @spec hw_battery_charge_limit :: :"hw.battery.charge.limit" + def hw_battery_charge_limit do + :"hw.battery.charge.limit" + end + + @doc """ + Time left before battery is completely charged or discharged. + + Instrument: `gauge` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_battery_time_left() + :"hw.battery.time_left" + + ### Erlang + + ```erlang + ?HW_BATTERY_TIME_LEFT. + 'hw.battery.time_left' + ``` + + + """ + + @spec hw_battery_time_left :: :"hw.battery.time_left" + def hw_battery_time_left do + :"hw.battery.time_left" + end + + @doc """ + CPU current frequency. + + Instrument: `gauge` + Unit: `Hz` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_cpu_speed() + :"hw.cpu.speed" + + ### Erlang + + ```erlang + ?HW_CPU_SPEED. + 'hw.cpu.speed' + ``` + + + """ + + @spec hw_cpu_speed :: :"hw.cpu.speed" + def hw_cpu_speed do + :"hw.cpu.speed" + end + + @doc """ + CPU maximum frequency. + + Instrument: `gauge` + Unit: `Hz` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_cpu_speed_limit() + :"hw.cpu.speed.limit" + + ### Erlang + + ```erlang + ?HW_CPU_SPEED_LIMIT. + 'hw.cpu.speed.limit' + ``` + + + """ + + @spec hw_cpu_speed_limit :: :"hw.cpu.speed.limit" + def hw_cpu_speed_limit do + :"hw.cpu.speed.limit" + end + + @doc """ + Energy consumed by the component. + + Instrument: `counter` + Unit: `J` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_energy() + :"hw.energy" + + ### Erlang + + ```erlang + ?HW_ENERGY. + 'hw.energy' + ``` + + + """ + + @spec hw_energy :: :"hw.energy" + def hw_energy do + :"hw.energy" + end + + @doc """ + Number of errors encountered by the component. + + Instrument: `counter` + Unit: `{error}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_errors() + :"hw.errors" + + ### Erlang + + ```erlang + ?HW_ERRORS. + 'hw.errors' + ``` + + + """ + + @spec hw_errors :: :"hw.errors" + def hw_errors do + :"hw.errors" + end + + @doc """ + Fan speed in revolutions per minute. + + Instrument: `gauge` + Unit: `rpm` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_fan_speed() + :"hw.fan.speed" + + ### Erlang + + ```erlang + ?HW_FAN_SPEED. + 'hw.fan.speed' + ``` + + + """ + + @spec hw_fan_speed :: :"hw.fan.speed" + def hw_fan_speed do + :"hw.fan.speed" + end + + @doc """ + Speed limit in rpm. + + Instrument: `gauge` + Unit: `rpm` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_fan_speed_limit() + :"hw.fan.speed.limit" + + ### Erlang + + ```erlang + ?HW_FAN_SPEED_LIMIT. + 'hw.fan.speed.limit' + ``` + + + """ + + @spec hw_fan_speed_limit :: :"hw.fan.speed.limit" + def hw_fan_speed_limit do + :"hw.fan.speed.limit" + end + + @doc """ + Fan speed expressed as a fraction of its maximum speed. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_fan_speed_ratio() + :"hw.fan.speed_ratio" + + ### Erlang + + ```erlang + ?HW_FAN_SPEED_RATIO. + 'hw.fan.speed_ratio' + ``` + + + """ + + @spec hw_fan_speed_ratio :: :"hw.fan.speed_ratio" + def hw_fan_speed_ratio do + :"hw.fan.speed_ratio" + end + + @doc """ + Received and transmitted bytes by the GPU. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_gpu_io() + :"hw.gpu.io" + + ### Erlang + + ```erlang + ?HW_GPU_IO. + 'hw.gpu.io' + ``` + + + """ + + @spec hw_gpu_io :: :"hw.gpu.io" + def hw_gpu_io do + :"hw.gpu.io" + end + + @doc """ + Size of the GPU memory. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_gpu_memory_limit() + :"hw.gpu.memory.limit" + + ### Erlang + + ```erlang + ?HW_GPU_MEMORY_LIMIT. + 'hw.gpu.memory.limit' + ``` + + + """ + + @spec hw_gpu_memory_limit :: :"hw.gpu.memory.limit" + def hw_gpu_memory_limit do + :"hw.gpu.memory.limit" + end + + @doc """ + GPU memory used. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_gpu_memory_usage() + :"hw.gpu.memory.usage" + + ### Erlang + + ```erlang + ?HW_GPU_MEMORY_USAGE. + 'hw.gpu.memory.usage' + ``` + + + """ + + @spec hw_gpu_memory_usage :: :"hw.gpu.memory.usage" + def hw_gpu_memory_usage do + :"hw.gpu.memory.usage" + end + + @doc """ + Fraction of GPU memory used. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_gpu_memory_utilization() + :"hw.gpu.memory.utilization" + + ### Erlang + + ```erlang + ?HW_GPU_MEMORY_UTILIZATION. + 'hw.gpu.memory.utilization' + ``` + + + """ + + @spec hw_gpu_memory_utilization :: :"hw.gpu.memory.utilization" + def hw_gpu_memory_utilization do + :"hw.gpu.memory.utilization" + end + + @doc """ + Fraction of time spent in a specific task. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_gpu_utilization() + :"hw.gpu.utilization" + + ### Erlang + + ```erlang + ?HW_GPU_UTILIZATION. + 'hw.gpu.utilization' + ``` + + + """ + + @spec hw_gpu_utilization :: :"hw.gpu.utilization" + def hw_gpu_utilization do + :"hw.gpu.utilization" + end + + @doc """ + Ambient (external) temperature of the physical host. + + Instrument: `gauge` + Unit: `Cel` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_host_ambient_temperature() + :"hw.host.ambient_temperature" + + ### Erlang + + ```erlang + ?HW_HOST_AMBIENT_TEMPERATURE. + 'hw.host.ambient_temperature' + ``` + + + """ + + @spec hw_host_ambient_temperature :: :"hw.host.ambient_temperature" + def hw_host_ambient_temperature do + :"hw.host.ambient_temperature" + end + + @doc """ + Total energy consumed by the entire physical host, in joules. + + Instrument: `counter` + Unit: `J` + ### Notes + + The overall energy usage of a host **MUST** be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_host_energy() + :"hw.host.energy" + + ### Erlang + + ```erlang + ?HW_HOST_ENERGY. + 'hw.host.energy' + ``` + + + """ + + @spec hw_host_energy :: :"hw.host.energy" + def hw_host_energy do + :"hw.host.energy" + end + + @doc """ + By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors. + + + Instrument: `gauge` + Unit: `Cel` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_host_heating_margin() + :"hw.host.heating_margin" + + ### Erlang + + ```erlang + ?HW_HOST_HEATING_MARGIN. + 'hw.host.heating_margin' + ``` + + + """ + + @spec hw_host_heating_margin :: :"hw.host.heating_margin" + def hw_host_heating_margin do + :"hw.host.heating_margin" + end + + @doc """ + Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred). + + + Instrument: `gauge` + Unit: `W` + ### Notes + + The overall energy usage of a host **MUST** be reported using the specific `hw.host.energy` and `hw.host.power` metrics **only**, instead of the generic `hw.energy` and `hw.power` described in the previous section, to prevent summing up overlapping values. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_host_power() + :"hw.host.power" + + ### Erlang + + ```erlang + ?HW_HOST_POWER. + 'hw.host.power' + ``` + + + """ + + @spec hw_host_power :: :"hw.host.power" + def hw_host_power do + :"hw.host.power" + end + + @doc """ + Size of the logical disk. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_logical_disk_limit() + :"hw.logical_disk.limit" + + ### Erlang + + ```erlang + ?HW_LOGICAL_DISK_LIMIT. + 'hw.logical_disk.limit' + ``` + + + """ + + @spec hw_logical_disk_limit :: :"hw.logical_disk.limit" + def hw_logical_disk_limit do + :"hw.logical_disk.limit" + end + + @doc """ + Logical disk space usage. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_logical_disk_usage() + :"hw.logical_disk.usage" + + ### Erlang + + ```erlang + ?HW_LOGICAL_DISK_USAGE. + 'hw.logical_disk.usage' + ``` + + + """ + + @spec hw_logical_disk_usage :: :"hw.logical_disk.usage" + def hw_logical_disk_usage do + :"hw.logical_disk.usage" + end + + @doc """ + Logical disk space utilization as a fraction. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_logical_disk_utilization() + :"hw.logical_disk.utilization" + + ### Erlang + + ```erlang + ?HW_LOGICAL_DISK_UTILIZATION. + 'hw.logical_disk.utilization' + ``` + + + """ + + @spec hw_logical_disk_utilization :: :"hw.logical_disk.utilization" + def hw_logical_disk_utilization do + :"hw.logical_disk.utilization" + end + + @doc """ + Size of the memory module. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_memory_size() + :"hw.memory.size" + + ### Erlang + + ```erlang + ?HW_MEMORY_SIZE. + 'hw.memory.size' + ``` + + + """ + + @spec hw_memory_size :: :"hw.memory.size" + def hw_memory_size do + :"hw.memory.size" + end + + @doc """ + Link speed. + + Instrument: `updowncounter` + Unit: `By/s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_network_bandwidth_limit() + :"hw.network.bandwidth.limit" + + ### Erlang + + ```erlang + ?HW_NETWORK_BANDWIDTH_LIMIT. + 'hw.network.bandwidth.limit' + ``` + + + """ + + @spec hw_network_bandwidth_limit :: :"hw.network.bandwidth.limit" + def hw_network_bandwidth_limit do + :"hw.network.bandwidth.limit" + end + + @doc """ + Utilization of the network bandwidth as a fraction. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_network_bandwidth_utilization() + :"hw.network.bandwidth.utilization" + + ### Erlang + + ```erlang + ?HW_NETWORK_BANDWIDTH_UTILIZATION. + 'hw.network.bandwidth.utilization' + ``` + + + """ + + @spec hw_network_bandwidth_utilization :: :"hw.network.bandwidth.utilization" + def hw_network_bandwidth_utilization do + :"hw.network.bandwidth.utilization" + end + + @doc """ + Received and transmitted network traffic in bytes. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_network_io() + :"hw.network.io" + + ### Erlang + + ```erlang + ?HW_NETWORK_IO. + 'hw.network.io' + ``` + + + """ + + @spec hw_network_io :: :"hw.network.io" + def hw_network_io do + :"hw.network.io" + end + + @doc """ + Received and transmitted network traffic in packets (or frames). + + Instrument: `counter` + Unit: `{packet}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_network_packets() + :"hw.network.packets" + + ### Erlang + + ```erlang + ?HW_NETWORK_PACKETS. + 'hw.network.packets' + ``` + + + """ + + @spec hw_network_packets :: :"hw.network.packets" + def hw_network_packets do + :"hw.network.packets" + end + + @doc """ + Link status: `1` (up) or `0` (down). + + Instrument: `updowncounter` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_network_up() + :"hw.network.up" + + ### Erlang + + ```erlang + ?HW_NETWORK_UP. + 'hw.network.up' + ``` + + + """ + + @spec hw_network_up :: :"hw.network.up" + def hw_network_up do + :"hw.network.up" + end + + @doc """ + Endurance remaining for this SSD disk. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_physical_disk_endurance_utilization() + :"hw.physical_disk.endurance_utilization" + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_ENDURANCE_UTILIZATION. + 'hw.physical_disk.endurance_utilization' + ``` + + + """ + + @spec hw_physical_disk_endurance_utilization :: :"hw.physical_disk.endurance_utilization" + def hw_physical_disk_endurance_utilization do + :"hw.physical_disk.endurance_utilization" + end + + @doc """ + Size of the disk. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_physical_disk_size() + :"hw.physical_disk.size" + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_SIZE. + 'hw.physical_disk.size' + ``` + + + """ + + @spec hw_physical_disk_size :: :"hw.physical_disk.size" + def hw_physical_disk_size do + :"hw.physical_disk.size" + end + + @doc """ + Value of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_physical_disk_smart() + :"hw.physical_disk.smart" + + ### Erlang + + ```erlang + ?HW_PHYSICAL_DISK_SMART. + 'hw.physical_disk.smart' + ``` + + + """ + + @spec hw_physical_disk_smart :: :"hw.physical_disk.smart" + def hw_physical_disk_smart do + :"hw.physical_disk.smart" + end + + @doc """ + Instantaneous power consumed by the component. + + Instrument: `gauge` + Unit: `W` + ### Notes + + It is recommended to report `hw.energy` instead of `hw.power` when possible. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_power() + :"hw.power" + + ### Erlang + + ```erlang + ?HW_POWER. + 'hw.power' + ``` + + + """ + + @spec hw_power :: :"hw.power" + def hw_power do + :"hw.power" + end + + @doc """ + Maximum power output of the power supply. + + Instrument: `updowncounter` + Unit: `W` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_power_supply_limit() + :"hw.power_supply.limit" + + ### Erlang + + ```erlang + ?HW_POWER_SUPPLY_LIMIT. + 'hw.power_supply.limit' + ``` + + + """ + + @spec hw_power_supply_limit :: :"hw.power_supply.limit" + def hw_power_supply_limit do + :"hw.power_supply.limit" + end + + @doc """ + Current power output of the power supply. + + Instrument: `updowncounter` + Unit: `W` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_power_supply_usage() + :"hw.power_supply.usage" + + ### Erlang + + ```erlang + ?HW_POWER_SUPPLY_USAGE. + 'hw.power_supply.usage' + ``` + + + """ + + @spec hw_power_supply_usage :: :"hw.power_supply.usage" + def hw_power_supply_usage do + :"hw.power_supply.usage" + end + + @doc """ + Utilization of the power supply as a fraction of its maximum output. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_power_supply_utilization() + :"hw.power_supply.utilization" + + ### Erlang + + ```erlang + ?HW_POWER_SUPPLY_UTILIZATION. + 'hw.power_supply.utilization' + ``` + + + """ + + @spec hw_power_supply_utilization :: :"hw.power_supply.utilization" + def hw_power_supply_utilization do + :"hw.power_supply.utilization" + end + + @doc """ + Operational status: `1` (true) or `0` (false) for each of the possible states. + + Instrument: `updowncounter` + Unit: `1` + ### Notes + + `hw.status` is currently specified as an *UpDownCounter* but would ideally be represented using a [*StateSet* as defined in OpenMetrics](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#stateset). This semantic convention will be updated once *StateSet* is specified in OpenTelemetry. This planned change is not expected to have any consequence on the way users query their timeseries backend to retrieve the values of `hw.status` over time. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_status() + :"hw.status" + + ### Erlang + + ```erlang + ?HW_STATUS. + 'hw.status' + ``` + + + """ + + @spec hw_status :: :"hw.status" + def hw_status do + :"hw.status" + end + + @doc """ + Operations performed by the tape drive. + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_tape_drive_operations() + :"hw.tape_drive.operations" + + ### Erlang + + ```erlang + ?HW_TAPE_DRIVE_OPERATIONS. + 'hw.tape_drive.operations' + ``` + + + """ + + @spec hw_tape_drive_operations :: :"hw.tape_drive.operations" + def hw_tape_drive_operations do + :"hw.tape_drive.operations" + end + + @doc """ + Temperature in degrees Celsius. + + Instrument: `gauge` + Unit: `Cel` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_temperature() + :"hw.temperature" + + ### Erlang + + ```erlang + ?HW_TEMPERATURE. + 'hw.temperature' + ``` + + + """ + + @spec hw_temperature :: :"hw.temperature" + def hw_temperature do + :"hw.temperature" + end + + @doc """ + Temperature limit in degrees Celsius. + + Instrument: `gauge` + Unit: `Cel` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_temperature_limit() + :"hw.temperature.limit" + + ### Erlang + + ```erlang + ?HW_TEMPERATURE_LIMIT. + 'hw.temperature.limit' + ``` + + + """ + + @spec hw_temperature_limit :: :"hw.temperature.limit" + def hw_temperature_limit do + :"hw.temperature.limit" + end + + @doc """ + Voltage measured by the sensor. + + Instrument: `gauge` + Unit: `V` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_voltage() + :"hw.voltage" + + ### Erlang + + ```erlang + ?HW_VOLTAGE. + 'hw.voltage' + ``` + + + """ + + @spec hw_voltage :: :"hw.voltage" + def hw_voltage do + :"hw.voltage" + end + + @doc """ + Voltage limit in Volts. + + Instrument: `gauge` + Unit: `V` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_voltage_limit() + :"hw.voltage.limit" + + ### Erlang + + ```erlang + ?HW_VOLTAGE_LIMIT. + 'hw.voltage.limit' + ``` + + + """ + + @spec hw_voltage_limit :: :"hw.voltage.limit" + def hw_voltage_limit do + :"hw.voltage.limit" + end + + @doc """ + Nominal (expected) voltage. + + Instrument: `gauge` + Unit: `V` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HwMetrics.hw_voltage_nominal() + :"hw.voltage.nominal" + + ### Erlang + + ```erlang + ?HW_VOLTAGE_NOMINAL. + 'hw.voltage.nominal' + ``` + + + """ + + @spec hw_voltage_nominal :: :"hw.voltage.nominal" + def hw_voltage_nominal do + :"hw.voltage.nominal" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/k8s_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/k8s_metrics.ex new file mode 100644 index 000000000..833b915ac --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/k8s_metrics.ex @@ -0,0 +1,3634 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for K8S metrics. + """ + @doc """ + Maximum CPU resource limit set for the container. + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_cpu_limit() + :"k8s.container.cpu.limit" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_CPU_LIMIT. + 'k8s.container.cpu.limit' + ``` + + + """ + + @spec k8s_container_cpu_limit :: :"k8s.container.cpu.limit" + def k8s_container_cpu_limit do + :"k8s.container.cpu.limit" + end + + @doc """ + The ratio of container CPU usage to its CPU limit. + + Instrument: `gauge` + Unit: `1` + ### Notes + + The value range is [0.0,1.0]. A value of 1.0 means the container is using 100% of its CPU limit. If the CPU limit is not set, this metric **SHOULD** **NOT** be emitted for that container. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_cpu_limit_utilization() + :"k8s.container.cpu.limit_utilization" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_CPU_LIMIT_UTILIZATION. + 'k8s.container.cpu.limit_utilization' + ``` + + + """ + + @spec k8s_container_cpu_limit_utilization :: :"k8s.container.cpu.limit_utilization" + def k8s_container_cpu_limit_utilization do + :"k8s.container.cpu.limit_utilization" + end + + @doc """ + CPU resource requested for the container. + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_cpu_request() + :"k8s.container.cpu.request" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_CPU_REQUEST. + 'k8s.container.cpu.request' + ``` + + + """ + + @spec k8s_container_cpu_request :: :"k8s.container.cpu.request" + def k8s_container_cpu_request do + :"k8s.container.cpu.request" + end + + @doc """ + The ratio of container CPU usage to its CPU request. + + Instrument: `gauge` + Unit: `1` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_cpu_request_utilization() + :"k8s.container.cpu.request_utilization" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_CPU_REQUEST_UTILIZATION. + 'k8s.container.cpu.request_utilization' + ``` + + + """ + + @spec k8s_container_cpu_request_utilization :: :"k8s.container.cpu.request_utilization" + def k8s_container_cpu_request_utilization do + :"k8s.container.cpu.request_utilization" + end + + @doc """ + Maximum ephemeral storage resource limit set for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_ephemeral_storage_limit() + :"k8s.container.ephemeral_storage.limit" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_EPHEMERAL_STORAGE_LIMIT. + 'k8s.container.ephemeral_storage.limit' + ``` + + + """ + + @spec k8s_container_ephemeral_storage_limit :: :"k8s.container.ephemeral_storage.limit" + def k8s_container_ephemeral_storage_limit do + :"k8s.container.ephemeral_storage.limit" + end + + @doc """ + Ephemeral storage resource requested for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_ephemeral_storage_request() + :"k8s.container.ephemeral_storage.request" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_EPHEMERAL_STORAGE_REQUEST. + 'k8s.container.ephemeral_storage.request' + ``` + + + """ + + @spec k8s_container_ephemeral_storage_request :: :"k8s.container.ephemeral_storage.request" + def k8s_container_ephemeral_storage_request do + :"k8s.container.ephemeral_storage.request" + end + + @doc """ + Maximum memory resource limit set for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_memory_limit() + :"k8s.container.memory.limit" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_MEMORY_LIMIT. + 'k8s.container.memory.limit' + ``` + + + """ + + @spec k8s_container_memory_limit :: :"k8s.container.memory.limit" + def k8s_container_memory_limit do + :"k8s.container.memory.limit" + end + + @doc """ + Memory resource requested for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_memory_request() + :"k8s.container.memory.request" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_MEMORY_REQUEST. + 'k8s.container.memory.request' + ``` + + + """ + + @spec k8s_container_memory_request :: :"k8s.container.memory.request" + def k8s_container_memory_request do + :"k8s.container.memory.request" + end + + @doc """ + Indicates whether the container is currently marked as ready to accept traffic, based on its readiness probe (1 = ready, 0 = not ready). + + + Instrument: `updowncounter` + Unit: `{container}` + ### Notes + + This metric **SHOULD** reflect the value of the `ready` field in the + [K8s ContainerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_ready() + :"k8s.container.ready" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_READY. + 'k8s.container.ready' + ``` + + + """ + + @spec k8s_container_ready :: :"k8s.container.ready" + def k8s_container_ready do + :"k8s.container.ready" + end + + @doc """ + Describes how many times the container has restarted (since the last counter reset). + + Instrument: `updowncounter` + Unit: `{restart}` + ### Notes + + This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 + at any time depending on how your kubelet is configured to prune dead containers. + It is best to not depend too much on the exact value but rather look at it as + either == 0, in which case you can conclude there were no restarts in the recent past, or > 0, in which case + you can conclude there were restarts in the recent past, and not try and analyze the value beyond that. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_restart_count() + :"k8s.container.restart.count" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_RESTART_COUNT. + 'k8s.container.restart.count' + ``` + + + """ + + @spec k8s_container_restart_count :: :"k8s.container.restart.count" + def k8s_container_restart_count do + :"k8s.container.restart.count" + end + + @doc """ + Describes the number of K8s containers that are currently in a state for a given reason. + + Instrument: `updowncounter` + Unit: `{container}` + ### Notes + + All possible container state reasons will be reported at each time interval to avoid missing metrics. + Only the value corresponding to the current state reason will be non-zero. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_status_reason() + :"k8s.container.status.reason" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STATUS_REASON. + 'k8s.container.status.reason' + ``` + + + """ + + @spec k8s_container_status_reason :: :"k8s.container.status.reason" + def k8s_container_status_reason do + :"k8s.container.status.reason" + end + + @doc """ + Describes the number of K8s containers that are currently in a given state. + + Instrument: `updowncounter` + Unit: `{container}` + ### Notes + + All possible container states will be reported at each time interval to avoid missing metrics. + Only the value corresponding to the current state will be non-zero. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_status_state() + :"k8s.container.status.state" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STATUS_STATE. + 'k8s.container.status.state' + ``` + + + """ + + @spec k8s_container_status_state :: :"k8s.container.status.state" + def k8s_container_status_state do + :"k8s.container.status.state" + end + + @doc """ + Maximum storage resource limit set for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_storage_limit() + :"k8s.container.storage.limit" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STORAGE_LIMIT. + 'k8s.container.storage.limit' + ``` + + + """ + + @spec k8s_container_storage_limit :: :"k8s.container.storage.limit" + def k8s_container_storage_limit do + :"k8s.container.storage.limit" + end + + @doc """ + Storage resource requested for the container. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#resourcerequirements-v1-core for details. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_container_storage_request() + :"k8s.container.storage.request" + + ### Erlang + + ```erlang + ?K8S_CONTAINER_STORAGE_REQUEST. + 'k8s.container.storage.request' + ``` + + + """ + + @spec k8s_container_storage_request :: :"k8s.container.storage.request" + def k8s_container_storage_request do + :"k8s.container.storage.request" + end + + @deprecated """ + Replaced by `k8s.cronjob.job.active`. + """ + + @spec k8s_cronjob_active_jobs :: :"k8s.cronjob.active_jobs" + def k8s_cronjob_active_jobs do + :"k8s.cronjob.active_jobs" + end + + @doc """ + The number of actively running jobs for a cronjob. + + Instrument: `updowncounter` + Unit: `{job}` + ### Notes + + This metric aligns with the `active` field of the + [K8s CronJobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#cronjobstatus-v1-batch). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_cronjob_job_active() + :"k8s.cronjob.job.active" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_JOB_ACTIVE. + 'k8s.cronjob.job.active' + ``` + + + """ + + @spec k8s_cronjob_job_active :: :"k8s.cronjob.job.active" + def k8s_cronjob_job_active do + :"k8s.cronjob.job.active" + end + + @deprecated """ + Replaced by `k8s.daemonset.node.current_scheduled`. + """ + + @spec k8s_daemonset_current_scheduled_nodes :: :"k8s.daemonset.current_scheduled_nodes" + def k8s_daemonset_current_scheduled_nodes do + :"k8s.daemonset.current_scheduled_nodes" + end + + @deprecated """ + Replaced by `k8s.daemonset.node.desired_scheduled`. + """ + + @spec k8s_daemonset_desired_scheduled_nodes :: :"k8s.daemonset.desired_scheduled_nodes" + def k8s_daemonset_desired_scheduled_nodes do + :"k8s.daemonset.desired_scheduled_nodes" + end + + @deprecated """ + Replaced by `k8s.daemonset.node.misscheduled`. + """ + + @spec k8s_daemonset_misscheduled_nodes :: :"k8s.daemonset.misscheduled_nodes" + def k8s_daemonset_misscheduled_nodes do + :"k8s.daemonset.misscheduled_nodes" + end + + @doc """ + Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. + + Instrument: `updowncounter` + Unit: `{node}` + ### Notes + + This metric aligns with the `currentNumberScheduled` field of the + [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_node_current_scheduled() + :"k8s.daemonset.node.current_scheduled" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NODE_CURRENT_SCHEDULED. + 'k8s.daemonset.node.current_scheduled' + ``` + + + """ + + @spec k8s_daemonset_node_current_scheduled :: :"k8s.daemonset.node.current_scheduled" + def k8s_daemonset_node_current_scheduled do + :"k8s.daemonset.node.current_scheduled" + end + + @doc """ + Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod). + + Instrument: `updowncounter` + Unit: `{node}` + ### Notes + + This metric aligns with the `desiredNumberScheduled` field of the + [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_node_desired_scheduled() + :"k8s.daemonset.node.desired_scheduled" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NODE_DESIRED_SCHEDULED. + 'k8s.daemonset.node.desired_scheduled' + ``` + + + """ + + @spec k8s_daemonset_node_desired_scheduled :: :"k8s.daemonset.node.desired_scheduled" + def k8s_daemonset_node_desired_scheduled do + :"k8s.daemonset.node.desired_scheduled" + end + + @doc """ + Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. + + Instrument: `updowncounter` + Unit: `{node}` + ### Notes + + This metric aligns with the `numberMisscheduled` field of the + [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_node_misscheduled() + :"k8s.daemonset.node.misscheduled" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NODE_MISSCHEDULED. + 'k8s.daemonset.node.misscheduled' + ``` + + + """ + + @spec k8s_daemonset_node_misscheduled :: :"k8s.daemonset.node.misscheduled" + def k8s_daemonset_node_misscheduled do + :"k8s.daemonset.node.misscheduled" + end + + @doc """ + Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. + + Instrument: `updowncounter` + Unit: `{node}` + ### Notes + + This metric aligns with the `numberReady` field of the + [K8s DaemonSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#daemonsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_node_ready() + :"k8s.daemonset.node.ready" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_NODE_READY. + 'k8s.daemonset.node.ready' + ``` + + + """ + + @spec k8s_daemonset_node_ready :: :"k8s.daemonset.node.ready" + def k8s_daemonset_node_ready do + :"k8s.daemonset.node.ready" + end + + @deprecated """ + Replaced by `k8s.daemonset.node.ready`. + """ + + @spec k8s_daemonset_ready_nodes :: :"k8s.daemonset.ready_nodes" + def k8s_daemonset_ready_nodes do + :"k8s.daemonset.ready_nodes" + end + + @deprecated """ + Replaced by `k8s.deployment.pod.available`. + """ + + @spec k8s_deployment_available_pods :: :"k8s.deployment.available_pods" + def k8s_deployment_available_pods do + :"k8s.deployment.available_pods" + end + + @deprecated """ + Replaced by `k8s.deployment.pod.desired`. + """ + + @spec k8s_deployment_desired_pods :: :"k8s.deployment.desired_pods" + def k8s_deployment_desired_pods do + :"k8s.deployment.desired_pods" + end + + @doc """ + Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `availableReplicas` field of the + [K8s DeploymentStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_deployment_pod_available() + :"k8s.deployment.pod.available" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_POD_AVAILABLE. + 'k8s.deployment.pod.available' + ``` + + + """ + + @spec k8s_deployment_pod_available :: :"k8s.deployment.pod.available" + def k8s_deployment_pod_available do + :"k8s.deployment.pod.available" + end + + @doc """ + Number of desired replica pods in this deployment. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `replicas` field of the + [K8s DeploymentSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#deploymentspec-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_deployment_pod_desired() + :"k8s.deployment.pod.desired" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_POD_DESIRED. + 'k8s.deployment.pod.desired' + ``` + + + """ + + @spec k8s_deployment_pod_desired :: :"k8s.deployment.pod.desired" + def k8s_deployment_pod_desired do + :"k8s.deployment.pod.desired" + end + + @deprecated """ + Replaced by `k8s.hpa.pod.current`. + """ + + @spec k8s_hpa_current_pods :: :"k8s.hpa.current_pods" + def k8s_hpa_current_pods do + :"k8s.hpa.current_pods" + end + + @deprecated """ + Replaced by `k8s.hpa.pod.desired`. + """ + + @spec k8s_hpa_desired_pods :: :"k8s.hpa.desired_pods" + def k8s_hpa_desired_pods do + :"k8s.hpa.desired_pods" + end + + @deprecated """ + Replaced by `k8s.hpa.pod.max`. + """ + + @spec k8s_hpa_max_pods :: :"k8s.hpa.max_pods" + def k8s_hpa_max_pods do + :"k8s.hpa.max_pods" + end + + @doc """ + Target average utilization, in percentage, for CPU resource in HPA config. + + Instrument: `gauge` + Unit: `1` + ### Notes + + This metric aligns with the `averageUtilization` field of the + [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). + If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), + the `k8s.container.name` attribute **MUST** be set to identify the specific container within the pod to which the metric applies. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_metric_target_cpu_average_utilization() + :"k8s.hpa.metric.target.cpu.average_utilization" + + ### Erlang + + ```erlang + ?K8S_HPA_METRIC_TARGET_CPU_AVERAGE_UTILIZATION. + 'k8s.hpa.metric.target.cpu.average_utilization' + ``` + + + """ + + @spec k8s_hpa_metric_target_cpu_average_utilization :: + :"k8s.hpa.metric.target.cpu.average_utilization" + def k8s_hpa_metric_target_cpu_average_utilization do + :"k8s.hpa.metric.target.cpu.average_utilization" + end + + @doc """ + Target average value for CPU resource in HPA config. + + Instrument: `gauge` + Unit: `{cpu}` + ### Notes + + This metric aligns with the `averageValue` field of the + [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). + If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), + the `k8s.container.name` attribute **MUST** be set to identify the specific container within the pod to which the metric applies. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_metric_target_cpu_average_value() + :"k8s.hpa.metric.target.cpu.average_value" + + ### Erlang + + ```erlang + ?K8S_HPA_METRIC_TARGET_CPU_AVERAGE_VALUE. + 'k8s.hpa.metric.target.cpu.average_value' + ``` + + + """ + + @spec k8s_hpa_metric_target_cpu_average_value :: :"k8s.hpa.metric.target.cpu.average_value" + def k8s_hpa_metric_target_cpu_average_value do + :"k8s.hpa.metric.target.cpu.average_value" + end + + @doc """ + Target value for CPU resource in HPA config. + + Instrument: `gauge` + Unit: `{cpu}` + ### Notes + + This metric aligns with the `value` field of the + [K8s HPA MetricTarget](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#metrictarget-v2-autoscaling). + If the type of the metric is [`ContainerResource`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-metrics-apis), + the `k8s.container.name` attribute **MUST** be set to identify the specific container within the pod to which the metric applies. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_metric_target_cpu_value() + :"k8s.hpa.metric.target.cpu.value" + + ### Erlang + + ```erlang + ?K8S_HPA_METRIC_TARGET_CPU_VALUE. + 'k8s.hpa.metric.target.cpu.value' + ``` + + + """ + + @spec k8s_hpa_metric_target_cpu_value :: :"k8s.hpa.metric.target.cpu.value" + def k8s_hpa_metric_target_cpu_value do + :"k8s.hpa.metric.target.cpu.value" + end + + @deprecated """ + Replaced by `k8s.hpa.pod.min`. + """ + + @spec k8s_hpa_min_pods :: :"k8s.hpa.min_pods" + def k8s_hpa_min_pods do + :"k8s.hpa.min_pods" + end + + @doc """ + Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `currentReplicas` field of the + [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_pod_current() + :"k8s.hpa.pod.current" + + ### Erlang + + ```erlang + ?K8S_HPA_POD_CURRENT. + 'k8s.hpa.pod.current' + ``` + + + """ + + @spec k8s_hpa_pod_current :: :"k8s.hpa.pod.current" + def k8s_hpa_pod_current do + :"k8s.hpa.pod.current" + end + + @doc """ + Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `desiredReplicas` field of the + [K8s HorizontalPodAutoscalerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerstatus-v2-autoscaling) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_pod_desired() + :"k8s.hpa.pod.desired" + + ### Erlang + + ```erlang + ?K8S_HPA_POD_DESIRED. + 'k8s.hpa.pod.desired' + ``` + + + """ + + @spec k8s_hpa_pod_desired :: :"k8s.hpa.pod.desired" + def k8s_hpa_pod_desired do + :"k8s.hpa.pod.desired" + end + + @doc """ + The upper limit for the number of replica pods to which the autoscaler can scale up. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `maxReplicas` field of the + [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_pod_max() + :"k8s.hpa.pod.max" + + ### Erlang + + ```erlang + ?K8S_HPA_POD_MAX. + 'k8s.hpa.pod.max' + ``` + + + """ + + @spec k8s_hpa_pod_max :: :"k8s.hpa.pod.max" + def k8s_hpa_pod_max do + :"k8s.hpa.pod.max" + end + + @doc """ + The lower limit for the number of replica pods to which the autoscaler can scale down. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `minReplicas` field of the + [K8s HorizontalPodAutoscalerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#horizontalpodautoscalerspec-v2-autoscaling) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_pod_min() + :"k8s.hpa.pod.min" + + ### Erlang + + ```erlang + ?K8S_HPA_POD_MIN. + 'k8s.hpa.pod.min' + ``` + + + """ + + @spec k8s_hpa_pod_min :: :"k8s.hpa.pod.min" + def k8s_hpa_pod_min do + :"k8s.hpa.pod.min" + end + + @deprecated """ + Replaced by `k8s.job.pod.active`. + """ + + @spec k8s_job_active_pods :: :"k8s.job.active_pods" + def k8s_job_active_pods do + :"k8s.job.active_pods" + end + + @deprecated """ + Replaced by `k8s.job.pod.desired_successful`. + """ + + @spec k8s_job_desired_successful_pods :: :"k8s.job.desired_successful_pods" + def k8s_job_desired_successful_pods do + :"k8s.job.desired_successful_pods" + end + + @deprecated """ + Replaced by `k8s.job.pod.failed`. + """ + + @spec k8s_job_failed_pods :: :"k8s.job.failed_pods" + def k8s_job_failed_pods do + :"k8s.job.failed_pods" + end + + @deprecated """ + Replaced by `k8s.job.pod.max_parallel`. + """ + + @spec k8s_job_max_parallel_pods :: :"k8s.job.max_parallel_pods" + def k8s_job_max_parallel_pods do + :"k8s.job.max_parallel_pods" + end + + @doc """ + The number of pending and actively running pods for a job. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `active` field of the + [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_pod_active() + :"k8s.job.pod.active" + + ### Erlang + + ```erlang + ?K8S_JOB_POD_ACTIVE. + 'k8s.job.pod.active' + ``` + + + """ + + @spec k8s_job_pod_active :: :"k8s.job.pod.active" + def k8s_job_pod_active do + :"k8s.job.pod.active" + end + + @doc """ + The desired number of successfully finished pods the job should be run with. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `completions` field of the + [K8s JobSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch).. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_pod_desired_successful() + :"k8s.job.pod.desired_successful" + + ### Erlang + + ```erlang + ?K8S_JOB_POD_DESIRED_SUCCESSFUL. + 'k8s.job.pod.desired_successful' + ``` + + + """ + + @spec k8s_job_pod_desired_successful :: :"k8s.job.pod.desired_successful" + def k8s_job_pod_desired_successful do + :"k8s.job.pod.desired_successful" + end + + @doc """ + The number of pods which reached phase Failed for a job. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `failed` field of the + [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_pod_failed() + :"k8s.job.pod.failed" + + ### Erlang + + ```erlang + ?K8S_JOB_POD_FAILED. + 'k8s.job.pod.failed' + ``` + + + """ + + @spec k8s_job_pod_failed :: :"k8s.job.pod.failed" + def k8s_job_pod_failed do + :"k8s.job.pod.failed" + end + + @doc """ + The max desired number of pods the job should run at any given time. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `parallelism` field of the + [K8s JobSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobspec-v1-batch). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_pod_max_parallel() + :"k8s.job.pod.max_parallel" + + ### Erlang + + ```erlang + ?K8S_JOB_POD_MAX_PARALLEL. + 'k8s.job.pod.max_parallel' + ``` + + + """ + + @spec k8s_job_pod_max_parallel :: :"k8s.job.pod.max_parallel" + def k8s_job_pod_max_parallel do + :"k8s.job.pod.max_parallel" + end + + @doc """ + The number of pods which reached phase Succeeded for a job. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `succeeded` field of the + [K8s JobStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#jobstatus-v1-batch). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_pod_successful() + :"k8s.job.pod.successful" + + ### Erlang + + ```erlang + ?K8S_JOB_POD_SUCCESSFUL. + 'k8s.job.pod.successful' + ``` + + + """ + + @spec k8s_job_pod_successful :: :"k8s.job.pod.successful" + def k8s_job_pod_successful do + :"k8s.job.pod.successful" + end + + @deprecated """ + Replaced by `k8s.job.pod.successful`. + """ + + @spec k8s_job_successful_pods :: :"k8s.job.successful_pods" + def k8s_job_successful_pods do + :"k8s.job.successful_pods" + end + + @doc """ + Describes number of K8s namespaces that are currently in a given phase. + + Instrument: `updowncounter` + Unit: `{namespace}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_namespace_phase() + :"k8s.namespace.phase" + + ### Erlang + + ```erlang + ?K8S_NAMESPACE_PHASE. + 'k8s.namespace.phase' + ``` + + + """ + + @spec k8s_namespace_phase :: :"k8s.namespace.phase" + def k8s_namespace_phase do + :"k8s.namespace.phase" + end + + @deprecated """ + Replaced by `k8s.node.cpu.allocatable`. + """ + + @spec k8s_node_allocatable_cpu :: :"k8s.node.allocatable.cpu" + def k8s_node_allocatable_cpu do + :"k8s.node.allocatable.cpu" + end + + @deprecated """ + Replaced by `k8s.node.ephemeral_storage.allocatable`. + """ + + @spec k8s_node_allocatable_ephemeral_storage :: :"k8s.node.allocatable.ephemeral_storage" + def k8s_node_allocatable_ephemeral_storage do + :"k8s.node.allocatable.ephemeral_storage" + end + + @deprecated """ + Replaced by `k8s.node.memory.allocatable`. + """ + + @spec k8s_node_allocatable_memory :: :"k8s.node.allocatable.memory" + def k8s_node_allocatable_memory do + :"k8s.node.allocatable.memory" + end + + @deprecated """ + Replaced by `k8s.node.pod.allocatable`. + """ + + @spec k8s_node_allocatable_pods :: :"k8s.node.allocatable.pods" + def k8s_node_allocatable_pods do + :"k8s.node.allocatable.pods" + end + + @doc """ + Describes the condition of a particular Node. + + Instrument: `updowncounter` + Unit: `{node}` + ### Notes + + All possible node condition pairs (type and status) will be reported at each time interval to avoid missing metrics. Condition pairs corresponding to the current conditions' statuses will be non-zero. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_condition_status() + :"k8s.node.condition.status" + + ### Erlang + + ```erlang + ?K8S_NODE_CONDITION_STATUS. + 'k8s.node.condition.status' + ``` + + + """ + + @spec k8s_node_condition_status :: :"k8s.node.condition.status" + def k8s_node_condition_status do + :"k8s.node.condition.status" + end + + @doc """ + Amount of cpu allocatable on the node. + + Instrument: `updowncounter` + Unit: `{cpu}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_cpu_allocatable() + :"k8s.node.cpu.allocatable" + + ### Erlang + + ```erlang + ?K8S_NODE_CPU_ALLOCATABLE. + 'k8s.node.cpu.allocatable' + ``` + + + """ + + @spec k8s_node_cpu_allocatable :: :"k8s.node.cpu.allocatable" + def k8s_node_cpu_allocatable do + :"k8s.node.cpu.allocatable" + end + + @doc """ + Total CPU time consumed. + + Instrument: `counter` + Unit: `s` + ### Notes + + Total CPU time consumed by the specific Node on all available CPU cores + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_cpu_time() + :"k8s.node.cpu.time" + + ### Erlang + + ```erlang + ?K8S_NODE_CPU_TIME. + 'k8s.node.cpu.time' + ``` + + + """ + + @spec k8s_node_cpu_time :: :"k8s.node.cpu.time" + def k8s_node_cpu_time do + :"k8s.node.cpu.time" + end + + @doc """ + Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. + + Instrument: `gauge` + Unit: `{cpu}` + ### Notes + + CPU usage of the specific Node on all available CPU cores, averaged over the sample window + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_cpu_usage() + :"k8s.node.cpu.usage" + + ### Erlang + + ```erlang + ?K8S_NODE_CPU_USAGE. + 'k8s.node.cpu.usage' + ``` + + + """ + + @spec k8s_node_cpu_usage :: :"k8s.node.cpu.usage" + def k8s_node_cpu_usage do + :"k8s.node.cpu.usage" + end + + @doc """ + Amount of ephemeral-storage allocatable on the node. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_ephemeral_storage_allocatable() + :"k8s.node.ephemeral_storage.allocatable" + + ### Erlang + + ```erlang + ?K8S_NODE_EPHEMERAL_STORAGE_ALLOCATABLE. + 'k8s.node.ephemeral_storage.allocatable' + ``` + + + """ + + @spec k8s_node_ephemeral_storage_allocatable :: :"k8s.node.ephemeral_storage.allocatable" + def k8s_node_ephemeral_storage_allocatable do + :"k8s.node.ephemeral_storage.allocatable" + end + + @doc """ + Node filesystem available bytes. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [FsStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_filesystem_available() + :"k8s.node.filesystem.available" + + ### Erlang + + ```erlang + ?K8S_NODE_FILESYSTEM_AVAILABLE. + 'k8s.node.filesystem.available' + ``` + + + """ + + @spec k8s_node_filesystem_available :: :"k8s.node.filesystem.available" + def k8s_node_filesystem_available do + :"k8s.node.filesystem.available" + end + + @doc """ + Node filesystem capacity. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [FsStats.CapacityBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_filesystem_capacity() + :"k8s.node.filesystem.capacity" + + ### Erlang + + ```erlang + ?K8S_NODE_FILESYSTEM_CAPACITY. + 'k8s.node.filesystem.capacity' + ``` + + + """ + + @spec k8s_node_filesystem_capacity :: :"k8s.node.filesystem.capacity" + def k8s_node_filesystem_capacity do + :"k8s.node.filesystem.capacity" + end + + @doc """ + Node filesystem usage. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This may not equal capacity - available. + + This metric is derived from the + [FsStats.UsedBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [NodeStats.Fs](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#NodeStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_filesystem_usage() + :"k8s.node.filesystem.usage" + + ### Erlang + + ```erlang + ?K8S_NODE_FILESYSTEM_USAGE. + 'k8s.node.filesystem.usage' + ``` + + + """ + + @spec k8s_node_filesystem_usage :: :"k8s.node.filesystem.usage" + def k8s_node_filesystem_usage do + :"k8s.node.filesystem.usage" + end + + @doc """ + Amount of memory allocatable on the node. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_allocatable() + :"k8s.node.memory.allocatable" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_ALLOCATABLE. + 'k8s.node.memory.allocatable' + ``` + + + """ + + @spec k8s_node_memory_allocatable :: :"k8s.node.memory.allocatable" + def k8s_node_memory_allocatable do + :"k8s.node.memory.allocatable" + end + + @doc """ + Node memory available. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit is undefined, the available bytes is omitted. + This metric is derived from the [MemoryStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [NodeStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#NodeStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_available() + :"k8s.node.memory.available" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_AVAILABLE. + 'k8s.node.memory.available' + ``` + + + """ + + @spec k8s_node_memory_available :: :"k8s.node.memory.available" + def k8s_node_memory_available do + :"k8s.node.memory.available" + end + + @doc """ + Node memory paging faults. + + Instrument: `counter` + Unit: `{fault}` + ### Notes + + Cumulative number of major/minor page faults. + This metric is derived from the [MemoryStats.PageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) and [MemoryStats.MajorPageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) fields of the [NodeStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#NodeStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_paging_faults() + :"k8s.node.memory.paging.faults" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_PAGING_FAULTS. + 'k8s.node.memory.paging.faults' + ``` + + + """ + + @spec k8s_node_memory_paging_faults :: :"k8s.node.memory.paging.faults" + def k8s_node_memory_paging_faults do + :"k8s.node.memory.paging.faults" + end + + @doc """ + Node memory RSS. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The amount of anonymous and swap cache memory (includes transparent hugepages). + This metric is derived from the [MemoryStats.RSSBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [NodeStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#NodeStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_rss() + :"k8s.node.memory.rss" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_RSS. + 'k8s.node.memory.rss' + ``` + + + """ + + @spec k8s_node_memory_rss :: :"k8s.node.memory.rss" + def k8s_node_memory_rss do + :"k8s.node.memory.rss" + end + + @doc """ + Memory usage of the Node. + + Instrument: `gauge` + Unit: `By` + ### Notes + + Total memory usage of the Node + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_usage() + :"k8s.node.memory.usage" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_USAGE. + 'k8s.node.memory.usage' + ``` + + + """ + + @spec k8s_node_memory_usage :: :"k8s.node.memory.usage" + def k8s_node_memory_usage do + :"k8s.node.memory.usage" + end + + @doc """ + Node memory working set. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The amount of working set memory. This includes recently accessed memory, dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes. + This metric is derived from the [MemoryStats.WorkingSetBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [NodeStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#NodeStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_memory_working_set() + :"k8s.node.memory.working_set" + + ### Erlang + + ```erlang + ?K8S_NODE_MEMORY_WORKING_SET. + 'k8s.node.memory.working_set' + ``` + + + """ + + @spec k8s_node_memory_working_set :: :"k8s.node.memory.working_set" + def k8s_node_memory_working_set do + :"k8s.node.memory.working_set" + end + + @doc """ + Node network errors. + + Instrument: `counter` + Unit: `{error}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_network_errors() + :"k8s.node.network.errors" + + ### Erlang + + ```erlang + ?K8S_NODE_NETWORK_ERRORS. + 'k8s.node.network.errors' + ``` + + + """ + + @spec k8s_node_network_errors :: :"k8s.node.network.errors" + def k8s_node_network_errors do + :"k8s.node.network.errors" + end + + @doc """ + Network bytes for the Node. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_network_io() + :"k8s.node.network.io" + + ### Erlang + + ```erlang + ?K8S_NODE_NETWORK_IO. + 'k8s.node.network.io' + ``` + + + """ + + @spec k8s_node_network_io :: :"k8s.node.network.io" + def k8s_node_network_io do + :"k8s.node.network.io" + end + + @doc """ + Amount of pods allocatable on the node. + + Instrument: `updowncounter` + Unit: `{pod}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_pod_allocatable() + :"k8s.node.pod.allocatable" + + ### Erlang + + ```erlang + ?K8S_NODE_POD_ALLOCATABLE. + 'k8s.node.pod.allocatable' + ``` + + + """ + + @spec k8s_node_pod_allocatable :: :"k8s.node.pod.allocatable" + def k8s_node_pod_allocatable do + :"k8s.node.pod.allocatable" + end + + @doc """ + The time the Node has been running. + + Instrument: `gauge` + Unit: `s` + ### Notes + + Instrumentations **SHOULD** use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. + The actual accuracy would depend on the instrumentation and operating system. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_node_uptime() + :"k8s.node.uptime" + + ### Erlang + + ```erlang + ?K8S_NODE_UPTIME. + 'k8s.node.uptime' + ``` + + + """ + + @spec k8s_node_uptime :: :"k8s.node.uptime" + def k8s_node_uptime do + :"k8s.node.uptime" + end + + @doc """ + Total CPU time consumed. + + Instrument: `counter` + Unit: `s` + ### Notes + + Total CPU time consumed by the specific Pod on all available CPU cores + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_cpu_time() + :"k8s.pod.cpu.time" + + ### Erlang + + ```erlang + ?K8S_POD_CPU_TIME. + 'k8s.pod.cpu.time' + ``` + + + """ + + @spec k8s_pod_cpu_time :: :"k8s.pod.cpu.time" + def k8s_pod_cpu_time do + :"k8s.pod.cpu.time" + end + + @doc """ + Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs. + + Instrument: `gauge` + Unit: `{cpu}` + ### Notes + + CPU usage of the specific Pod on all available CPU cores, averaged over the sample window + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_cpu_usage() + :"k8s.pod.cpu.usage" + + ### Erlang + + ```erlang + ?K8S_POD_CPU_USAGE. + 'k8s.pod.cpu.usage' + ``` + + + """ + + @spec k8s_pod_cpu_usage :: :"k8s.pod.cpu.usage" + def k8s_pod_cpu_usage do + :"k8s.pod.cpu.usage" + end + + @doc """ + Pod filesystem available bytes. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [FsStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [PodStats.EphemeralStorage](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_filesystem_available() + :"k8s.pod.filesystem.available" + + ### Erlang + + ```erlang + ?K8S_POD_FILESYSTEM_AVAILABLE. + 'k8s.pod.filesystem.available' + ``` + + + """ + + @spec k8s_pod_filesystem_available :: :"k8s.pod.filesystem.available" + def k8s_pod_filesystem_available do + :"k8s.pod.filesystem.available" + end + + @doc """ + Pod filesystem capacity. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [FsStats.CapacityBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [PodStats.EphemeralStorage](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_filesystem_capacity() + :"k8s.pod.filesystem.capacity" + + ### Erlang + + ```erlang + ?K8S_POD_FILESYSTEM_CAPACITY. + 'k8s.pod.filesystem.capacity' + ``` + + + """ + + @spec k8s_pod_filesystem_capacity :: :"k8s.pod.filesystem.capacity" + def k8s_pod_filesystem_capacity do + :"k8s.pod.filesystem.capacity" + end + + @doc """ + Pod filesystem usage. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This may not equal capacity - available. + + This metric is derived from the + [FsStats.UsedBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#FsStats) field + of the [PodStats.EphemeralStorage](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) + of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_filesystem_usage() + :"k8s.pod.filesystem.usage" + + ### Erlang + + ```erlang + ?K8S_POD_FILESYSTEM_USAGE. + 'k8s.pod.filesystem.usage' + ``` + + + """ + + @spec k8s_pod_filesystem_usage :: :"k8s.pod.filesystem.usage" + def k8s_pod_filesystem_usage do + :"k8s.pod.filesystem.usage" + end + + @doc """ + Pod memory available. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + Available memory for use. This is defined as the memory limit - workingSetBytes. If memory limit is undefined, the available bytes is omitted. + This metric is derived from the [MemoryStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_memory_available() + :"k8s.pod.memory.available" + + ### Erlang + + ```erlang + ?K8S_POD_MEMORY_AVAILABLE. + 'k8s.pod.memory.available' + ``` + + + """ + + @spec k8s_pod_memory_available :: :"k8s.pod.memory.available" + def k8s_pod_memory_available do + :"k8s.pod.memory.available" + end + + @doc """ + Pod memory paging faults. + + Instrument: `counter` + Unit: `{fault}` + ### Notes + + Cumulative number of major/minor page faults. + This metric is derived from the [MemoryStats.PageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) and [MemoryStats.MajorPageFaults](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_memory_paging_faults() + :"k8s.pod.memory.paging.faults" + + ### Erlang + + ```erlang + ?K8S_POD_MEMORY_PAGING_FAULTS. + 'k8s.pod.memory.paging.faults' + ``` + + + """ + + @spec k8s_pod_memory_paging_faults :: :"k8s.pod.memory.paging.faults" + def k8s_pod_memory_paging_faults do + :"k8s.pod.memory.paging.faults" + end + + @doc """ + Pod memory RSS. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The amount of anonymous and swap cache memory (includes transparent hugepages). + This metric is derived from the [MemoryStats.RSSBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_memory_rss() + :"k8s.pod.memory.rss" + + ### Erlang + + ```erlang + ?K8S_POD_MEMORY_RSS. + 'k8s.pod.memory.rss' + ``` + + + """ + + @spec k8s_pod_memory_rss :: :"k8s.pod.memory.rss" + def k8s_pod_memory_rss do + :"k8s.pod.memory.rss" + end + + @doc """ + Memory usage of the Pod. + + Instrument: `gauge` + Unit: `By` + ### Notes + + Total memory usage of the Pod + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_memory_usage() + :"k8s.pod.memory.usage" + + ### Erlang + + ```erlang + ?K8S_POD_MEMORY_USAGE. + 'k8s.pod.memory.usage' + ``` + + + """ + + @spec k8s_pod_memory_usage :: :"k8s.pod.memory.usage" + def k8s_pod_memory_usage do + :"k8s.pod.memory.usage" + end + + @doc """ + Pod memory working set. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + The amount of working set memory. This includes recently accessed memory, dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes. + This metric is derived from the [MemoryStats.WorkingSetBytes](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#MemoryStats) field of the [PodStats.Memory](https://pkg.go.dev/k8s.io/kubelet@v0.34.0/pkg/apis/stats/v1alpha1#PodStats) of the Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_memory_working_set() + :"k8s.pod.memory.working_set" + + ### Erlang + + ```erlang + ?K8S_POD_MEMORY_WORKING_SET. + 'k8s.pod.memory.working_set' + ``` + + + """ + + @spec k8s_pod_memory_working_set :: :"k8s.pod.memory.working_set" + def k8s_pod_memory_working_set do + :"k8s.pod.memory.working_set" + end + + @doc """ + Pod network errors. + + Instrument: `counter` + Unit: `{error}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_network_errors() + :"k8s.pod.network.errors" + + ### Erlang + + ```erlang + ?K8S_POD_NETWORK_ERRORS. + 'k8s.pod.network.errors' + ``` + + + """ + + @spec k8s_pod_network_errors :: :"k8s.pod.network.errors" + def k8s_pod_network_errors do + :"k8s.pod.network.errors" + end + + @doc """ + Network bytes for the Pod. + + Instrument: `counter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_network_io() + :"k8s.pod.network.io" + + ### Erlang + + ```erlang + ?K8S_POD_NETWORK_IO. + 'k8s.pod.network.io' + ``` + + + """ + + @spec k8s_pod_network_io :: :"k8s.pod.network.io" + def k8s_pod_network_io do + :"k8s.pod.network.io" + end + + @doc """ + Describes number of K8s Pods that are currently in a given phase. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + All possible pod phases will be reported at each time interval to avoid missing metrics. + Only the value corresponding to the current phase will be non-zero. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_status_phase() + :"k8s.pod.status.phase" + + ### Erlang + + ```erlang + ?K8S_POD_STATUS_PHASE. + 'k8s.pod.status.phase' + ``` + + + """ + + @spec k8s_pod_status_phase :: :"k8s.pod.status.phase" + def k8s_pod_status_phase do + :"k8s.pod.status.phase" + end + + @doc """ + Describes the number of K8s Pods that are currently in a state for a given reason. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + All possible pod status reasons will be reported at each time interval to avoid missing metrics. + Only the value corresponding to the current reason will be non-zero. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_status_reason() + :"k8s.pod.status.reason" + + ### Erlang + + ```erlang + ?K8S_POD_STATUS_REASON. + 'k8s.pod.status.reason' + ``` + + + """ + + @spec k8s_pod_status_reason :: :"k8s.pod.status.reason" + def k8s_pod_status_reason do + :"k8s.pod.status.reason" + end + + @doc """ + The time the Pod has been running. + + Instrument: `gauge` + Unit: `s` + ### Notes + + Instrumentations **SHOULD** use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. + The actual accuracy would depend on the instrumentation and operating system. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_uptime() + :"k8s.pod.uptime" + + ### Erlang + + ```erlang + ?K8S_POD_UPTIME. + 'k8s.pod.uptime' + ``` + + + """ + + @spec k8s_pod_uptime :: :"k8s.pod.uptime" + def k8s_pod_uptime do + :"k8s.pod.uptime" + end + + @doc """ + Pod volume storage space available. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [VolumeStats.AvailableBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_available() + :"k8s.pod.volume.available" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_AVAILABLE. + 'k8s.pod.volume.available' + ``` + + + """ + + @spec k8s_pod_volume_available :: :"k8s.pod.volume.available" + def k8s_pod_volume_available do + :"k8s.pod.volume.available" + end + + @doc """ + Pod volume total capacity. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is derived from the + [VolumeStats.CapacityBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_capacity() + :"k8s.pod.volume.capacity" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_CAPACITY. + 'k8s.pod.volume.capacity' + ``` + + + """ + + @spec k8s_pod_volume_capacity :: :"k8s.pod.volume.capacity" + def k8s_pod_volume_capacity do + :"k8s.pod.volume.capacity" + end + + @doc """ + The total inodes in the filesystem of the Pod's volume. + + Instrument: `updowncounter` + Unit: `{inode}` + ### Notes + + This metric is derived from the + [VolumeStats.Inodes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_inode_count() + :"k8s.pod.volume.inode.count" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_INODE_COUNT. + 'k8s.pod.volume.inode.count' + ``` + + + """ + + @spec k8s_pod_volume_inode_count :: :"k8s.pod.volume.inode.count" + def k8s_pod_volume_inode_count do + :"k8s.pod.volume.inode.count" + end + + @doc """ + The free inodes in the filesystem of the Pod's volume. + + Instrument: `updowncounter` + Unit: `{inode}` + ### Notes + + This metric is derived from the + [VolumeStats.InodesFree](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_inode_free() + :"k8s.pod.volume.inode.free" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_INODE_FREE. + 'k8s.pod.volume.inode.free' + ``` + + + """ + + @spec k8s_pod_volume_inode_free :: :"k8s.pod.volume.inode.free" + def k8s_pod_volume_inode_free do + :"k8s.pod.volume.inode.free" + end + + @doc """ + The inodes used by the filesystem of the Pod's volume. + + Instrument: `updowncounter` + Unit: `{inode}` + ### Notes + + This metric is derived from the + [VolumeStats.InodesUsed](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + This may not be equal to `inodes - free` because filesystem may share inodes with other filesystems. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_inode_used() + :"k8s.pod.volume.inode.used" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_INODE_USED. + 'k8s.pod.volume.inode.used' + ``` + + + """ + + @spec k8s_pod_volume_inode_used :: :"k8s.pod.volume.inode.used" + def k8s_pod_volume_inode_used do + :"k8s.pod.volume.inode.used" + end + + @doc """ + Pod volume usage. + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This may not equal capacity - available. + + This metric is derived from the + [VolumeStats.UsedBytes](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#VolumeStats) field + of the [PodStats](https://pkg.go.dev/k8s.io/kubelet@v0.33.0/pkg/apis/stats/v1alpha1#PodStats) of the + Kubelet's stats API. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_pod_volume_usage() + :"k8s.pod.volume.usage" + + ### Erlang + + ```erlang + ?K8S_POD_VOLUME_USAGE. + 'k8s.pod.volume.usage' + ``` + + + """ + + @spec k8s_pod_volume_usage :: :"k8s.pod.volume.usage" + def k8s_pod_volume_usage do + :"k8s.pod.volume.usage" + end + + @deprecated """ + Replaced by `k8s.replicaset.pod.available`. + """ + + @spec k8s_replicaset_available_pods :: :"k8s.replicaset.available_pods" + def k8s_replicaset_available_pods do + :"k8s.replicaset.available_pods" + end + + @deprecated """ + Replaced by `k8s.replicaset.pod.desired`. + """ + + @spec k8s_replicaset_desired_pods :: :"k8s.replicaset.desired_pods" + def k8s_replicaset_desired_pods do + :"k8s.replicaset.desired_pods" + end + + @doc """ + Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `availableReplicas` field of the + [K8s ReplicaSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicaset_pod_available() + :"k8s.replicaset.pod.available" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_POD_AVAILABLE. + 'k8s.replicaset.pod.available' + ``` + + + """ + + @spec k8s_replicaset_pod_available :: :"k8s.replicaset.pod.available" + def k8s_replicaset_pod_available do + :"k8s.replicaset.pod.available" + end + + @doc """ + Number of desired replica pods in this replicaset. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `replicas` field of the + [K8s ReplicaSetSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicasetspec-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicaset_pod_desired() + :"k8s.replicaset.pod.desired" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_POD_DESIRED. + 'k8s.replicaset.pod.desired' + ``` + + + """ + + @spec k8s_replicaset_pod_desired :: :"k8s.replicaset.pod.desired" + def k8s_replicaset_pod_desired do + :"k8s.replicaset.pod.desired" + end + + @deprecated """ + Replaced by `k8s.replicationcontroller.pod.available`. + """ + + @spec k8s_replication_controller_available_pods :: :"k8s.replication_controller.available_pods" + def k8s_replication_controller_available_pods do + :"k8s.replication_controller.available_pods" + end + + @deprecated """ + Replaced by `k8s.replicationcontroller.pod.desired`. + """ + + @spec k8s_replication_controller_desired_pods :: :"k8s.replication_controller.desired_pods" + def k8s_replication_controller_desired_pods do + :"k8s.replication_controller.desired_pods" + end + + @deprecated """ + Replaced by `k8s.replicationcontroller.pod.available`. + """ + + @spec k8s_replicationcontroller_available_pods :: :"k8s.replicationcontroller.available_pods" + def k8s_replicationcontroller_available_pods do + :"k8s.replicationcontroller.available_pods" + end + + @deprecated """ + Replaced by `k8s.replicationcontroller.pod.desired`. + """ + + @spec k8s_replicationcontroller_desired_pods :: :"k8s.replicationcontroller.desired_pods" + def k8s_replicationcontroller_desired_pods do + :"k8s.replicationcontroller.desired_pods" + end + + @doc """ + Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `availableReplicas` field of the + [K8s ReplicationControllerStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerstatus-v1-core) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicationcontroller_pod_available() + :"k8s.replicationcontroller.pod.available" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_POD_AVAILABLE. + 'k8s.replicationcontroller.pod.available' + ``` + + + """ + + @spec k8s_replicationcontroller_pod_available :: :"k8s.replicationcontroller.pod.available" + def k8s_replicationcontroller_pod_available do + :"k8s.replicationcontroller.pod.available" + end + + @doc """ + Number of desired replica pods in this replication controller. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `replicas` field of the + [K8s ReplicationControllerSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#replicationcontrollerspec-v1-core) + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicationcontroller_pod_desired() + :"k8s.replicationcontroller.pod.desired" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_POD_DESIRED. + 'k8s.replicationcontroller.pod.desired' + ``` + + + """ + + @spec k8s_replicationcontroller_pod_desired :: :"k8s.replicationcontroller.pod.desired" + def k8s_replicationcontroller_pod_desired do + :"k8s.replicationcontroller.pod.desired" + end + + @doc """ + The CPU limits in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_cpu_limit_hard() + :"k8s.resourcequota.cpu.limit.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_CPU_LIMIT_HARD. + 'k8s.resourcequota.cpu.limit.hard' + ``` + + + """ + + @spec k8s_resourcequota_cpu_limit_hard :: :"k8s.resourcequota.cpu.limit.hard" + def k8s_resourcequota_cpu_limit_hard do + :"k8s.resourcequota.cpu.limit.hard" + end + + @doc """ + The CPU limits in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_cpu_limit_used() + :"k8s.resourcequota.cpu.limit.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_CPU_LIMIT_USED. + 'k8s.resourcequota.cpu.limit.used' + ``` + + + """ + + @spec k8s_resourcequota_cpu_limit_used :: :"k8s.resourcequota.cpu.limit.used" + def k8s_resourcequota_cpu_limit_used do + :"k8s.resourcequota.cpu.limit.used" + end + + @doc """ + The CPU requests in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_cpu_request_hard() + :"k8s.resourcequota.cpu.request.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_CPU_REQUEST_HARD. + 'k8s.resourcequota.cpu.request.hard' + ``` + + + """ + + @spec k8s_resourcequota_cpu_request_hard :: :"k8s.resourcequota.cpu.request.hard" + def k8s_resourcequota_cpu_request_hard do + :"k8s.resourcequota.cpu.request.hard" + end + + @doc """ + The CPU requests in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_cpu_request_used() + :"k8s.resourcequota.cpu.request.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_CPU_REQUEST_USED. + 'k8s.resourcequota.cpu.request.used' + ``` + + + """ + + @spec k8s_resourcequota_cpu_request_used :: :"k8s.resourcequota.cpu.request.used" + def k8s_resourcequota_cpu_request_used do + :"k8s.resourcequota.cpu.request.used" + end + + @doc """ + The sum of local ephemeral storage limits in the namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_ephemeral_storage_limit_hard() + :"k8s.resourcequota.ephemeral_storage.limit.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD. + 'k8s.resourcequota.ephemeral_storage.limit.hard' + ``` + + + """ + + @spec k8s_resourcequota_ephemeral_storage_limit_hard :: + :"k8s.resourcequota.ephemeral_storage.limit.hard" + def k8s_resourcequota_ephemeral_storage_limit_hard do + :"k8s.resourcequota.ephemeral_storage.limit.hard" + end + + @doc """ + The sum of local ephemeral storage limits in the namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_ephemeral_storage_limit_used() + :"k8s.resourcequota.ephemeral_storage.limit.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_USED. + 'k8s.resourcequota.ephemeral_storage.limit.used' + ``` + + + """ + + @spec k8s_resourcequota_ephemeral_storage_limit_used :: + :"k8s.resourcequota.ephemeral_storage.limit.used" + def k8s_resourcequota_ephemeral_storage_limit_used do + :"k8s.resourcequota.ephemeral_storage.limit.used" + end + + @doc """ + The sum of local ephemeral storage requests in the namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_ephemeral_storage_request_hard() + :"k8s.resourcequota.ephemeral_storage.request.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD. + 'k8s.resourcequota.ephemeral_storage.request.hard' + ``` + + + """ + + @spec k8s_resourcequota_ephemeral_storage_request_hard :: + :"k8s.resourcequota.ephemeral_storage.request.hard" + def k8s_resourcequota_ephemeral_storage_request_hard do + :"k8s.resourcequota.ephemeral_storage.request.hard" + end + + @doc """ + The sum of local ephemeral storage requests in the namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_ephemeral_storage_request_used() + :"k8s.resourcequota.ephemeral_storage.request.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_USED. + 'k8s.resourcequota.ephemeral_storage.request.used' + ``` + + + """ + + @spec k8s_resourcequota_ephemeral_storage_request_used :: + :"k8s.resourcequota.ephemeral_storage.request.used" + def k8s_resourcequota_ephemeral_storage_request_used do + :"k8s.resourcequota.ephemeral_storage.request.used" + end + + @doc """ + The huge page requests in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{hugepage}` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_hugepage_count_request_hard() + :"k8s.resourcequota.hugepage_count.request.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_HARD. + 'k8s.resourcequota.hugepage_count.request.hard' + ``` + + + """ + + @spec k8s_resourcequota_hugepage_count_request_hard :: + :"k8s.resourcequota.hugepage_count.request.hard" + def k8s_resourcequota_hugepage_count_request_hard do + :"k8s.resourcequota.hugepage_count.request.hard" + end + + @doc """ + The huge page requests in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{hugepage}` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_hugepage_count_request_used() + :"k8s.resourcequota.hugepage_count.request.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_USED. + 'k8s.resourcequota.hugepage_count.request.used' + ``` + + + """ + + @spec k8s_resourcequota_hugepage_count_request_used :: + :"k8s.resourcequota.hugepage_count.request.used" + def k8s_resourcequota_hugepage_count_request_used do + :"k8s.resourcequota.hugepage_count.request.used" + end + + @doc """ + The memory limits in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_memory_limit_hard() + :"k8s.resourcequota.memory.limit.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_MEMORY_LIMIT_HARD. + 'k8s.resourcequota.memory.limit.hard' + ``` + + + """ + + @spec k8s_resourcequota_memory_limit_hard :: :"k8s.resourcequota.memory.limit.hard" + def k8s_resourcequota_memory_limit_hard do + :"k8s.resourcequota.memory.limit.hard" + end + + @doc """ + The memory limits in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_memory_limit_used() + :"k8s.resourcequota.memory.limit.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_MEMORY_LIMIT_USED. + 'k8s.resourcequota.memory.limit.used' + ``` + + + """ + + @spec k8s_resourcequota_memory_limit_used :: :"k8s.resourcequota.memory.limit.used" + def k8s_resourcequota_memory_limit_used do + :"k8s.resourcequota.memory.limit.used" + end + + @doc """ + The memory requests in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_memory_request_hard() + :"k8s.resourcequota.memory.request.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_MEMORY_REQUEST_HARD. + 'k8s.resourcequota.memory.request.hard' + ``` + + + """ + + @spec k8s_resourcequota_memory_request_hard :: :"k8s.resourcequota.memory.request.hard" + def k8s_resourcequota_memory_request_hard do + :"k8s.resourcequota.memory.request.hard" + end + + @doc """ + The memory requests in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_memory_request_used() + :"k8s.resourcequota.memory.request.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_MEMORY_REQUEST_USED. + 'k8s.resourcequota.memory.request.used' + ``` + + + """ + + @spec k8s_resourcequota_memory_request_used :: :"k8s.resourcequota.memory.request.used" + def k8s_resourcequota_memory_request_used do + :"k8s.resourcequota.memory.request.used" + end + + @doc """ + The object count limits in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{object}` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_object_count_hard() + :"k8s.resourcequota.object_count.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_OBJECT_COUNT_HARD. + 'k8s.resourcequota.object_count.hard' + ``` + + + """ + + @spec k8s_resourcequota_object_count_hard :: :"k8s.resourcequota.object_count.hard" + def k8s_resourcequota_object_count_hard do + :"k8s.resourcequota.object_count.hard" + end + + @doc """ + The object count limits in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{object}` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_object_count_used() + :"k8s.resourcequota.object_count.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_OBJECT_COUNT_USED. + 'k8s.resourcequota.object_count.used' + ``` + + + """ + + @spec k8s_resourcequota_object_count_used :: :"k8s.resourcequota.object_count.used" + def k8s_resourcequota_object_count_used do + :"k8s.resourcequota.object_count.used" + end + + @doc """ + The total number of PersistentVolumeClaims that can exist in the namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{persistentvolumeclaim}` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_persistentvolumeclaim_count_hard() + :"k8s.resourcequota.persistentvolumeclaim_count.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD. + 'k8s.resourcequota.persistentvolumeclaim_count.hard' + ``` + + + """ + + @spec k8s_resourcequota_persistentvolumeclaim_count_hard :: + :"k8s.resourcequota.persistentvolumeclaim_count.hard" + def k8s_resourcequota_persistentvolumeclaim_count_hard do + :"k8s.resourcequota.persistentvolumeclaim_count.hard" + end + + @doc """ + The total number of PersistentVolumeClaims that can exist in the namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `{persistentvolumeclaim}` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_persistentvolumeclaim_count_used() + :"k8s.resourcequota.persistentvolumeclaim_count.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED. + 'k8s.resourcequota.persistentvolumeclaim_count.used' + ``` + + + """ + + @spec k8s_resourcequota_persistentvolumeclaim_count_used :: + :"k8s.resourcequota.persistentvolumeclaim_count.used" + def k8s_resourcequota_persistentvolumeclaim_count_used do + :"k8s.resourcequota.persistentvolumeclaim_count.used" + end + + @doc """ + The storage requests in a specific namespace. + The value represents the configured quota limit of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_storage_request_hard() + :"k8s.resourcequota.storage.request.hard" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_STORAGE_REQUEST_HARD. + 'k8s.resourcequota.storage.request.hard' + ``` + + + """ + + @spec k8s_resourcequota_storage_request_hard :: :"k8s.resourcequota.storage.request.hard" + def k8s_resourcequota_storage_request_hard do + :"k8s.resourcequota.storage.request.hard" + end + + @doc """ + The storage requests in a specific namespace. + The value represents the current observed total usage of the resource in the namespace. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_resourcequota_storage_request_used() + :"k8s.resourcequota.storage.request.used" + + ### Erlang + + ```erlang + ?K8S_RESOURCEQUOTA_STORAGE_REQUEST_USED. + 'k8s.resourcequota.storage.request.used' + ``` + + + """ + + @spec k8s_resourcequota_storage_request_used :: :"k8s.resourcequota.storage.request.used" + def k8s_resourcequota_storage_request_used do + :"k8s.resourcequota.storage.request.used" + end + + @doc """ + Number of endpoints for a service by condition and address type. + + Instrument: `gauge` + Unit: `{endpoint}` + ### Notes + + This metric is derived from the Kubernetes [EndpointSlice API](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/). + It reports the number of network endpoints backing a Service, broken down by their condition and address type. + + In dual-stack or multi-protocol clusters, separate counts are reported for each address family (`IPv4`, `IPv6`, `FQDN`). + + When the optional `zone` attribute is enabled, counts are further broken down by availability zone for zone-aware monitoring. + + An endpoint may be reported under multiple conditions simultaneously (e.g., both `serving` and `terminating` during a graceful shutdown). + See [K8s EndpointConditions](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/) for more details. + + The conditions represent: + - `ready`: Endpoints capable of receiving new connections. + - `serving`: Endpoints currently handling traffic. + - `terminating`: Endpoints that are being phased out but may still be handling existing connections. + + For Services with `publishNotReadyAddresses` enabled (common for headless StatefulSets), + this metric will include endpoints that are published despite not being ready. + The `k8s.service.publish_not_ready_addresses` resource attribute indicates this setting. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_service_endpoint_count() + :"k8s.service.endpoint.count" + + ### Erlang + + ```erlang + ?K8S_SERVICE_ENDPOINT_COUNT. + 'k8s.service.endpoint.count' + ``` + + + """ + + @spec k8s_service_endpoint_count :: :"k8s.service.endpoint.count" + def k8s_service_endpoint_count do + :"k8s.service.endpoint.count" + end + + @doc """ + Number of load balancer ingress points (external IPs/hostnames) assigned to the service. + + Instrument: `gauge` + Unit: `{ingress}` + ### Notes + + This metric reports the number of external ingress points (IP addresses or hostnames) + assigned to a LoadBalancer Service. + + It is only emitted for Services of type `LoadBalancer` and reflects the assignments + made by the underlying infrastructure's load balancer controller in the + [.status.loadBalancer.ingress](https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceStatus) field. + + A value of `0` indicates that no ingress points have been assigned yet (e.g., during provisioning). + A value greater than `1` may occur when multiple IPs or hostnames are assigned (e.g., dual-stack configurations). + + This metric signals that external endpoints have been assigned by the load balancer controller, but it does not + guarantee that the load balancer is healthy. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_service_load_balancer_ingress_count() + :"k8s.service.load_balancer.ingress.count" + + ### Erlang + + ```erlang + ?K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT. + 'k8s.service.load_balancer.ingress.count' + ``` + + + """ + + @spec k8s_service_load_balancer_ingress_count :: :"k8s.service.load_balancer.ingress.count" + def k8s_service_load_balancer_ingress_count do + :"k8s.service.load_balancer.ingress.count" + end + + @deprecated """ + Replaced by `k8s.statefulset.pod.current`. + """ + + @spec k8s_statefulset_current_pods :: :"k8s.statefulset.current_pods" + def k8s_statefulset_current_pods do + :"k8s.statefulset.current_pods" + end + + @deprecated """ + Replaced by `k8s.statefulset.pod.desired`. + """ + + @spec k8s_statefulset_desired_pods :: :"k8s.statefulset.desired_pods" + def k8s_statefulset_desired_pods do + :"k8s.statefulset.desired_pods" + end + + @doc """ + The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `currentReplicas` field of the + [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_pod_current() + :"k8s.statefulset.pod.current" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_POD_CURRENT. + 'k8s.statefulset.pod.current' + ``` + + + """ + + @spec k8s_statefulset_pod_current :: :"k8s.statefulset.pod.current" + def k8s_statefulset_pod_current do + :"k8s.statefulset.pod.current" + end + + @doc """ + Number of desired replica pods in this statefulset. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `replicas` field of the + [K8s StatefulSetSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetspec-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_pod_desired() + :"k8s.statefulset.pod.desired" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_POD_DESIRED. + 'k8s.statefulset.pod.desired' + ``` + + + """ + + @spec k8s_statefulset_pod_desired :: :"k8s.statefulset.pod.desired" + def k8s_statefulset_pod_desired do + :"k8s.statefulset.pod.desired" + end + + @doc """ + The number of replica pods created for this statefulset with a Ready Condition. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `readyReplicas` field of the + [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_pod_ready() + :"k8s.statefulset.pod.ready" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_POD_READY. + 'k8s.statefulset.pod.ready' + ``` + + + """ + + @spec k8s_statefulset_pod_ready :: :"k8s.statefulset.pod.ready" + def k8s_statefulset_pod_ready do + :"k8s.statefulset.pod.ready" + end + + @doc """ + Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision. + + Instrument: `updowncounter` + Unit: `{pod}` + ### Notes + + This metric aligns with the `updatedReplicas` field of the + [K8s StatefulSetStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#statefulsetstatus-v1-apps). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_pod_updated() + :"k8s.statefulset.pod.updated" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_POD_UPDATED. + 'k8s.statefulset.pod.updated' + ``` + + + """ + + @spec k8s_statefulset_pod_updated :: :"k8s.statefulset.pod.updated" + def k8s_statefulset_pod_updated do + :"k8s.statefulset.pod.updated" + end + + @deprecated """ + Replaced by `k8s.statefulset.pod.ready`. + """ + + @spec k8s_statefulset_ready_pods :: :"k8s.statefulset.ready_pods" + def k8s_statefulset_ready_pods do + :"k8s.statefulset.ready_pods" + end + + @deprecated """ + Replaced by `k8s.statefulset.pod.updated`. + """ + + @spec k8s_statefulset_updated_pods :: :"k8s.statefulset.updated_pods" + def k8s_statefulset_updated_pods do + :"k8s.statefulset.updated_pods" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/mcp_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/mcp_metrics.ex new file mode 100644 index 000000000..1547f479a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/mcp_metrics.ex @@ -0,0 +1,115 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.McpMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Mcp metrics. + """ + @doc """ + The duration of the MCP request or notification as observed on the sender from the time it was sent until the response or ack is received. + + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.McpMetrics.mcp_client_operation_duration() + :"mcp.client.operation.duration" + + ### Erlang + + ```erlang + ?MCP_CLIENT_OPERATION_DURATION. + 'mcp.client.operation.duration' + ``` + + + """ + + @spec mcp_client_operation_duration :: :"mcp.client.operation.duration" + def mcp_client_operation_duration do + :"mcp.client.operation.duration" + end + + @doc """ + The duration of the MCP session as observed on the MCP client. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.McpMetrics.mcp_client_session_duration() + :"mcp.client.session.duration" + + ### Erlang + + ```erlang + ?MCP_CLIENT_SESSION_DURATION. + 'mcp.client.session.duration' + ``` + + + """ + + @spec mcp_client_session_duration :: :"mcp.client.session.duration" + def mcp_client_session_duration do + :"mcp.client.session.duration" + end + + @doc """ + MCP request or notification duration as observed on the receiver from the time it was received until the result or ack is sent. + + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.McpMetrics.mcp_server_operation_duration() + :"mcp.server.operation.duration" + + ### Erlang + + ```erlang + ?MCP_SERVER_OPERATION_DURATION. + 'mcp.server.operation.duration' + ``` + + + """ + + @spec mcp_server_operation_duration :: :"mcp.server.operation.duration" + def mcp_server_operation_duration do + :"mcp.server.operation.duration" + end + + @doc """ + The duration of the MCP session as observed on the MCP server. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.McpMetrics.mcp_server_session_duration() + :"mcp.server.session.duration" + + ### Erlang + + ```erlang + ?MCP_SERVER_SESSION_DURATION. + 'mcp.server.session.duration' + ``` + + + """ + + @spec mcp_server_session_duration :: :"mcp.server.session.duration" + def mcp_server_session_duration do + :"mcp.server.session.duration" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex index e672e67e8..d93f85142 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex @@ -66,35 +66,44 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics do :"messaging.client.operation.duration" end + @deprecated """ + Replaced by `messaging.client.sent.messages`. + """ + + @spec messaging_client_published_messages :: :"messaging.client.published.messages" + def messaging_client_published_messages do + :"messaging.client.published.messages" + end + @doc """ - Number of messages producer attempted to publish to the broker. + Number of messages producer attempted to send to the broker. Instrument: `counter` Unit: `{message}` ### Notes - This metric **MUST** **NOT** count messages that were created haven't yet been attempted to be published. + This metric **MUST** **NOT** count messages that were created but haven't yet been sent. ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_client_published_messages() - :"messaging.client.published.messages" + iex> OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics.messaging_client_sent_messages() + :"messaging.client.sent.messages" ### Erlang ```erlang - ?MESSAGING_CLIENT_PUBLISHED_MESSAGES. - 'messaging.client.published.messages' + ?MESSAGING_CLIENT_SENT_MESSAGES. + 'messaging.client.sent.messages' ``` """ - @spec messaging_client_published_messages :: :"messaging.client.published.messages" - def messaging_client_published_messages do - :"messaging.client.published.messages" + @spec messaging_client_sent_messages :: :"messaging.client.sent.messages" + def messaging_client_sent_messages do + :"messaging.client.sent.messages" end @doc """ @@ -147,7 +156,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.MessagingMetrics do end @deprecated """ - Replaced by `messaging.client.produced.messages`. + Replaced by `messaging.client.sent.messages`. """ @spec messaging_publish_messages :: :"messaging.publish.messages" diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/nfs_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/nfs_metrics.ex new file mode 100644 index 000000000..08941cd0a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/nfs_metrics.ex @@ -0,0 +1,482 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Nfs metrics. + """ + @doc """ + Reports the count of kernel NFS client TCP segments and UDP datagrams handled. + + Instrument: `counter` + Unit: `{record}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.netudpcnt and svc_stat.nettcpcnt + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_net_count() + :"nfs.client.net.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_NET_COUNT. + 'nfs.client.net.count' + ``` + + + """ + + @spec nfs_client_net_count :: :"nfs.client.net.count" + def nfs_client_net_count do + :"nfs.client.net.count" + end + + @doc """ + Reports the count of kernel NFS client TCP connections accepted. + + Instrument: `counter` + Unit: `{connection}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_net_tcp_connection_accepted() + :"nfs.client.net.tcp.connection.accepted" + + ### Erlang + + ```erlang + ?NFS_CLIENT_NET_TCP_CONNECTION_ACCEPTED. + 'nfs.client.net.tcp.connection.accepted' + ``` + + + """ + + @spec nfs_client_net_tcp_connection_accepted :: :"nfs.client.net.tcp.connection.accepted" + def nfs_client_net_tcp_connection_accepted do + :"nfs.client.net.tcp.connection.accepted" + end + + @doc """ + Reports the count of kernel NFSv4+ client operations. + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_operation_count() + :"nfs.client.operation.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_OPERATION_COUNT. + 'nfs.client.operation.count' + ``` + + + """ + + @spec nfs_client_operation_count :: :"nfs.client.operation.count" + def nfs_client_operation_count do + :"nfs.client.operation.count" + end + + @doc """ + Reports the count of kernel NFS client procedures. + + Instrument: `counter` + Unit: `{procedure}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_procedure_count() + :"nfs.client.procedure.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_PROCEDURE_COUNT. + 'nfs.client.procedure.count' + ``` + + + """ + + @spec nfs_client_procedure_count :: :"nfs.client.procedure.count" + def nfs_client_procedure_count do + :"nfs.client.procedure.count" + end + + @doc """ + Reports the count of kernel NFS client RPC authentication refreshes. + + Instrument: `counter` + Unit: `{authrefresh}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.rpcauthrefresh + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_rpc_authrefresh_count() + :"nfs.client.rpc.authrefresh.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_RPC_AUTHREFRESH_COUNT. + 'nfs.client.rpc.authrefresh.count' + ``` + + + """ + + @spec nfs_client_rpc_authrefresh_count :: :"nfs.client.rpc.authrefresh.count" + def nfs_client_rpc_authrefresh_count do + :"nfs.client.rpc.authrefresh.count" + end + + @doc """ + Reports the count of kernel NFS client RPCs sent, regardless of whether they're accepted/rejected by the server. + + Instrument: `counter` + Unit: `{request}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.rpccnt + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_rpc_count() + :"nfs.client.rpc.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_RPC_COUNT. + 'nfs.client.rpc.count' + ``` + + + """ + + @spec nfs_client_rpc_count :: :"nfs.client.rpc.count" + def nfs_client_rpc_count do + :"nfs.client.rpc.count" + end + + @doc """ + Reports the count of kernel NFS client RPC retransmits. + + Instrument: `counter` + Unit: `{retransmit}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.rpcretrans + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_client_rpc_retransmit_count() + :"nfs.client.rpc.retransmit.count" + + ### Erlang + + ```erlang + ?NFS_CLIENT_RPC_RETRANSMIT_COUNT. + 'nfs.client.rpc.retransmit.count' + ``` + + + """ + + @spec nfs_client_rpc_retransmit_count :: :"nfs.client.rpc.retransmit.count" + def nfs_client_rpc_retransmit_count do + :"nfs.client.rpc.retransmit.count" + end + + @doc """ + Reports the count of kernel NFS server stale file handles. + + Instrument: `counter` + Unit: `{fh}` + ### Notes + + Linux: this metric is taken from the Linux kernel NFSD_STATS_FH_STALE counter in the nfsd_net struct + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_fh_stale_count() + :"nfs.server.fh.stale.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_FH_STALE_COUNT. + 'nfs.server.fh.stale.count' + ``` + + + """ + + @spec nfs_server_fh_stale_count :: :"nfs.server.fh.stale.count" + def nfs_server_fh_stale_count do + :"nfs.server.fh.stale.count" + end + + @doc """ + Reports the count of kernel NFS server bytes returned to receive and transmit (read and write) requests. + + Instrument: `counter` + Unit: `By` + ### Notes + + Linux: this metric is taken from the Linux kernel NFSD_STATS_IO_READ and NFSD_STATS_IO_WRITE counters in the nfsd_net struct + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_io() + :"nfs.server.io" + + ### Erlang + + ```erlang + ?NFS_SERVER_IO. + 'nfs.server.io' + ``` + + + """ + + @spec nfs_server_io :: :"nfs.server.io" + def nfs_server_io do + :"nfs.server.io" + end + + @doc """ + Reports the count of kernel NFS server TCP segments and UDP datagrams handled. + + Instrument: `counter` + Unit: `{record}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.nettcpcnt and svc_stat.netudpcnt + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_net_count() + :"nfs.server.net.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_NET_COUNT. + 'nfs.server.net.count' + ``` + + + """ + + @spec nfs_server_net_count :: :"nfs.server.net.count" + def nfs_server_net_count do + :"nfs.server.net.count" + end + + @doc """ + Reports the count of kernel NFS server TCP connections accepted. + + Instrument: `counter` + Unit: `{connection}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.nettcpconn + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_net_tcp_connection_accepted() + :"nfs.server.net.tcp.connection.accepted" + + ### Erlang + + ```erlang + ?NFS_SERVER_NET_TCP_CONNECTION_ACCEPTED. + 'nfs.server.net.tcp.connection.accepted' + ``` + + + """ + + @spec nfs_server_net_tcp_connection_accepted :: :"nfs.server.net.tcp.connection.accepted" + def nfs_server_net_tcp_connection_accepted do + :"nfs.server.net.tcp.connection.accepted" + end + + @doc """ + Reports the count of kernel NFSv4+ server operations. + + Instrument: `counter` + Unit: `{operation}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_operation_count() + :"nfs.server.operation.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_OPERATION_COUNT. + 'nfs.server.operation.count' + ``` + + + """ + + @spec nfs_server_operation_count :: :"nfs.server.operation.count" + def nfs_server_operation_count do + :"nfs.server.operation.count" + end + + @doc """ + Reports the count of kernel NFS server procedures. + + Instrument: `counter` + Unit: `{procedure}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_procedure_count() + :"nfs.server.procedure.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_PROCEDURE_COUNT. + 'nfs.server.procedure.count' + ``` + + + """ + + @spec nfs_server_procedure_count :: :"nfs.server.procedure.count" + def nfs_server_procedure_count do + :"nfs.server.procedure.count" + end + + @doc """ + Reports the kernel NFS server reply cache request count by cache hit status. + + Instrument: `counter` + Unit: `{request}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_repcache_requests() + :"nfs.server.repcache.requests" + + ### Erlang + + ```erlang + ?NFS_SERVER_REPCACHE_REQUESTS. + 'nfs.server.repcache.requests' + ``` + + + """ + + @spec nfs_server_repcache_requests :: :"nfs.server.repcache.requests" + def nfs_server_repcache_requests do + :"nfs.server.repcache.requests" + end + + @doc """ + Reports the count of kernel NFS server RPCs handled. + + Instrument: `counter` + Unit: `{request}` + ### Notes + + Linux: this metric is taken from the Linux kernel's svc_stat.rpccnt, the count of good RPCs. This metric can have + an error.type of "format", "auth", or "client" for svc_stat.badfmt, svc_stat.badauth, and svc_stat.badclnt. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_rpc_count() + :"nfs.server.rpc.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_RPC_COUNT. + 'nfs.server.rpc.count' + ``` + + + """ + + @spec nfs_server_rpc_count :: :"nfs.server.rpc.count" + def nfs_server_rpc_count do + :"nfs.server.rpc.count" + end + + @doc """ + Reports the count of kernel NFS server available threads. + + Instrument: `updowncounter` + Unit: `{thread}` + ### Notes + + Linux: this metric is taken from the Linux kernel nfsd_th_cnt variable + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.NfsMetrics.nfs_server_thread_count() + :"nfs.server.thread.count" + + ### Erlang + + ```erlang + ?NFS_SERVER_THREAD_COUNT. + 'nfs.server.thread.count' + ``` + + + """ + + @spec nfs_server_thread_count :: :"nfs.server.thread.count" + def nfs_server_thread_count do + :"nfs.server.thread.count" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/openshift_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/openshift_metrics.ex new file mode 100644 index 000000000..6ccbca474 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/openshift_metrics.ex @@ -0,0 +1,729 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Openshift metrics. + """ + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_cpu_limit_hard() + :"openshift.clusterquota.cpu.limit.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_HARD. + 'openshift.clusterquota.cpu.limit.hard' + ``` + + + """ + + @spec openshift_clusterquota_cpu_limit_hard :: :"openshift.clusterquota.cpu.limit.hard" + def openshift_clusterquota_cpu_limit_hard do + :"openshift.clusterquota.cpu.limit.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_cpu_limit_used() + :"openshift.clusterquota.cpu.limit.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_USED. + 'openshift.clusterquota.cpu.limit.used' + ``` + + + """ + + @spec openshift_clusterquota_cpu_limit_used :: :"openshift.clusterquota.cpu.limit.used" + def openshift_clusterquota_cpu_limit_used do + :"openshift.clusterquota.cpu.limit.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_cpu_request_hard() + :"openshift.clusterquota.cpu.request.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_HARD. + 'openshift.clusterquota.cpu.request.hard' + ``` + + + """ + + @spec openshift_clusterquota_cpu_request_hard :: :"openshift.clusterquota.cpu.request.hard" + def openshift_clusterquota_cpu_request_hard do + :"openshift.clusterquota.cpu.request.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{cpu}` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_cpu_request_used() + :"openshift.clusterquota.cpu.request.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_USED. + 'openshift.clusterquota.cpu.request.used' + ``` + + + """ + + @spec openshift_clusterquota_cpu_request_used :: :"openshift.clusterquota.cpu.request.used" + def openshift_clusterquota_cpu_request_used do + :"openshift.clusterquota.cpu.request.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_ephemeral_storage_limit_hard() + :"openshift.clusterquota.ephemeral_storage.limit.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD. + 'openshift.clusterquota.ephemeral_storage.limit.hard' + ``` + + + """ + + @spec openshift_clusterquota_ephemeral_storage_limit_hard :: + :"openshift.clusterquota.ephemeral_storage.limit.hard" + def openshift_clusterquota_ephemeral_storage_limit_hard do + :"openshift.clusterquota.ephemeral_storage.limit.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_ephemeral_storage_limit_used() + :"openshift.clusterquota.ephemeral_storage.limit.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_USED. + 'openshift.clusterquota.ephemeral_storage.limit.used' + ``` + + + """ + + @spec openshift_clusterquota_ephemeral_storage_limit_used :: + :"openshift.clusterquota.ephemeral_storage.limit.used" + def openshift_clusterquota_ephemeral_storage_limit_used do + :"openshift.clusterquota.ephemeral_storage.limit.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_ephemeral_storage_request_hard() + :"openshift.clusterquota.ephemeral_storage.request.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD. + 'openshift.clusterquota.ephemeral_storage.request.hard' + ``` + + + """ + + @spec openshift_clusterquota_ephemeral_storage_request_hard :: + :"openshift.clusterquota.ephemeral_storage.request.hard" + def openshift_clusterquota_ephemeral_storage_request_hard do + :"openshift.clusterquota.ephemeral_storage.request.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_ephemeral_storage_request_used() + :"openshift.clusterquota.ephemeral_storage.request.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_USED. + 'openshift.clusterquota.ephemeral_storage.request.used' + ``` + + + """ + + @spec openshift_clusterquota_ephemeral_storage_request_used :: + :"openshift.clusterquota.ephemeral_storage.request.used" + def openshift_clusterquota_ephemeral_storage_request_used do + :"openshift.clusterquota.ephemeral_storage.request.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{hugepage}` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_hugepage_count_request_hard() + :"openshift.clusterquota.hugepage_count.request.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_HARD. + 'openshift.clusterquota.hugepage_count.request.hard' + ``` + + + """ + + @spec openshift_clusterquota_hugepage_count_request_hard :: + :"openshift.clusterquota.hugepage_count.request.hard" + def openshift_clusterquota_hugepage_count_request_hard do + :"openshift.clusterquota.hugepage_count.request.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{hugepage}` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_hugepage_count_request_used() + :"openshift.clusterquota.hugepage_count.request.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_USED. + 'openshift.clusterquota.hugepage_count.request.used' + ``` + + + """ + + @spec openshift_clusterquota_hugepage_count_request_used :: + :"openshift.clusterquota.hugepage_count.request.used" + def openshift_clusterquota_hugepage_count_request_used do + :"openshift.clusterquota.hugepage_count.request.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_memory_limit_hard() + :"openshift.clusterquota.memory.limit.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_HARD. + 'openshift.clusterquota.memory.limit.hard' + ``` + + + """ + + @spec openshift_clusterquota_memory_limit_hard :: :"openshift.clusterquota.memory.limit.hard" + def openshift_clusterquota_memory_limit_hard do + :"openshift.clusterquota.memory.limit.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_memory_limit_used() + :"openshift.clusterquota.memory.limit.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_USED. + 'openshift.clusterquota.memory.limit.used' + ``` + + + """ + + @spec openshift_clusterquota_memory_limit_used :: :"openshift.clusterquota.memory.limit.used" + def openshift_clusterquota_memory_limit_used do + :"openshift.clusterquota.memory.limit.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_memory_request_hard() + :"openshift.clusterquota.memory.request.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_HARD. + 'openshift.clusterquota.memory.request.hard' + ``` + + + """ + + @spec openshift_clusterquota_memory_request_hard :: + :"openshift.clusterquota.memory.request.hard" + def openshift_clusterquota_memory_request_hard do + :"openshift.clusterquota.memory.request.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_memory_request_used() + :"openshift.clusterquota.memory.request.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_USED. + 'openshift.clusterquota.memory.request.used' + ``` + + + """ + + @spec openshift_clusterquota_memory_request_used :: + :"openshift.clusterquota.memory.request.used" + def openshift_clusterquota_memory_request_used do + :"openshift.clusterquota.memory.request.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{object}` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_object_count_hard() + :"openshift.clusterquota.object_count.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_HARD. + 'openshift.clusterquota.object_count.hard' + ``` + + + """ + + @spec openshift_clusterquota_object_count_hard :: :"openshift.clusterquota.object_count.hard" + def openshift_clusterquota_object_count_hard do + :"openshift.clusterquota.object_count.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{object}` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_object_count_used() + :"openshift.clusterquota.object_count.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_USED. + 'openshift.clusterquota.object_count.used' + ``` + + + """ + + @spec openshift_clusterquota_object_count_used :: :"openshift.clusterquota.object_count.used" + def openshift_clusterquota_object_count_used do + :"openshift.clusterquota.object_count.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{persistentvolumeclaim}` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_persistentvolumeclaim_count_hard() + :"openshift.clusterquota.persistentvolumeclaim_count.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD. + 'openshift.clusterquota.persistentvolumeclaim_count.hard' + ``` + + + """ + + @spec openshift_clusterquota_persistentvolumeclaim_count_hard :: + :"openshift.clusterquota.persistentvolumeclaim_count.hard" + def openshift_clusterquota_persistentvolumeclaim_count_hard do + :"openshift.clusterquota.persistentvolumeclaim_count.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `{persistentvolumeclaim}` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_persistentvolumeclaim_count_used() + :"openshift.clusterquota.persistentvolumeclaim_count.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED. + 'openshift.clusterquota.persistentvolumeclaim_count.used' + ``` + + + """ + + @spec openshift_clusterquota_persistentvolumeclaim_count_used :: + :"openshift.clusterquota.persistentvolumeclaim_count.used" + def openshift_clusterquota_persistentvolumeclaim_count_used do + :"openshift.clusterquota.persistentvolumeclaim_count.used" + end + + @doc """ + The enforced hard limit of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Hard` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_storage_request_hard() + :"openshift.clusterquota.storage.request.hard" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_HARD. + 'openshift.clusterquota.storage.request.hard' + ``` + + + """ + + @spec openshift_clusterquota_storage_request_hard :: + :"openshift.clusterquota.storage.request.hard" + def openshift_clusterquota_storage_request_hard do + :"openshift.clusterquota.storage.request.hard" + end + + @doc """ + The current observed total usage of the resource across all projects. + + + Instrument: `updowncounter` + Unit: `By` + ### Notes + + This metric is retrieved from the `Status.Total.Used` field of the + [K8s ResourceQuotaStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#resourcequotastatus-v1-core) + of the + [ClusterResourceQuota](https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/schedule_and_quota_apis/clusterresourcequota-quota-openshift-io-v1#status-total). + + The `k8s.storageclass.name` should be required when a resource quota is defined for a specific + storage class. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OpenshiftMetrics.openshift_clusterquota_storage_request_used() + :"openshift.clusterquota.storage.request.used" + + ### Erlang + + ```erlang + ?OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_USED. + 'openshift.clusterquota.storage.request.used' + ``` + + + """ + + @spec openshift_clusterquota_storage_request_used :: + :"openshift.clusterquota.storage.request.used" + def openshift_clusterquota_storage_request_used do + :"openshift.clusterquota.storage.request.used" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/otel_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/otel_metrics.ex new file mode 100644 index 000000000..99f89d6ab --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/otel_metrics.ex @@ -0,0 +1,593 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Otel metrics. + """ + @doc """ + The number of log records for which the export has finished, either successful or failed. + + Instrument: `counter` + Unit: `{log_record}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + For exporters with partial success semantics (e.g. OTLP with `rejected_log_records`), rejected log records **MUST** count as failed and only non-rejected log records count as success. + If no rejection reason is available, `rejected` **SHOULD** be used as value for `error.type`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_log_exported() + :"otel.sdk.exporter.log.exported" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_LOG_EXPORTED. + 'otel.sdk.exporter.log.exported' + ``` + + + """ + + @spec otel_sdk_exporter_log_exported :: :"otel.sdk.exporter.log.exported" + def otel_sdk_exporter_log_exported do + :"otel.sdk.exporter.log.exported" + end + + @doc """ + The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). + + Instrument: `updowncounter` + Unit: `{log_record}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_log_inflight() + :"otel.sdk.exporter.log.inflight" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_LOG_INFLIGHT. + 'otel.sdk.exporter.log.inflight' + ``` + + + """ + + @spec otel_sdk_exporter_log_inflight :: :"otel.sdk.exporter.log.inflight" + def otel_sdk_exporter_log_inflight do + :"otel.sdk.exporter.log.inflight" + end + + @doc """ + The number of metric data points for which the export has finished, either successful or failed. + + Instrument: `counter` + Unit: `{data_point}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + For exporters with partial success semantics (e.g. OTLP with `rejected_data_points`), rejected data points **MUST** count as failed and only non-rejected data points count as success. + If no rejection reason is available, `rejected` **SHOULD** be used as value for `error.type`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_metric_data_point_exported() + :"otel.sdk.exporter.metric_data_point.exported" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_METRIC_DATA_POINT_EXPORTED. + 'otel.sdk.exporter.metric_data_point.exported' + ``` + + + """ + + @spec otel_sdk_exporter_metric_data_point_exported :: + :"otel.sdk.exporter.metric_data_point.exported" + def otel_sdk_exporter_metric_data_point_exported do + :"otel.sdk.exporter.metric_data_point.exported" + end + + @doc """ + The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). + + Instrument: `updowncounter` + Unit: `{data_point}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_metric_data_point_inflight() + :"otel.sdk.exporter.metric_data_point.inflight" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_METRIC_DATA_POINT_INFLIGHT. + 'otel.sdk.exporter.metric_data_point.inflight' + ``` + + + """ + + @spec otel_sdk_exporter_metric_data_point_inflight :: + :"otel.sdk.exporter.metric_data_point.inflight" + def otel_sdk_exporter_metric_data_point_inflight do + :"otel.sdk.exporter.metric_data_point.inflight" + end + + @doc """ + The duration of exporting a batch of telemetry records. + + Instrument: `histogram` + Unit: `s` + ### Notes + + This metric defines successful operations using the full success definitions for [http](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1) + and [grpc](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success). Anything else is defined as an unsuccessful operation. For successful + operations, `error.type` **MUST** **NOT** be set. For unsuccessful export operations, `error.type` **MUST** contain a relevant failure cause. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_operation_duration() + :"otel.sdk.exporter.operation.duration" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_OPERATION_DURATION. + 'otel.sdk.exporter.operation.duration' + ``` + + + """ + + @spec otel_sdk_exporter_operation_duration :: :"otel.sdk.exporter.operation.duration" + def otel_sdk_exporter_operation_duration do + :"otel.sdk.exporter.operation.duration" + end + + @doc """ + The number of spans for which the export has finished, either successful or failed. + + Instrument: `counter` + Unit: `{span}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + For exporters with partial success semantics (e.g. OTLP with `rejected_spans`), rejected spans **MUST** count as failed and only non-rejected spans count as success. + If no rejection reason is available, `rejected` **SHOULD** be used as value for `error.type`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_span_exported() + :"otel.sdk.exporter.span.exported" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_SPAN_EXPORTED. + 'otel.sdk.exporter.span.exported' + ``` + + + """ + + @spec otel_sdk_exporter_span_exported :: :"otel.sdk.exporter.span.exported" + def otel_sdk_exporter_span_exported do + :"otel.sdk.exporter.span.exported" + end + + @deprecated """ + Replaced by `otel.sdk.exporter.span.exported`. + """ + + @spec otel_sdk_exporter_span_exported_count :: :"otel.sdk.exporter.span.exported.count" + def otel_sdk_exporter_span_exported_count do + :"otel.sdk.exporter.span.exported.count" + end + + @doc """ + The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed). + + Instrument: `updowncounter` + Unit: `{span}` + ### Notes + + For successful exports, `error.type` **MUST** **NOT** be set. For failed exports, `error.type` **MUST** contain the failure cause. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_exporter_span_inflight() + :"otel.sdk.exporter.span.inflight" + + ### Erlang + + ```erlang + ?OTEL_SDK_EXPORTER_SPAN_INFLIGHT. + 'otel.sdk.exporter.span.inflight' + ``` + + + """ + + @spec otel_sdk_exporter_span_inflight :: :"otel.sdk.exporter.span.inflight" + def otel_sdk_exporter_span_inflight do + :"otel.sdk.exporter.span.inflight" + end + + @deprecated """ + Replaced by `otel.sdk.exporter.span.inflight`. + """ + + @spec otel_sdk_exporter_span_inflight_count :: :"otel.sdk.exporter.span.inflight.count" + def otel_sdk_exporter_span_inflight_count do + :"otel.sdk.exporter.span.inflight.count" + end + + @doc """ + The number of logs submitted to enabled SDK Loggers. + + Instrument: `counter` + Unit: `{log_record}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_log_created() + :"otel.sdk.log.created" + + ### Erlang + + ```erlang + ?OTEL_SDK_LOG_CREATED. + 'otel.sdk.log.created' + ``` + + + """ + + @spec otel_sdk_log_created :: :"otel.sdk.log.created" + def otel_sdk_log_created do + :"otel.sdk.log.created" + end + + @doc """ + The duration of the collect operation of the metric reader. + + Instrument: `histogram` + Unit: `s` + ### Notes + + For successful collections, `error.type` **MUST** **NOT** be set. For failed collections, `error.type` **SHOULD** contain the failure cause. + It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` **SHOULD** be set to any of the failure causes. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_metric_reader_collection_duration() + :"otel.sdk.metric_reader.collection.duration" + + ### Erlang + + ```erlang + ?OTEL_SDK_METRIC_READER_COLLECTION_DURATION. + 'otel.sdk.metric_reader.collection.duration' + ``` + + + """ + + @spec otel_sdk_metric_reader_collection_duration :: + :"otel.sdk.metric_reader.collection.duration" + def otel_sdk_metric_reader_collection_duration do + :"otel.sdk.metric_reader.collection.duration" + end + + @doc """ + The number of log records for which the processing has finished, either successful or failed. + + Instrument: `counter` + Unit: `{log_record}` + ### Notes + + For successful processing, `error.type` **MUST** **NOT** be set. For failed processing, `error.type` **MUST** contain the failure cause. + For the SDK Simple and Batching Log Record Processor a log record is considered to be processed already when it has been submitted to the exporter, + not when the corresponding export call has finished. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_log_processed() + :"otel.sdk.processor.log.processed" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_LOG_PROCESSED. + 'otel.sdk.processor.log.processed' + ``` + + + """ + + @spec otel_sdk_processor_log_processed :: :"otel.sdk.processor.log.processed" + def otel_sdk_processor_log_processed do + :"otel.sdk.processor.log.processed" + end + + @doc """ + The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold. + + Instrument: `updowncounter` + Unit: `{log_record}` + ### Notes + + Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log Record Processor. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_log_queue_capacity() + :"otel.sdk.processor.log.queue.capacity" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_LOG_QUEUE_CAPACITY. + 'otel.sdk.processor.log.queue.capacity' + ``` + + + """ + + @spec otel_sdk_processor_log_queue_capacity :: :"otel.sdk.processor.log.queue.capacity" + def otel_sdk_processor_log_queue_capacity do + :"otel.sdk.processor.log.queue.capacity" + end + + @doc """ + The number of log records in the queue of a given instance of an SDK log processor. + + Instrument: `updowncounter` + Unit: `{log_record}` + ### Notes + + Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record Processor. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_log_queue_size() + :"otel.sdk.processor.log.queue.size" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_LOG_QUEUE_SIZE. + 'otel.sdk.processor.log.queue.size' + ``` + + + """ + + @spec otel_sdk_processor_log_queue_size :: :"otel.sdk.processor.log.queue.size" + def otel_sdk_processor_log_queue_size do + :"otel.sdk.processor.log.queue.size" + end + + @doc """ + The number of spans for which the processing has finished, either successful or failed. + + Instrument: `counter` + Unit: `{span}` + ### Notes + + For successful processing, `error.type` **MUST** **NOT** be set. For failed processing, `error.type` **MUST** contain the failure cause. + For the SDK Simple and Batching Span Processor a span is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_span_processed() + :"otel.sdk.processor.span.processed" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_SPAN_PROCESSED. + 'otel.sdk.processor.span.processed' + ``` + + + """ + + @spec otel_sdk_processor_span_processed :: :"otel.sdk.processor.span.processed" + def otel_sdk_processor_span_processed do + :"otel.sdk.processor.span.processed" + end + + @deprecated """ + Replaced by `otel.sdk.processor.span.processed`. + """ + + @spec otel_sdk_processor_span_processed_count :: :"otel.sdk.processor.span.processed.count" + def otel_sdk_processor_span_processed_count do + :"otel.sdk.processor.span.processed.count" + end + + @doc """ + The maximum number of spans the queue of a given instance of an SDK span processor can hold. + + Instrument: `updowncounter` + Unit: `{span}` + ### Notes + + Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_span_queue_capacity() + :"otel.sdk.processor.span.queue.capacity" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY. + 'otel.sdk.processor.span.queue.capacity' + ``` + + + """ + + @spec otel_sdk_processor_span_queue_capacity :: :"otel.sdk.processor.span.queue.capacity" + def otel_sdk_processor_span_queue_capacity do + :"otel.sdk.processor.span.queue.capacity" + end + + @doc """ + The number of spans in the queue of a given instance of an SDK span processor. + + Instrument: `updowncounter` + Unit: `{span}` + ### Notes + + Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_processor_span_queue_size() + :"otel.sdk.processor.span.queue.size" + + ### Erlang + + ```erlang + ?OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE. + 'otel.sdk.processor.span.queue.size' + ``` + + + """ + + @spec otel_sdk_processor_span_queue_size :: :"otel.sdk.processor.span.queue.size" + def otel_sdk_processor_span_queue_size do + :"otel.sdk.processor.span.queue.size" + end + + @deprecated """ + Obsoleted. + """ + + @spec otel_sdk_span_ended :: :"otel.sdk.span.ended" + def otel_sdk_span_ended do + :"otel.sdk.span.ended" + end + + @deprecated """ + Obsoleted. + """ + + @spec otel_sdk_span_ended_count :: :"otel.sdk.span.ended.count" + def otel_sdk_span_ended_count do + :"otel.sdk.span.ended.count" + end + + @doc """ + The number of created spans with `recording=true` for which the end operation has not been called yet. + + Instrument: `updowncounter` + Unit: `{span}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_span_live() + :"otel.sdk.span.live" + + ### Erlang + + ```erlang + ?OTEL_SDK_SPAN_LIVE. + 'otel.sdk.span.live' + ``` + + + """ + + @spec otel_sdk_span_live :: :"otel.sdk.span.live" + def otel_sdk_span_live do + :"otel.sdk.span.live" + end + + @deprecated """ + Replaced by `otel.sdk.span.live`. + """ + + @spec otel_sdk_span_live_count :: :"otel.sdk.span.live.count" + def otel_sdk_span_live_count do + :"otel.sdk.span.live.count" + end + + @doc """ + The number of created spans. + + Instrument: `counter` + Unit: `{span}` + ### Notes + + Implementations **MUST** record this metric for all spans, even for non-recording ones. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_span_started() + :"otel.sdk.span.started" + + ### Erlang + + ```erlang + ?OTEL_SDK_SPAN_STARTED. + 'otel.sdk.span.started' + ``` + + + """ + + @spec otel_sdk_span_started :: :"otel.sdk.span.started" + def otel_sdk_span_started do + :"otel.sdk.span.started" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex index 07b3f74d6..28995262e 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/process_metrics.ex @@ -7,7 +7,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do Number of times the process has been context switched. Instrument: `counter` - Unit: `{count}` + Unit: `{context_switch}` ### Elixir @@ -192,26 +192,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do :"process.network.io" end - @doc """ - Number of file descriptors in use by the process. - - Instrument: `updowncounter` - Unit: `{count}` - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_open_file_descriptor_count() - :"process.open_file_descriptor.count" - - ### Erlang - - ```erlang - ?PROCESS_OPEN_FILE_DESCRIPTOR_COUNT. - 'process.open_file_descriptor.count' - ``` - - + @deprecated """ + Replaced by `process.unix.file_descriptor.count`. """ @spec process_open_file_descriptor_count :: :"process.open_file_descriptor.count" @@ -272,4 +254,90 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do def process_thread_count do :"process.thread.count" end + + @doc """ + Number of unix file descriptors in use by the process. + + Instrument: `updowncounter` + Unit: `{file_descriptor}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_unix_file_descriptor_count() + :"process.unix.file_descriptor.count" + + ### Erlang + + ```erlang + ?PROCESS_UNIX_FILE_DESCRIPTOR_COUNT. + 'process.unix.file_descriptor.count' + ``` + + + """ + + @spec process_unix_file_descriptor_count :: :"process.unix.file_descriptor.count" + def process_unix_file_descriptor_count do + :"process.unix.file_descriptor.count" + end + + @doc """ + The time the process has been running. + + Instrument: `gauge` + Unit: `s` + ### Notes + + Instrumentations **SHOULD** use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. + The actual accuracy would depend on the instrumentation and operating system. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_uptime() + :"process.uptime" + + ### Erlang + + ```erlang + ?PROCESS_UPTIME. + 'process.uptime' + ``` + + + """ + + @spec process_uptime :: :"process.uptime" + def process_uptime do + :"process.uptime" + end + + @doc """ + Number of handles held by the process. + + Instrument: `updowncounter` + Unit: `{handle}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics.process_windows_handle_count() + :"process.windows.handle.count" + + ### Erlang + + ```erlang + ?PROCESS_WINDOWS_HANDLE_COUNT. + 'process.windows.handle.count' + ``` + + + """ + + @spec process_windows_handle_count :: :"process.windows.handle.count" + def process_windows_handle_count do + :"process.windows.handle.count" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex index 5b7396f11..3311e20fc 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/rpc_metrics.ex @@ -4,63 +4,48 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do OpenTelemetry Semantic Conventions for RPC metrics. """ @doc """ - Measures the duration of outbound RPC. + Measures the duration of an outgoing Remote Procedure Call (RPC). Instrument: `histogram` - Unit: `ms` + Unit: `s` ### Notes - While streaming RPCs may record this metric as start-of-batch - to end-of-batch, it's hard to interpret in practice. - - **Streaming**: N/A. + When this metric is reported alongside an RPC client span, the metric value + **SHOULD** be the same as the RPC client span duration. ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_duration() - :"rpc.client.duration" + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_call_duration() + :"rpc.client.call.duration" ### Erlang ```erlang - ?RPC_CLIENT_DURATION. - 'rpc.client.duration' + ?RPC_CLIENT_CALL_DURATION. + 'rpc.client.call.duration' ``` """ + @spec rpc_client_call_duration :: :"rpc.client.call.duration" + def rpc_client_call_duration do + :"rpc.client.call.duration" + end + + @deprecated """ + Replaced by `rpc.client.call.duration` with unit `s`. + """ + @spec rpc_client_duration :: :"rpc.client.duration" def rpc_client_duration do :"rpc.client.duration" end - @doc """ - Measures the size of RPC request messages (uncompressed). - - Instrument: `histogram` - Unit: `By` - ### Notes - - **Streaming**: Recorded per message in a streaming batch - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_request_size() - :"rpc.client.request.size" - - ### Erlang - - ```erlang - ?RPC_CLIENT_REQUEST_SIZE. - 'rpc.client.request.size' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_client_request_size :: :"rpc.client.request.size" @@ -68,32 +53,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.client.request.size" end - @doc """ - Measures the number of messages received per RPC. - - Instrument: `histogram` - Unit: `{count}` - ### Notes - - Should be 1 for all non-streaming RPCs. - - **Streaming**: This metric is required for server and client streaming RPCs - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_requests_per_rpc() - :"rpc.client.requests_per_rpc" - - ### Erlang - - ```erlang - ?RPC_CLIENT_REQUESTS_PER_RPC. - 'rpc.client.requests_per_rpc' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_client_requests_per_rpc :: :"rpc.client.requests_per_rpc" @@ -101,30 +62,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.client.requests_per_rpc" end - @doc """ - Measures the size of RPC response messages (uncompressed). - - Instrument: `histogram` - Unit: `By` - ### Notes - - **Streaming**: Recorded per response in a streaming batch - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_response_size() - :"rpc.client.response.size" - - ### Erlang - - ```erlang - ?RPC_CLIENT_RESPONSE_SIZE. - 'rpc.client.response.size' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_client_response_size :: :"rpc.client.response.size" @@ -132,32 +71,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.client.response.size" end - @doc """ - Measures the number of messages sent per RPC. - - Instrument: `histogram` - Unit: `{count}` - ### Notes - - Should be 1 for all non-streaming RPCs. - - **Streaming**: This metric is required for server and client streaming RPCs - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_client_responses_per_rpc() - :"rpc.client.responses_per_rpc" - - ### Erlang - - ```erlang - ?RPC_CLIENT_RESPONSES_PER_RPC. - 'rpc.client.responses_per_rpc' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_client_responses_per_rpc :: :"rpc.client.responses_per_rpc" @@ -166,63 +81,48 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do end @doc """ - Measures the duration of inbound RPC. + Measures the duration of an incoming Remote Procedure Call (RPC). Instrument: `histogram` - Unit: `ms` + Unit: `s` ### Notes - While streaming RPCs may record this metric as start-of-batch - to end-of-batch, it's hard to interpret in practice. - - **Streaming**: N/A. + When this metric is reported alongside an RPC server span, the metric value + **SHOULD** be the same as the RPC server span duration. ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_duration() - :"rpc.server.duration" + iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_call_duration() + :"rpc.server.call.duration" ### Erlang ```erlang - ?RPC_SERVER_DURATION. - 'rpc.server.duration' + ?RPC_SERVER_CALL_DURATION. + 'rpc.server.call.duration' ``` """ + @spec rpc_server_call_duration :: :"rpc.server.call.duration" + def rpc_server_call_duration do + :"rpc.server.call.duration" + end + + @deprecated """ + Replaced by `rpc.server.call.duration` with unit `s`. + """ + @spec rpc_server_duration :: :"rpc.server.duration" def rpc_server_duration do :"rpc.server.duration" end - @doc """ - Measures the size of RPC request messages (uncompressed). - - Instrument: `histogram` - Unit: `By` - ### Notes - - **Streaming**: Recorded per message in a streaming batch - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_request_size() - :"rpc.server.request.size" - - ### Erlang - - ```erlang - ?RPC_SERVER_REQUEST_SIZE. - 'rpc.server.request.size' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_server_request_size :: :"rpc.server.request.size" @@ -230,32 +130,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.server.request.size" end - @doc """ - Measures the number of messages received per RPC. - - Instrument: `histogram` - Unit: `{count}` - ### Notes - - Should be 1 for all non-streaming RPCs. - - **Streaming** : This metric is required for server and client streaming RPCs - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_requests_per_rpc() - :"rpc.server.requests_per_rpc" - - ### Erlang - - ```erlang - ?RPC_SERVER_REQUESTS_PER_RPC. - 'rpc.server.requests_per_rpc' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_server_requests_per_rpc :: :"rpc.server.requests_per_rpc" @@ -263,30 +139,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.server.requests_per_rpc" end - @doc """ - Measures the size of RPC response messages (uncompressed). - - Instrument: `histogram` - Unit: `By` - ### Notes - - **Streaming**: Recorded per response in a streaming batch - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_response_size() - :"rpc.server.response.size" - - ### Erlang - - ```erlang - ?RPC_SERVER_RESPONSE_SIZE. - 'rpc.server.response.size' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_server_response_size :: :"rpc.server.response.size" @@ -294,32 +148,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics do :"rpc.server.response.size" end - @doc """ - Measures the number of messages sent per RPC. - - Instrument: `histogram` - Unit: `{count}` - ### Notes - - Should be 1 for all non-streaming RPCs. - - **Streaming**: This metric is required for server and client streaming RPCs - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.RPCMetrics.rpc_server_responses_per_rpc() - :"rpc.server.responses_per_rpc" - - ### Erlang - - ```erlang - ?RPC_SERVER_RESPONSES_PER_RPC. - 'rpc.server.responses_per_rpc' - ``` - - + @deprecated """ + Removed, no replacement at this time. """ @spec rpc_server_responses_per_rpc :: :"rpc.server.responses_per_rpc" diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex index 0c5f0336b..ce4f7b684 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex @@ -4,10 +4,10 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do OpenTelemetry Semantic Conventions for System metrics. """ @doc """ - Reports the current frequency of the CPU in Hz + Operating frequency of the logical CPU in Hertz. Instrument: `gauge` - Unit: `{Hz}` + Unit: `Hz` ### Elixir @@ -31,10 +31,13 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking + Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking. Instrument: `updowncounter` Unit: `{cpu}` + ### Notes + + Calculated by multiplying the number of sockets by the number of cores per socket, and then by the number of threads per core ### Elixir @@ -58,10 +61,13 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Reports the number of actual physical processor cores on the hardware + Reports the number of actual physical processor cores on the hardware. Instrument: `updowncounter` Unit: `{cpu}` + ### Notes + + Calculated by multiplying the number of sockets by the number of cores per socket ### Elixir @@ -85,7 +91,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Seconds each logical CPU spent on each mode + Seconds each logical CPU spent on each mode. Instrument: `counter` Unit: `s` @@ -112,7 +118,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs + For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time. Instrument: `gauge` Unit: `1` @@ -139,7 +145,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Disk bytes transferred. Instrument: `counter` Unit: `By` @@ -166,7 +172,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Time disk spent activated + Time disk spent activated. Instrument: `counter` Unit: `s` @@ -202,7 +208,34 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The total storage capacity of the disk. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_disk_limit() + :"system.disk.limit" + + ### Erlang + + ```erlang + ?SYSTEM_DISK_LIMIT. + 'system.disk.limit' + ``` + + + """ + + @spec system_disk_limit :: :"system.disk.limit" + def system_disk_limit do + :"system.disk.limit" + end + + @doc """ + The number of disk reads/writes merged into single physical disk access operations. Instrument: `counter` Unit: `{operation}` @@ -229,7 +262,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Sum of the time each operation took to complete + Sum of the time each operation took to complete. Instrument: `counter` Unit: `s` @@ -263,7 +296,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Disk operations count. Instrument: `counter` Unit: `{operation}` @@ -290,10 +323,42 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The total storage capacity of the filesystem. + + Instrument: `updowncounter` + Unit: `By` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_filesystem_limit() + :"system.filesystem.limit" + + ### Erlang + + ```erlang + ?SYSTEM_FILESYSTEM_LIMIT. + 'system.filesystem.limit' + ``` + + + """ + + @spec system_filesystem_limit :: :"system.filesystem.limit" + def system_filesystem_limit do + :"system.filesystem.limit" + end + + @doc """ + Reports a filesystem's space usage across different states. Instrument: `updowncounter` Unit: `By` + ### Notes + + The sum of all `system.filesystem.usage` values over the different `system.filesystem.state` attributes + **SHOULD** equal the total storage capacity of the filesystem, that is `system.filesystem.limit`. + ### Elixir @@ -317,7 +382,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Fraction of filesystem bytes used. Instrument: `gauge` Unit: `1` @@ -343,132 +408,155 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do :"system.filesystem.utilization" end + @deprecated """ + Replaced by `system.memory.linux.available`. + """ + + @spec system_linux_memory_available :: :"system.linux.memory.available" + def system_linux_memory_available do + :"system.linux.memory.available" + end + + @deprecated """ + Replaced by `system.memory.linux.slab.usage`. + """ + + @spec system_linux_memory_slab_usage :: :"system.linux.memory.slab.usage" + def system_linux_memory_slab_usage do + :"system.linux.memory.slab.usage" + end + @doc """ - An estimate of how much memory is available for starting new applications, without causing swapping + Total virtual memory available in the system. Instrument: `updowncounter` Unit: `By` - ### Notes - - This is an alternative to `system.memory.usage` metric with `state=free`. - Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. - This is supposed to be more accurate than just "free" memory. - For reference, see the calculations [here](https://superuser.com/a/980821). - See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). - ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_linux_memory_available() - :"system.linux.memory.available" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_limit() + :"system.memory.limit" ### Erlang ```erlang - ?SYSTEM_LINUX_MEMORY_AVAILABLE. - 'system.linux.memory.available' + ?SYSTEM_MEMORY_LIMIT. + 'system.memory.limit' ``` """ - @spec system_linux_memory_available :: :"system.linux.memory.available" - def system_linux_memory_available do - :"system.linux.memory.available" + @spec system_memory_limit :: :"system.memory.limit" + def system_memory_limit do + :"system.memory.limit" end @doc """ - Reports the memory used by the Linux kernel for managing caches of frequently used objects. + An estimate of how much memory is available for starting new applications, without causing swapping. Instrument: `updowncounter` Unit: `By` ### Notes - The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` **SHOULD** be equal to the total slab memory available on the system. - Note that the total slab memory is not constant and may vary over time. - See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). + This is an alternative to `system.memory.usage` metric with `state=free`. + Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. + This is supposed to be more accurate than just "free" memory. + For reference, see the calculations [here](https://superuser.com/a/980821). + See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_linux_memory_slab_usage() - :"system.linux.memory.slab.usage" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_linux_available() + :"system.memory.linux.available" ### Erlang ```erlang - ?SYSTEM_LINUX_MEMORY_SLAB_USAGE. - 'system.linux.memory.slab.usage' + ?SYSTEM_MEMORY_LINUX_AVAILABLE. + 'system.memory.linux.available' ``` """ - @spec system_linux_memory_slab_usage :: :"system.linux.memory.slab.usage" - def system_linux_memory_slab_usage do - :"system.linux.memory.slab.usage" + @spec system_memory_linux_available :: :"system.memory.linux.available" + def system_memory_linux_available do + :"system.memory.linux.available" end @doc """ - Total memory available in the system. + Shared memory used (mostly by tmpfs). Instrument: `updowncounter` Unit: `By` ### Notes - Its value **SHOULD** equal the sum of `system.memory.state` over all states. + Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or + `Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)" ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_limit() - :"system.memory.limit" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_linux_shared() + :"system.memory.linux.shared" ### Erlang ```erlang - ?SYSTEM_MEMORY_LIMIT. - 'system.memory.limit' + ?SYSTEM_MEMORY_LINUX_SHARED. + 'system.memory.linux.shared' ``` """ - @spec system_memory_limit :: :"system.memory.limit" - def system_memory_limit do - :"system.memory.limit" + @spec system_memory_linux_shared :: :"system.memory.linux.shared" + def system_memory_linux_shared do + :"system.memory.linux.shared" end @doc """ - Shared memory used (mostly by tmpfs). + Reports the memory used by the Linux kernel for managing caches of frequently used objects. Instrument: `updowncounter` Unit: `By` ### Notes - Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or - `Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)" + The sum over the `reclaimable` and `unreclaimable` state values in `memory.linux.slab.usage` **SHOULD** be equal to the total slab memory available on the system. + Note that the total slab memory is not constant and may vary over time. + See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_shared() - :"system.memory.shared" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_memory_linux_slab_usage() + :"system.memory.linux.slab.usage" ### Erlang ```erlang - ?SYSTEM_MEMORY_SHARED. - 'system.memory.shared' + ?SYSTEM_MEMORY_LINUX_SLAB_USAGE. + 'system.memory.linux.slab.usage' ``` """ + @spec system_memory_linux_slab_usage :: :"system.memory.linux.slab.usage" + def system_memory_linux_slab_usage do + :"system.memory.linux.slab.usage" + end + + @deprecated """ + Replaced by `system.memory.linux.shared`. + """ + @spec system_memory_shared :: :"system.memory.shared" def system_memory_shared do :"system.memory.shared" @@ -479,11 +567,6 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do Instrument: `updowncounter` Unit: `By` - ### Notes - - The sum over all `system.memory.state` values **SHOULD** equal the total memory - available on the system, that is `system.memory.limit`. - ### Elixir @@ -507,7 +590,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Percentage of memory bytes in use. Instrument: `gauge` Unit: `1` @@ -534,7 +617,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The number of connections. Instrument: `updowncounter` Unit: `{connection}` @@ -542,52 +625,35 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_connections() - :"system.network.connections" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_connection_count() + :"system.network.connection.count" ### Erlang ```erlang - ?SYSTEM_NETWORK_CONNECTIONS. - 'system.network.connections' + ?SYSTEM_NETWORK_CONNECTION_COUNT. + 'system.network.connection.count' ``` """ + @spec system_network_connection_count :: :"system.network.connection.count" + def system_network_connection_count do + :"system.network.connection.count" + end + + @deprecated """ + Replaced by `system.network.connection.count`. + """ + @spec system_network_connections :: :"system.network.connections" def system_network_connections do :"system.network.connections" end - @doc """ - Count of packets that are dropped or discarded even though there was no error - - Instrument: `counter` - Unit: `{packet}` - ### Notes - - Measured as: - - - Linux: the `drop` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)) - - Windows: [`InDiscards`/`OutDiscards`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) - from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2) - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_dropped() - :"system.network.dropped" - - ### Erlang - - ```erlang - ?SYSTEM_NETWORK_DROPPED. - 'system.network.dropped' - ``` - - + @deprecated """ + Replaced by `system.network.packet.dropped`. """ @spec system_network_dropped :: :"system.network.dropped" @@ -596,7 +662,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Count of network errors detected + Count of network errors detected. Instrument: `counter` Unit: `{error}` @@ -604,7 +670,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do Measured as: - - Linux: the `errs` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)). + - Linux: the `errs` column in `/proc/net/dev` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)). - Windows: [`InErrors`/`OutErrors`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2). @@ -631,7 +697,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The number of bytes transmitted and received. Instrument: `counter` Unit: `By` @@ -658,34 +724,78 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The number of packets transferred. + + Instrument: `counter` + Unit: `{packet}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_packet_count() + :"system.network.packet.count" + + ### Erlang + + ```erlang + ?SYSTEM_NETWORK_PACKET_COUNT. + 'system.network.packet.count' + ``` + + + """ + + @spec system_network_packet_count :: :"system.network.packet.count" + def system_network_packet_count do + :"system.network.packet.count" + end + + @doc """ + Count of packets that are dropped or discarded even though there was no error. Instrument: `counter` Unit: `{packet}` + ### Notes + + Measured as: + + - Linux: the `drop` column in `/proc/net/dev` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)) + - Windows: [`InDiscards`/`OutDiscards`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) + from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2) + ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_packets() - :"system.network.packets" + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_network_packet_dropped() + :"system.network.packet.dropped" ### Erlang ```erlang - ?SYSTEM_NETWORK_PACKETS. - 'system.network.packets' + ?SYSTEM_NETWORK_PACKET_DROPPED. + 'system.network.packet.dropped' ``` """ + @spec system_network_packet_dropped :: :"system.network.packet.dropped" + def system_network_packet_dropped do + :"system.network.packet.dropped" + end + + @deprecated """ + Replaced by `system.network.packet.count`. + """ + @spec system_network_packets :: :"system.network.packets" def system_network_packets do :"system.network.packets" end @doc """ - none + The number of page faults. Instrument: `counter` Unit: `{fault}` @@ -712,7 +822,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + The number of paging operations. Instrument: `counter` Unit: `{operation}` @@ -739,7 +849,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Unix swap or windows pagefile usage + Unix swap or windows pagefile usage. Instrument: `updowncounter` Unit: `By` @@ -766,7 +876,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Swap (unix) or pagefile (windows) utilization. Instrument: `gauge` Unit: `1` @@ -793,7 +903,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Total number of processes in each state + Total number of processes in each state. Instrument: `updowncounter` Unit: `{process}` @@ -820,7 +930,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - Total number of processes created over uptime of the host + Total number of processes created over uptime of the host. Instrument: `counter` Unit: `{process}` @@ -845,4 +955,36 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do def system_process_created do :"system.process.created" end + + @doc """ + The time the system has been running. + + Instrument: `gauge` + Unit: `s` + ### Notes + + Instrumentations **SHOULD** use a gauge with type `double` and measure uptime in seconds as a floating point number with the highest precision available. + The actual accuracy would depend on the instrumentation and operating system. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_uptime() + :"system.uptime" + + ### Erlang + + ```erlang + ?SYSTEM_UPTIME. + 'system.uptime' + ``` + + + """ + + @spec system_uptime :: :"system.uptime" + def system_uptime do + :"system.uptime" + end end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/vcs_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/vcs_metrics.ex new file mode 100644 index 000000000..e9279744a --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/vcs_metrics.ex @@ -0,0 +1,286 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Vcs metrics. + """ + @doc """ + The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged). + + Instrument: `updowncounter` + Unit: `{change}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_change_count() + :"vcs.change.count" + + ### Erlang + + ```erlang + ?VCS_CHANGE_COUNT. + 'vcs.change.count' + ``` + + + """ + + @spec vcs_change_count :: :"vcs.change.count" + def vcs_change_count do + :"vcs.change.count" + end + + @doc """ + The time duration a change (pull request/merge request/changelist) has been in a given state. + + Instrument: `gauge` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_change_duration() + :"vcs.change.duration" + + ### Erlang + + ```erlang + ?VCS_CHANGE_DURATION. + 'vcs.change.duration' + ``` + + + """ + + @spec vcs_change_duration :: :"vcs.change.duration" + def vcs_change_duration do + :"vcs.change.duration" + end + + @doc """ + The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval. + + Instrument: `gauge` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_change_time_to_approval() + :"vcs.change.time_to_approval" + + ### Erlang + + ```erlang + ?VCS_CHANGE_TIME_TO_APPROVAL. + 'vcs.change.time_to_approval' + ``` + + + """ + + @spec vcs_change_time_to_approval :: :"vcs.change.time_to_approval" + def vcs_change_time_to_approval do + :"vcs.change.time_to_approval" + end + + @doc """ + The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref. + + Instrument: `gauge` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_change_time_to_merge() + :"vcs.change.time_to_merge" + + ### Erlang + + ```erlang + ?VCS_CHANGE_TIME_TO_MERGE. + 'vcs.change.time_to_merge' + ``` + + + """ + + @spec vcs_change_time_to_merge :: :"vcs.change.time_to_merge" + def vcs_change_time_to_merge do + :"vcs.change.time_to_merge" + end + + @doc """ + The number of unique contributors to a repository. + + Instrument: `gauge` + Unit: `{contributor}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_contributor_count() + :"vcs.contributor.count" + + ### Erlang + + ```erlang + ?VCS_CONTRIBUTOR_COUNT. + 'vcs.contributor.count' + ``` + + + """ + + @spec vcs_contributor_count :: :"vcs.contributor.count" + def vcs_contributor_count do + :"vcs.contributor.count" + end + + @doc """ + The number of refs of type branch or tag in a repository. + + Instrument: `updowncounter` + Unit: `{ref}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_ref_count() + :"vcs.ref.count" + + ### Erlang + + ```erlang + ?VCS_REF_COUNT. + 'vcs.ref.count' + ``` + + + """ + + @spec vcs_ref_count :: :"vcs.ref.count" + def vcs_ref_count do + :"vcs.ref.count" + end + + @doc """ + The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. + + Instrument: `gauge` + Unit: `{line}` + ### Notes + + This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines, + instrumentation **SHOULD** report two measurements: 3 and 2 (both positive numbers). + If number of lines added/removed should be calculated from the start of time, then `vcs.ref.base.name` **SHOULD** be set to an empty string. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_ref_lines_delta() + :"vcs.ref.lines_delta" + + ### Erlang + + ```erlang + ?VCS_REF_LINES_DELTA. + 'vcs.ref.lines_delta' + ``` + + + """ + + @spec vcs_ref_lines_delta :: :"vcs.ref.lines_delta" + def vcs_ref_lines_delta do + :"vcs.ref.lines_delta" + end + + @doc """ + The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute. + + Instrument: `gauge` + Unit: `{revision}` + ### Notes + + This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`, + instrumentation **SHOULD** report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_ref_revisions_delta() + :"vcs.ref.revisions_delta" + + ### Erlang + + ```erlang + ?VCS_REF_REVISIONS_DELTA. + 'vcs.ref.revisions_delta' + ``` + + + """ + + @spec vcs_ref_revisions_delta :: :"vcs.ref.revisions_delta" + def vcs_ref_revisions_delta do + :"vcs.ref.revisions_delta" + end + + @doc """ + Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`. + + Instrument: `gauge` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_ref_time() + :"vcs.ref.time" + + ### Erlang + + ```erlang + ?VCS_REF_TIME. + 'vcs.ref.time' + ``` + + + """ + + @spec vcs_ref_time :: :"vcs.ref.time" + def vcs_ref_time do + :"vcs.ref.time" + end + + @doc """ + The number of repositories in an organization. + + Instrument: `updowncounter` + Unit: `{repository}` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.VcsMetrics.vcs_repository_count() + :"vcs.repository.count" + + ### Erlang + + ```erlang + ?VCS_REPOSITORY_COUNT. + 'vcs.repository.count' + ``` + + + """ + + @spec vcs_repository_count :: :"vcs.repository.count" + def vcs_repository_count do + :"vcs.repository.count" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/metrics/db_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/metrics/db_metrics.ex new file mode 100644 index 000000000..9c24de154 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/metrics/db_metrics.ex @@ -0,0 +1,36 @@ +defmodule OpenTelemetry.SemConv.Metrics.DBMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for DB metrics. + """ + @doc """ + Duration of database client operations. + + Instrument: `histogram` + Unit: `s` + ### Notes + + Batch operations **SHOULD** be recorded as a single operation. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Metrics.DBMetrics.db_client_operation_duration() + :"db.client.operation.duration" + + ### Erlang + + ```erlang + ?DB_CLIENT_OPERATION_DURATION. + 'db.client.operation.duration' + ``` + + + """ + + @spec db_client_operation_duration :: :"db.client.operation.duration" + def db_client_operation_duration do + :"db.client.operation.duration" + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex b/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex index 16b1e0b78..bad579e6c 100644 --- a/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex +++ b/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex @@ -1,3 +1,16 @@ defmodule OpenTelemetry.SemConv.Schemas do def v1_27_0, do: "https://opentelemetry.io/schemas/1.27.0" + def v1_28_0, do: "https://opentelemetry.io/schemas/1.28.0" + def v1_29_0, do: "https://opentelemetry.io/schemas/1.29.0" + def v1_30_0, do: "https://opentelemetry.io/schemas/1.30.0" + def v1_31_0, do: "https://opentelemetry.io/schemas/1.31.0" + def v1_32_0, do: "https://opentelemetry.io/schemas/1.32.0" + def v1_33_0, do: "https://opentelemetry.io/schemas/1.33.0" + def v1_34_0, do: "https://opentelemetry.io/schemas/1.34.0" + def v1_35_0, do: "https://opentelemetry.io/schemas/1.35.0" + def v1_36_0, do: "https://opentelemetry.io/schemas/1.36.0" + def v1_37_0, do: "https://opentelemetry.io/schemas/1.37.0" + def v1_38_0, do: "https://opentelemetry.io/schemas/1.38.0" + def v1_39_0, do: "https://opentelemetry.io/schemas/1.39.0" + def v1_40_0, do: "https://opentelemetry.io/schemas/1.40.0" end diff --git a/apps/opentelemetry_semantic_conventions/makefile b/apps/opentelemetry_semantic_conventions/makefile index 27cbddfba..9efb57288 100644 --- a/apps/opentelemetry_semantic_conventions/makefile +++ b/apps/opentelemetry_semantic_conventions/makefile @@ -1,4 +1,4 @@ -SEMCON_VERSION = 1.27.0 +SEMCON_VERSION = 1.40.0 .PHONY: setup clean-all checkout generate @@ -20,7 +20,7 @@ clean-erlang: rm -rf include/metrics setup: - curl --proto '=https' --tlsv1.2 -LsSf https://github.com/open-telemetry/weaver/releases/download/v0.9.2/weaver-installer.sh | sh + curl --proto '=https' --tlsv1.2 -LsSf https://github.com/open-telemetry/weaver/releases/download/v0.21.2/weaver-installer.sh | sh checkout: mkdir semtmp diff --git a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src index 58a5779bd..5616eb88c 100644 --- a/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src +++ b/apps/opentelemetry_semantic_conventions/src/opentelemetry_semantic_conventions.app.src @@ -1,6 +1,6 @@ {application, opentelemetry_semantic_conventions, [{description, "Macros defining the keys of OpenTelemetry semantic conventions"}, - {vsn, "1.27.0"}, + {vsn, "1.40.0"}, {registered, []}, {applications, [kernel, diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 index 6e4f16abc..fbc0756ed 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/common.j2 @@ -11,7 +11,7 @@ {%- endmacro -%} {%- macro to_atom(text) -%} -{% if text | split_id | length > 1 -%}:"{{ text }}"{%- else -%}:{{ text }}{%- endif %} +{% if text | split_id | length > 1 or "/" in text -%}:"{{ text }}"{%- else -%}:{{ text }}{%- endif %} {%- endmacro -%} {% macro to_elixir_type(member) -%} @@ -65,6 +65,10 @@ {% raw %}}{% endraw %} {%- endmacro -%} +{%- macro map_access(text) -%} +{% if text | split_id | length > 1 or "/" in text -%}[:"{{ text }}"]{% else -%}.{{ text }}{%- endif %} +{%- endmacro -%} + {%- macro strong_reqs(string) -%} {{ string | replace(" MUST ", " **MUST** ") | replace(" MUST NOT ", " **MUST NOT** ") | replace(" SHOULD ", " **SHOULD** ") | replace(" SHOULD NOT ", " **SHOULD NOT** ") | replace(" MAY ", " **MAY** ") | replace(" NOT ", " **NOT** ") }} {%- endmacro -%} \ No newline at end of file diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 index 0509b4759..82f33b572 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_attributes.ex.j2 @@ -42,7 +42,7 @@ defmodule {{ module_namespace }}.{{ module_name }} do {% if attribute is deprecated %} @deprecated """ - {{ attribute.deprecated | replace("\n", "\n ") }} + {{ attribute.deprecated.note | replace("\n", "\n ") }} """ {%- endif -%} {% if not(attribute is deprecated) %} @@ -75,10 +75,10 @@ defmodule {{ module_namespace }}.{{ module_name }} do iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() {{ c.to_atom(attribute.name) }} - iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values().{{ attribute.type.members|first|attr('id') }} + iex> {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values(){{ c.map_access(attribute.type.members|first|attr('id')) }} {{ c.enum_value_to_elixir_type(attribute.type.members|first|attr('value')) }} - iex> {% raw %}%{{% endraw %}{{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() => {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values().{{ attribute.type.members|first|attr('id') }}{% raw %}}{% endraw %} + iex> {% raw %}%{{% endraw %}{{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}() => {{ module_namespace }}.{{ module_name }}.{{ c.func_name(attribute.name) }}_values(){{ c.map_access(attribute.type.members|first|attr('id')) }}{% raw %}}{% endraw %} {% raw %}%{{% endraw %}{{ c.to_atom(attribute.name) }} => {{ c.enum_value_to_elixir_type(attribute.type.members|first|attr('value')) }}{% raw %}}{% endraw %} ### Erlang diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 index d22fc6093..065ad0be6 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/semantic_metrics.ex.j2 @@ -18,7 +18,7 @@ defmodule {{ module_namespace }}.{{ module_name }} do {%- for metric in ctx.metrics | sort(attribute="metric_name") %} {% if metric is deprecated %} @deprecated """ - {{ metric.deprecated | replace("\n", "\n ") }} + {{ metric.deprecated.note | replace("\n", "\n ") }} """ {%- else -%} @doc """ diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml index 4e4370502..6aabc62c8 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml @@ -10,12 +10,12 @@ templates: | map(select(.type == "attribute_group")) | map(select(.id | startswith("registry."))) | map({ id: .id, group_id: .id | split(".") | .[1], attributes: .attributes}) - | map(select([.attributes[] | select(.stability == $stability)] | any)) + | map(select([.attributes[] | select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end)] | any)) | group_by(.group_id) - | map({ + | map({ id: .[0].group_id, - attributes: [.[].attributes[] | select(.stability == $stability) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id), - all_attributes: [.[].attributes[]] | sort_by(.id), + attributes: [.[].attributes[] | select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id) | unique_by(.name | gsub("[.]"; "_")), + all_attributes: [.[].attributes[]] | sort_by(.id) | unique_by(.name | gsub("[.]"; "_")), output: $output + "/attributes/" }) | map(select( .id as $id | any( $excluded[]; . == $id) | not )) @@ -25,7 +25,7 @@ templates: filter: > .groups | map(select(.type == "metric")) - | map(select(.stability == $stability)) + | map(select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end)) | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) | group_by(.group_id) | map({ diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 index edc3f77d3..874d02080 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_attributes.hrl.j2 @@ -20,7 +20,7 @@ {% endif -%} {%- for attribute in ctx.attributes | sort(attribute="name") %} {% if attribute is deprecated -%} -%% @deprecated {{ attribute.deprecated | replace("\n", "\n%% ") }} +%% @deprecated {{ attribute.deprecated.note | replace("\n", "\n%% ") }} {%- endif %} %% {{ attribute.brief | replace("\n", "\n%% ") }} -define({{ c.attr_name(attribute.name) }}, '{{ attribute.name }}'). diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 index 169b7e2a5..e377eb224 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/semantic_metrics.hrl.j2 @@ -18,7 +18,7 @@ {%- for metric in ctx.metrics | sort(attribute="metric_name") %} {% if metric is deprecated -%} -%% @deprecated {{ metric.deprecated | replace("\n", "\n%% ") }} +%% @deprecated {{ metric.deprecated.note | replace("\n", "\n%% ") }} {%- endif %} %% {{ metric.brief | replace("\n", "\n%% ") }} -define({{ c.attr_name(metric.metric_name) }}, '{{ metric.metric_name }}'). diff --git a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml index a82e13ec2..900f1b328 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml @@ -10,12 +10,12 @@ templates: | map(select(.type == "attribute_group")) | map(select(.id | startswith("registry."))) | map({ id: .id, group_id: .id | split(".") | .[1], attributes: .attributes}) - | map(select([.attributes[] | select(.stability == $stability)] | any)) + | map(select([.attributes[] | select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end)] | any)) | group_by(.group_id) - | map({ + | map({ id: .[0].group_id, - attributes: [.[].attributes[] | select(.stability == $stability) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id), - all_attributes: [.[].attributes[]], + attributes: [.[].attributes[] | select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end) | (select( .name as $id | any( $excluded_attrs[]; . == $id ) | not ))] | sort_by(.id) | unique_by(.name | gsub("[.]"; "_")), + all_attributes: [.[].attributes[]] | sort_by(.id) | unique_by(.name | gsub("[.]"; "_")), output: $output + "/attributes/" }) | map(select( .id as $id | any( $excluded[]; . == $id) | not )) @@ -25,7 +25,7 @@ templates: filter: > .groups | map(select(.type == "metric")) - | map(select(.stability == $stability)) + | map(select(if $stability == "stable" then .stability == "stable" else .stability != "stable" end)) | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) | group_by(.group_id) | map({