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 00000000..9dd93973 --- /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 00000000..b1b7f070 --- /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 fee6dd17..e2129a98 100644 --- a/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/attributes/exception_attributes.hrl @@ -13,8 +13,8 @@ %% 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/network_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl index 2bc501ca..25b36f36 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/incubating/attributes/android_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/android_attributes.hrl new file mode 100644 index 00000000..155afb02 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/android_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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/android_attributes.hrl"). + + +%% This attribute represents the state of the application. +%% +-define(ANDROID_APP_STATE, 'android.app.state'). + +-define(ANDROID_APP_STATE_VALUES_CREATED, 'created'). + +-define(ANDROID_APP_STATE_VALUES_BACKGROUND, 'background'). + +-define(ANDROID_APP_STATE_VALUES_FOREGROUND, 'foreground'). + + + +%% 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). +%% +-define(ANDROID_OS_API_LEVEL, 'android.os.api_level'). + +%% @deprecated Renamed to `android.app.state` +%% Deprecated. Use `android.app.state` instead. +-define(ANDROID_STATE, 'android.state'). + +-define(ANDROID_STATE_VALUES_CREATED, 'created'). + +-define(ANDROID_STATE_VALUES_BACKGROUND, 'background'). + +-define(ANDROID_STATE_VALUES_FOREGROUND, 'foreground'). + 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 00000000..9e8c2eb1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/app_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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/app_attributes.hrl"). + + +%% A unique identifier representing the installation of an application on a specific device +%% +-define(APP_INSTALLATION_ID, 'app.installation.id'). + + +%% 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 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 ca4cc4d1..30c9840b 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/artifact_attributes.hrl @@ -13,13 +13,15 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/artifact_attributes.hrl"). + %% The provenance filename of the built attestation which directly relates to the build artifact filename. This filename SHOULD accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information. %% -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 219b9082..b5c6eecd 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/aws_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/aws_attributes.hrl"). + %% The JSON-serialized value of each item in the `AttributeDefinitions` request field. -define(AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, 'aws.dynamodb.attribute_definitions'). @@ -147,6 +149,10 @@ -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 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'). @@ -172,7 +178,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'). 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 7038ced4..dcaed6a8 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,50 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/azure_attributes.hrl"). -%% The unique identifier of the service request. It's generated by the Azure service and returned with the response. --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'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl index a016ca03..b7f35347 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/browser_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/browser_attributes.hrl"). + %% Array of brand name and version separated by a space -define(BROWSER_BRANDS, 'browser.brands'). 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 00000000..e2877b8b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cassandra_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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cassandra_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). +%% +-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 76a45ed4..77f7042c 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cicd_attributes.hrl @@ -13,18 +13,67 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cicd_attributes.hrl"). + + +%% 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 +83,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 +116,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 687a9374..d669d743 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloud_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cloud_attributes.hrl"). + %% The cloud account ID the resource is assigned to. %% @@ -78,6 +80,10 @@ -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'). @@ -102,6 +108,8 @@ -define(CLOUD_PROVIDER_VALUES_IBM_CLOUD, 'ibm_cloud'). +-define(CLOUD_PROVIDER_VALUES_ORACLE_CLOUD, 'oracle_cloud'). + -define(CLOUD_PROVIDER_VALUES_TENCENT_CLOUD, 'tencent_cloud'). @@ -111,6 +119,6 @@ -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/cloudevents_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl index 97ef4a27..106a87e1 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudevents_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cloudevents_attributes.hrl"). + %% The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. %% 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 00000000..699a14f7 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cloudfoundry_attributes.hrl @@ -0,0 +1,71 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cloudfoundry_attributes.hrl"). + + +%% 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 8500b126..b383290c 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. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/code_attributes.hrl"). -%% 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 Replaced by `code.function.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. +%% Deprecated, namespace is now included into `code.function.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. -%% --define(CODE_STACKTRACE, 'code.stacktrace'). 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 f99c32b8..d906572d 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/container_attributes.hrl @@ -13,18 +13,20 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/container_attributes.hrl"). + %% The command used to run the container (i.e. the command name). %% -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'). @@ -40,7 +42,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'). 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 9ed41c80..191c9340 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/cpu_attributes.hrl @@ -13,6 +13,12 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/cpu_attributes.hrl"). + + +%% 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/db_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/db_attributes.hrl index 237c3025..602fb228 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,16 @@ -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 +110,78 @@ -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 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 Replaced by `db.response.status_code`. +%% 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,13 +189,13 @@ %% -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'). @@ -209,48 +219,38 @@ %% 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, use `db.namespace` instead. -define(DB_REDIS_DATABASE_INDEX, 'db.redis.database_index'). -%% @deprecated Replaced by `db.collection.name`. -%% Deprecated, use `db.collection.name` instead. + +%% 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, but only if not extracting the value from `db.query.text`. -define(DB_SQL_TABLE, 'db.sql.table'). %% @deprecated Replaced by `db.query.text`. %% 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'). @@ -365,16 +365,3 @@ %% @deprecated No replacement at this time. %% Deprecated, no replacement at this time. -define(DB_USER, 'db.user'). - -%% @deprecated Replaced by `db.client.connection.pool.name`. -%% Deprecated, use `db.client.connection.pool.name` instead. --define(POOL_NAME, 'pool.name'). - -%% @deprecated Replaced by `db.client.connection.state`. -%% Deprecated, use `db.client.connection.state` instead. --define(STATE, 'state'). - --define(STATE_VALUES_IDLE, 'idle'). - --define(STATE_VALUES_USED, 'used'). - 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 6c72d077..eb97a8a0 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/deployment_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/deployment_attributes.hrl"). + %% @deprecated Deprecated, use `deployment.environment.name` instead. %% 'Deprecated, use `deployment.environment.name` instead.' %% diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl index 3239960a..c9ff7dd0 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/destination_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/destination_attributes.hrl"). + %% Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -define(DESTINATION_ADDRESS, 'destination.address'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl index 8b75ec21..f09b21be 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/device_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/device_attributes.hrl"). + %% A unique identifier representing the device %% diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl index 7d6d8d96..e406b122 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/disk_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/disk_attributes.hrl"). + %% The disk IO operation direction. -define(DISK_IO_DIRECTION, 'disk.io.direction'). 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 b5399045..2558ff65 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/dns_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/dns_attributes.hrl"). + %% 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 00000000..a4ad2308 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/elasticsearch_attributes.hrl @@ -0,0 +1,21 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/elasticsearch_attributes.hrl"). + + +%% 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 82a015db..9ddc8d03 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/enduser_attributes.hrl @@ -13,10 +13,17 @@ %% 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. +-include_lib("opentelemetry_semantic_conventions/include/attributes/enduser_attributes.hrl"). + + +%% Unique identifier of an end user in the system. It maybe a username, email address, or other identifier. -define(ENDUSER_ID, 'enduser.id'). + +%% Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity. +%% +-define(ENDUSER_PSEUDO_ID, 'enduser.pseudo.id'). + %% @deprecated Replaced by `user.roles` attribute. %% Deprecated, use `user.roles` instead. -define(ENDUSER_ROLE, 'enduser.role'). 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 00000000..9d2e3674 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/error_attributes.hrl @@ -0,0 +1,20 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/error_attributes.hrl"). + + +%% 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 58b4dbd1..16792588 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,9 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/event_attributes.hrl"). +%% @deprecated Replaced by EventName top-level field on the LogRecord %% Identifies the class / type of event. %% -define(EVENT_NAME, 'event.name'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl index ab95f158..98fed413 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/faas_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/faas_attributes.hrl"). + %% A boolean that is true if the serverless function is executed for the first time (aka cold-start). %% 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 5b59e448..bf77f1a4 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 @@ -13,15 +13,87 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/feature_flag_attributes.hrl"). -%% 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'). + +%% @deprecated Replaced by `error.message`. +%% Deprecated, use `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. + + +%% 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 0ea28994..38d2985a 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/file_attributes.hrl @@ -13,6 +13,28 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/file_attributes.hrl"). + + +%% 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. %% @@ -24,11 +46,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 +99,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 e361f859..79901a6e 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/gcp_attributes.hrl @@ -13,6 +13,89 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/gcp_attributes.hrl"). + + +%% 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'). + %% Identifies the Google Cloud service for which the official client library is intended. -define(GCP_CLIENT_SERVICE, 'gcp.client.service'). 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 08e4ac33..575d7fb8 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 @@ -13,24 +13,102 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/gen_ai_attributes.hrl"). -%% 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'). + +%% @deprecated Removed, no replacement at this time. +%% Deprecated, use Event API to report completions contents. -define(GEN_AI_COMPLETION, 'gen_ai.completion'). +%% @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` attribute. +%% Deprecated, use `gen_ai.request.seed`. +-define(GEN_AI_OPENAI_REQUEST_SEED, 'gen_ai.openai.request.seed'). + + +%% The service tier requested. May be a specific tier, default, or auto. +-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'). + + + +%% The service tier used for the response. +-define(GEN_AI_OPENAI_RESPONSE_SERVICE_TIER, 'gen_ai.openai.response.service_tier'). + + +%% A fingerprint to track any eventual change in the Generative AI environment. +-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_CREATE_AGENT, 'create_agent'). + +-define(GEN_AI_OPERATION_NAME_VALUES_INVOKE_AGENT, 'invoke_agent'). + +-define(GEN_AI_OPERATION_NAME_VALUES_EXECUTE_TOOL, 'execute_tool'). + + + +%% 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'). -%% The full prompt sent to the GenAI model. +-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 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 +125,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'). @@ -80,12 +162,38 @@ -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_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 type of token being counted. @@ -95,6 +203,24 @@ -define(GEN_AI_TOKEN_TYPE_VALUES_COMPLETION, 'output'). +-define(GEN_AI_TOKEN_TYPE_VALUES_OUTPUT, 'output'). + + + +%% The tool call identifier. +-define(GEN_AI_TOOL_CALL_ID, 'gen_ai.tool.call.id'). + + +%% 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'). %% @deprecated Replaced by `gen_ai.usage.output_tokens` attribute. %% Deprecated, use `gen_ai.usage.output_tokens` instead. 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 00000000..12023ec9 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/geo_attributes.hrl @@ -0,0 +1,66 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/geo_attributes.hrl"). + + +%% 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/graphql_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl index 18b58ba4..13bbb31f 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/graphql_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/graphql_attributes.hrl"). + %% The GraphQL document being executed. -define(GRAPHQL_DOCUMENT, 'graphql.document'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl index 96595577..73bd7ea4 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/heroku_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/heroku_attributes.hrl"). + %% Unique identifier for the application %% diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl index 0a1e9e1c..18759353 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/host_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/host_attributes.hrl"). + %% The CPU architecture the host system is running on. %% 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 cf098bbb..30cfd46b 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/http_attributes.hrl @@ -63,8 +63,8 @@ %% -define(HTTP_REQUEST_SIZE, 'http.request.size'). -%% @deprecated Replaced by `http.request.header.content-length`. -%% Deprecated, use `http.request.header.content-length` instead. +%% @deprecated Replaced by `http.request.header.`. +%% Deprecated, use `http.request.header.` instead. -define(HTTP_REQUEST_CONTENT_LENGTH, 'http.request_content_length'). %% @deprecated Replaced by `http.request.body.size`. @@ -81,8 +81,8 @@ %% -define(HTTP_RESPONSE_SIZE, 'http.response.size'). -%% @deprecated Replaced by `http.response.header.content-length`. -%% Deprecated, use `http.response.header.content-length` instead. +%% @deprecated Replaced by `http.response.header.`. +%% Deprecated, use `http.response.header.` instead. -define(HTTP_RESPONSE_CONTENT_LENGTH, 'http.response_content_length'). %% @deprecated Replace by `http.response.body.size`. diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hw_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hw_attributes.hrl new file mode 100644 index 00000000..9bf54818 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/hw_attributes.hrl @@ -0,0 +1,77 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/hw_attributes.hrl"). + + +%% An identifier for the hardware component, unique within the monitored host +%% +-define(HW_ID, 'hw.id'). + + +%% An easily-recognizable name for the hardware component +%% +-define(HW_NAME, 'hw.name'). + + +%% Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller) +%% +-define(HW_PARENT, 'hw.parent'). + + +%% The current state of the component +%% +-define(HW_STATE, 'hw.state'). + +-define(HW_STATE_VALUES_OK, 'ok'). + +-define(HW_STATE_VALUES_DEGRADED, 'degraded'). + +-define(HW_STATE_VALUES_FAILED, 'failed'). + + + +%% 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'). + 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 61ccc98d..3e4de461 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/k8s_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/k8s_attributes.hrl"). + %% The name of the cluster. %% @@ -39,6 +41,16 @@ -define(K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON, 'k8s.container.status.last_terminated_reason'). +%% 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 +61,16 @@ -define(K8S_CRONJOB_UID, 'k8s.cronjob.uid'). +%% The annotation key-value pairs placed on the DaemonSet. +%% +-define(K8S_DAEMONSET_ANNOTATION, 'k8s.daemonset.annotation'). + + +%% The label key-value pairs placed on the DaemonSet. +%% +-define(K8S_DAEMONSET_LABEL, 'k8s.daemonset.label'). + + %% The name of the DaemonSet. %% -define(K8S_DAEMONSET_NAME, 'k8s.daemonset.name'). @@ -59,6 +81,16 @@ -define(K8S_DAEMONSET_UID, 'k8s.daemonset.uid'). +%% The annotation key-value pairs placed on the Deployment. +%% +-define(K8S_DEPLOYMENT_ANNOTATION, 'k8s.deployment.annotation'). + + +%% The label key-value pairs placed on the Deployment. +%% +-define(K8S_DEPLOYMENT_LABEL, 'k8s.deployment.label'). + + %% The name of the Deployment. %% -define(K8S_DEPLOYMENT_NAME, 'k8s.deployment.name'). @@ -69,6 +101,26 @@ -define(K8S_DEPLOYMENT_UID, 'k8s.deployment.uid'). +%% The name of the horizontal pod autoscaler. +%% +-define(K8S_HPA_NAME, 'k8s.hpa.name'). + + +%% The UID of the horizontal pod autoscaler. +%% +-define(K8S_HPA_UID, 'k8s.hpa.uid'). + + +%% The annotation key-value pairs placed on the Job. +%% +-define(K8S_JOB_ANNOTATION, 'k8s.job.annotation'). + + +%% The label key-value pairs placed on the Job. +%% +-define(K8S_JOB_LABEL, 'k8s.job.label'). + + %% The name of the Job. %% -define(K8S_JOB_NAME, 'k8s.job.name'). @@ -79,11 +131,41 @@ -define(K8S_JOB_UID, 'k8s.job.uid'). +%% The annotation key-value pairs placed on the Namespace. +%% +-define(K8S_NAMESPACE_ANNOTATION, 'k8s.namespace.annotation'). + + +%% The label key-value pairs placed on the Namespace. +%% +-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 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 +176,12 @@ -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. +%% The label placed on the Pod, the `` being the label name, the value being the label value. %% -define(K8S_POD_LABEL, 'k8s.pod.label'). @@ -118,6 +200,16 @@ -define(K8S_POD_UID, 'k8s.pod.uid'). +%% The annotation key-value pairs placed on the ReplicaSet. +%% +-define(K8S_REPLICASET_ANNOTATION, 'k8s.replicaset.annotation'). + + +%% The label key-value pairs placed on the ReplicaSet. +%% +-define(K8S_REPLICASET_LABEL, 'k8s.replicaset.label'). + + %% The name of the ReplicaSet. %% -define(K8S_REPLICASET_NAME, 'k8s.replicaset.name'). @@ -128,6 +220,36 @@ -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 UID of the resource quota. +%% +-define(K8S_RESOURCEQUOTA_UID, 'k8s.resourcequota.uid'). + + +%% The annotation key-value pairs placed on the StatefulSet. +%% +-define(K8S_STATEFULSET_ANNOTATION, 'k8s.statefulset.annotation'). + + +%% The label key-value pairs placed on the StatefulSet. +%% +-define(K8S_STATEFULSET_LABEL, 'k8s.statefulset.label'). + + %% The name of the StatefulSet. %% -define(K8S_STATEFULSET_NAME, 'k8s.statefulset.name'). @@ -136,3 +258,26 @@ %% The UID of the StatefulSet. %% -define(K8S_STATEFULSET_UID, 'k8s.statefulset.uid'). + + +%% 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 ca82508e..0eb4f6c5 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/linux_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/linux_attributes.hrl"). + %% 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 770f3718..c184030f 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/log_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/log_attributes.hrl"). + %% The basename of the file. %% @@ -44,7 +46,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/message_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/message_attributes.hrl new file mode 100644 index 00000000..3997975c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/message_attributes.hrl @@ -0,0 +1,37 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/message_attributes.hrl"). + +%% @deprecated Replaced by `rpc.message.compressed_size`. +%% Deprecated, use `rpc.message.compressed_size` instead. +-define(MESSAGE_COMPRESSED_SIZE, 'message.compressed_size'). + +%% @deprecated Replaced by `rpc.message.id`. +%% Deprecated, use `rpc.message.id` instead. +-define(MESSAGE_ID, 'message.id'). + +%% @deprecated Replaced by `rpc.message.type`. +%% Deprecated, use `rpc.message.type` instead. +-define(MESSAGE_TYPE, 'message.type'). + +-define(MESSAGE_TYPE_VALUES_SENT, 'SENT'). + +-define(MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). + + +%% @deprecated Replaced by `rpc.message.uncompressed_size`. +%% Deprecated, use `rpc.message.uncompressed_size` instead. +-define(MESSAGE_UNCOMPRESSED_SIZE, 'message.uncompressed_size'). 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 0fec8ffc..5a435002 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/messaging_attributes.hrl @@ -63,7 +63,6 @@ -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,7 +93,6 @@ -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'). @@ -110,7 +108,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 +155,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 +167,8 @@ -define(MESSAGING_OPERATION_TYPE_VALUES_DELIVER, 'deliver'). +-define(MESSAGING_OPERATION_TYPE_VALUES_PUBLISH, 'publish'). + %% RabbitMQ message routing key. @@ -182,7 +181,6 @@ -define(MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG, 'messaging.rabbitmq.message.delivery_tag'). %% @deprecated Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. -%% %% Deprecated, use `messaging.consumer.group.name` instead. %% -define(MESSAGING_ROCKETMQ_CLIENT_GROUP, 'messaging.rocketmq.client_group'). @@ -241,9 +239,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'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/net_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/net_attributes.hrl new file mode 100644 index 00000000..9be9a3e7 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/net_attributes.hrl @@ -0,0 +1,94 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/net_attributes.hrl"). + +%% @deprecated Replaced by `network.local.address`. +%% Deprecated, use `network.local.address`. +-define(NET_HOST_IP, 'net.host.ip'). + +%% @deprecated Replaced by `server.address`. +%% Deprecated, use `server.address`. +-define(NET_HOST_NAME, 'net.host.name'). + +%% @deprecated Replaced by `server.port`. +%% Deprecated, use `server.port`. +-define(NET_HOST_PORT, 'net.host.port'). + +%% @deprecated Replaced by `network.peer.address`. +%% Deprecated, use `network.peer.address`. +-define(NET_PEER_IP, 'net.peer.ip'). + +%% @deprecated Replaced by `server.address` on client spans and `client.address` on server spans. +%% Deprecated, use `server.address` on client spans and `client.address` on server spans. +-define(NET_PEER_NAME, 'net.peer.name'). + +%% @deprecated Replaced by `server.port` on client spans and `client.port` on server spans. +%% Deprecated, use `server.port` on client spans and `client.port` on server spans. +-define(NET_PEER_PORT, 'net.peer.port'). + +%% @deprecated Replaced by `network.protocol.name`. +%% Deprecated, use `network.protocol.name`. +-define(NET_PROTOCOL_NAME, 'net.protocol.name'). + +%% @deprecated Replaced by `network.protocol.version`. +%% Deprecated, use `network.protocol.version`. +-define(NET_PROTOCOL_VERSION, 'net.protocol.version'). + +%% @deprecated Split to `network.transport` and `network.type`. +%% Deprecated, use `network.transport` and `network.type`. +-define(NET_SOCK_FAMILY, 'net.sock.family'). + +-define(NET_SOCK_FAMILY_VALUES_INET, 'inet'). + +-define(NET_SOCK_FAMILY_VALUES_INET6, 'inet6'). + +-define(NET_SOCK_FAMILY_VALUES_UNIX, 'unix'). + + +%% @deprecated Replaced by `network.local.address`. +%% Deprecated, use `network.local.address`. +-define(NET_SOCK_HOST_ADDR, 'net.sock.host.addr'). + +%% @deprecated Replaced by `network.local.port`. +%% Deprecated, use `network.local.port`. +-define(NET_SOCK_HOST_PORT, 'net.sock.host.port'). + +%% @deprecated Replaced by `network.peer.address`. +%% Deprecated, use `network.peer.address`. +-define(NET_SOCK_PEER_ADDR, 'net.sock.peer.addr'). + +%% @deprecated Removed. +%% Deprecated, no replacement at this time. +-define(NET_SOCK_PEER_NAME, 'net.sock.peer.name'). + +%% @deprecated Replaced by `network.peer.port`. +%% Deprecated, use `network.peer.port`. +-define(NET_SOCK_PEER_PORT, 'net.sock.peer.port'). + +%% @deprecated Replaced by `network.transport`. +%% Deprecated, use `network.transport`. +-define(NET_TRANSPORT, 'net.transport'). + +-define(NET_TRANSPORT_VALUES_IP_TCP, 'ip_tcp'). + +-define(NET_TRANSPORT_VALUES_IP_UDP, 'ip_udp'). + +-define(NET_TRANSPORT_VALUES_PIPE, 'pipe'). + +-define(NET_TRANSPORT_VALUES_INPROC, 'inproc'). + +-define(NET_TRANSPORT_VALUES_OTHER, 'other'). + 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 01a700e4..974e339f 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/network_attributes.hrl @@ -15,99 +15,48 @@ %%%------------------------------------------------------------------------- -include_lib("opentelemetry_semantic_conventions/include/attributes/network_attributes.hrl"). -%% @deprecated Replaced by `network.local.address`. -%% Deprecated, use `network.local.address`. --define(NET_HOST_IP, 'net.host.ip'). - -%% @deprecated Replaced by `server.address`. -%% Deprecated, use `server.address`. --define(NET_HOST_NAME, 'net.host.name'). - -%% @deprecated Replaced by `server.port`. -%% Deprecated, use `server.port`. --define(NET_HOST_PORT, 'net.host.port'). - -%% @deprecated Replaced by `network.peer.address`. -%% Deprecated, use `network.peer.address`. --define(NET_PEER_IP, 'net.peer.ip'). - -%% @deprecated Replaced by `server.address` on client spans and `client.address` on server spans. -%% Deprecated, use `server.address` on client spans and `client.address` on server spans. --define(NET_PEER_NAME, 'net.peer.name'). - -%% @deprecated Replaced by `server.port` on client spans and `client.port` on server spans. -%% Deprecated, use `server.port` on client spans and `client.port` on server spans. --define(NET_PEER_PORT, 'net.peer.port'). - -%% @deprecated Replaced by `network.protocol.name`. -%% Deprecated, use `network.protocol.name`. --define(NET_PROTOCOL_NAME, 'net.protocol.name'). - -%% @deprecated Replaced by `network.protocol.version`. -%% Deprecated, use `network.protocol.version`. --define(NET_PROTOCOL_VERSION, 'net.protocol.version'). - -%% @deprecated Split to `network.transport` and `network.type`. -%% Deprecated, use `network.transport` and `network.type`. --define(NET_SOCK_FAMILY, 'net.sock.family'). - --define(NET_SOCK_FAMILY_VALUES_INET, 'inet'). - --define(NET_SOCK_FAMILY_VALUES_INET6, 'inet6'). - --define(NET_SOCK_FAMILY_VALUES_UNIX, 'unix'). +%% The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. +-define(NETWORK_CARRIER_ICC, 'network.carrier.icc'). -%% @deprecated Replaced by `network.local.address`. -%% Deprecated, use `network.local.address`. --define(NET_SOCK_HOST_ADDR, 'net.sock.host.addr'). -%% @deprecated Replaced by `network.local.port`. -%% Deprecated, use `network.local.port`. --define(NET_SOCK_HOST_PORT, 'net.sock.host.port'). +%% The mobile carrier country code. +-define(NETWORK_CARRIER_MCC, 'network.carrier.mcc'). -%% @deprecated Replaced by `network.peer.address`. -%% Deprecated, use `network.peer.address`. --define(NET_SOCK_PEER_ADDR, 'net.sock.peer.addr'). -%% @deprecated Removed. -%% Deprecated, no replacement at this time. --define(NET_SOCK_PEER_NAME, 'net.sock.peer.name'). +%% The mobile carrier network code. +-define(NETWORK_CARRIER_MNC, 'network.carrier.mnc'). -%% @deprecated Replaced by `network.peer.port`. -%% Deprecated, use `network.peer.port`. --define(NET_SOCK_PEER_PORT, 'net.sock.peer.port'). -%% @deprecated Replaced by `network.transport`. -%% Deprecated, use `network.transport`. --define(NET_TRANSPORT, 'net.transport'). +%% The name of the mobile carrier. +-define(NETWORK_CARRIER_NAME, 'network.carrier.name'). --define(NET_TRANSPORT_VALUES_IP_TCP, 'ip_tcp'). --define(NET_TRANSPORT_VALUES_IP_UDP, 'ip_udp'). +%% The state of network connection +-define(NETWORK_CONNECTION_STATE, 'network.connection.state'). --define(NET_TRANSPORT_VALUES_PIPE, 'pipe'). +-define(NETWORK_CONNECTION_STATE_VALUES_CLOSED, 'closed'). --define(NET_TRANSPORT_VALUES_INPROC, 'inproc'). +-define(NETWORK_CONNECTION_STATE_VALUES_CLOSE_WAIT, 'close_wait'). --define(NET_TRANSPORT_VALUES_OTHER, 'other'). +-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'). -%% The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. --define(NETWORK_CARRIER_ICC, 'network.carrier.icc'). +-define(NETWORK_CONNECTION_STATE_VALUES_FIN_WAIT_2, 'fin_wait_2'). +-define(NETWORK_CONNECTION_STATE_VALUES_LAST_ACK, 'last_ack'). -%% The mobile carrier country code. --define(NETWORK_CARRIER_MCC, 'network.carrier.mcc'). +-define(NETWORK_CONNECTION_STATE_VALUES_LISTEN, 'listen'). +-define(NETWORK_CONNECTION_STATE_VALUES_SYN_RECEIVED, 'syn_received'). -%% The mobile carrier network code. --define(NETWORK_CARRIER_MNC, 'network.carrier.mnc'). +-define(NETWORK_CONNECTION_STATE_VALUES_SYN_SENT, 'syn_sent'). +-define(NETWORK_CONNECTION_STATE_VALUES_TIME_WAIT, 'time_wait'). -%% The name of the mobile carrier. --define(NETWORK_CARRIER_NAME, 'network.carrier.name'). %% This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. @@ -172,6 +121,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/oci_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl index 18bab4a8..69dd378b 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/oci_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/oci_attributes.hrl"). + %% The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. %% diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl index 6ac28d2d..1d8d75ba 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/opentracing_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/opentracing_attributes.hrl"). + %% Parent-child Reference type -define(OPENTRACING_REF_TYPE, 'opentracing.ref_type'). 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 93a0b251..017a5296 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/os_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/os_attributes.hrl"). + %% Unique identifier for a particular build or compilation of the operating system. -define(OS_BUILD_ID, 'os.build_id'). 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 13575604..d942e38b 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,62 @@ %% 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_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'). + + +%% @deprecated Use the `otel.scope.name` attribute. +%% Deprecated. Use the `otel.scope.name` attribute -define(OTEL_LIBRARY_NAME, 'otel.library.name'). -%% @deprecated use the `otel.scope.version` attribute. -%% +%% @deprecated Use the `otel.scope.version` attribute. +%% Deprecated. Use the `otel.scope.version` attribute. -define(OTEL_LIBRARY_VERSION, 'otel.library.version'). + + +%% 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/other_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/other_attributes.hrl new file mode 100644 index 00000000..6cea2f11 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/other_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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/other_attributes.hrl"). + +%% @deprecated Replaced by `db.client.connection.state`. +%% Deprecated, use `db.client.connection.state` instead. +-define(STATE, 'state'). + +-define(STATE_VALUES_IDLE, 'idle'). + +-define(STATE_VALUES_USED, 'used'). + 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 3dfee4e6..c49dfec3 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/peer_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/peer_attributes.hrl"). + %% 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. %% diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pool_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pool_attributes.hrl new file mode 100644 index 00000000..c27564a8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/pool_attributes.hrl @@ -0,0 +1,20 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/pool_attributes.hrl"). + +%% @deprecated Replaced by `db.client.connection.pool.name`. +%% Deprecated, use `db.client.connection.pool.name` instead. +-define(POOL_NAME, 'pool.name'). 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 9910359d..4d2c8b25 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/process_attributes.hrl @@ -13,6 +13,13 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/process_attributes.hrl"). + + +%% 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`. %% @@ -54,7 +61,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,6 +116,10 @@ -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'). @@ -149,6 +185,11 @@ -define(PROCESS_SESSION_LEADER_PID, 'process.session_leader.pid'). +%% 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 +203,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 00000000..3b414eaf --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/profile_attributes.hrl @@ -0,0 +1,46 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/profile_attributes.hrl"). + + +%% 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 a8bdc1e4..bcf00f48 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/rpc_attributes.hrl @@ -13,29 +13,10 @@ %% 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. --define(MESSAGE_COMPRESSED_SIZE, 'message.compressed_size'). +-include_lib("opentelemetry_semantic_conventions/include/attributes/rpc_attributes.hrl"). -%% @deprecated Replaced by `rpc.message.id`. -%% Deprecated, use `rpc.message.id` instead. --define(MESSAGE_ID, 'message.id'). -%% @deprecated Replaced by `rpc.message.type`. -%% Deprecated, use `rpc.message.type` instead. --define(MESSAGE_TYPE, 'message.type'). - --define(MESSAGE_TYPE_VALUES_SENT, 'SENT'). - --define(MESSAGE_TYPE_VALUES_RECEIVED, 'RECEIVED'). - - -%% @deprecated Replaced by `rpc.message.uncompressed_size`. -%% Deprecated, use `rpc.message.uncompressed_size` instead. --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. +%% The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. -define(RPC_CONNECT_RPC_ERROR_CODE, 'rpc.connect_rpc.error_code'). -define(RPC_CONNECT_RPC_ERROR_CODE_VALUES_CANCELLED, 'cancelled'). 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 00000000..19950506 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/security_rule_attributes.hrl @@ -0,0 +1,56 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/security_rule_attributes.hrl"). + + +%% 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/session_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl index b44e753a..35cbf93a 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/session_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/session_attributes.hrl"). + %% A unique id to identify a session. -define(SESSION_ID, 'session.id'). diff --git a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl index 4f7c3f9b..79011737 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/source_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/source_attributes.hrl"). + %% Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -define(SOURCE_ADDRESS, 'source.address'). 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 0b874cc0..74aa22f0 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/system_attributes.hrl @@ -13,8 +13,10 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/system_attributes.hrl"). -%% The logical CPU number [0..n-1] + +%% Deprecated, use `cpu.logical_number` instead. -define(SYSTEM_CPU_LOGICAL_NUMBER, 'system.cpu.logical_number'). %% @deprecated Replaced by `cpu.mode` @@ -91,8 +93,8 @@ -define(SYSTEM_MEMORY_STATE_VALUES_CACHED, 'cached'). - -%% A stateless protocol MUST NOT set this attribute +%% @deprecated Removed, report network connection state with `network.connection.state` attribute +%% Deprecated, use `network.connection.state` instead. -define(SYSTEM_NETWORK_STATE, 'system.network.state'). -define(SYSTEM_NETWORK_STATE_VALUES_CLOSE, 'close'). 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 4b308f77..dcf68573 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/test_attributes.hrl @@ -13,8 +13,10 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/test_attributes.hrl"). -%% 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 +31,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/thread_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl index 8eec8d36..3652468e 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/thread_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/thread_attributes.hrl"). + %% Current "managed" thread ID (as opposed to OS thread ID). %% 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 7918f446..de467c78 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/tls_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/tls_attributes.hrl"). + %% String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. %% @@ -59,7 +61,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 +87,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 +97,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 b60d96c8..94765411 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/user_attributes.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl index 9ac3fe22..f23cbfca 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/user_attributes.hrl @@ -13,6 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/user_attributes.hrl"). + %% User email address. %% 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 b3a3b83c..5fb4d21e 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/attributes/vcs_attributes.hrl @@ -13,29 +13,141 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- +-include_lib("opentelemetry_semantic_conventions/include/attributes/vcs_attributes.hrl"). -%% 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 Deprecated, use `vcs.change.id` instead. +%% Deprecated, use `vcs.change.id` instead. +%% +-define(VCS_REPOSITORY_CHANGE_ID, 'vcs.repository.change.id'). + +%% @deprecated Deprecated, use `vcs.change.title` instead. +%% 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 Deprecated, use `vcs.ref.head.name` instead. +%% Deprecated, use `vcs.ref.head.name` instead. +%% +-define(VCS_REPOSITORY_REF_NAME, 'vcs.repository.ref.name'). + +%% @deprecated Deprecated, use `vcs.ref.head.revision` instead. +%% Deprecated, use `vcs.ref.head.revision` instead. +%% +-define(VCS_REPOSITORY_REF_REVISION, 'vcs.repository.ref.revision'). + +%% @deprecated Deprecated, use `vcs.ref.head.type` instead. +%% 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 +156,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?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) 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/metrics/azure_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/azure_metrics.hrl new file mode 100644 index 00000000..871866b8 --- /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 00000000..f3d3a022 --- /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 70487615..60548232 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/container_metrics.hrl @@ -18,6 +18,10 @@ -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'). @@ -28,3 +32,7 @@ %% 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 00000000..6fcaa58c --- /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. +%%%------------------------------------------------------------------------- + +%% Operating frequency of the logical CPU in Hertz. +-define(CPU_FREQUENCY, 'cpu.frequency'). + + +%% Seconds each logical CPU spent on each mode +-define(CPU_TIME, 'cpu.time'). + + +%% 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(CPU_UTILIZATION, 'cpu.utilization'). 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 d68836a3..5b33f246 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/db_metrics.hrl @@ -34,7 +34,7 @@ -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'). @@ -85,6 +85,14 @@ %% 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/hw_metrics.hrl b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/hw_metrics.hrl new file mode 100644 index 00000000..eddd2374 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/hw_metrics.hrl @@ -0,0 +1,48 @@ + +%%%------------------------------------------------------------------------ +%% 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. +%%%------------------------------------------------------------------------- + +%% Energy consumed by the component +-define(HW_ENERGY, 'hw.energy'). + + +%% Number of errors encountered by the component +-define(HW_ERRORS, 'hw.errors'). + + +%% 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'). + + +%% Instantaneous power consumed by the component +-define(HW_POWER, 'hw.power'). + + +%% Operational status: `1` (true) or `0` (false) for each of the possible states +-define(HW_STATUS, 'hw.status'). 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 00000000..e33e4e46 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/k8s_metrics.hrl @@ -0,0 +1,170 @@ + +%%%------------------------------------------------------------------------ +%% 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 actively running jobs for a cronjob +-define(K8S_CRONJOB_ACTIVE_JOBS, 'k8s.cronjob.active_jobs'). + + +%% Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod +-define(K8S_DAEMONSET_CURRENT_SCHEDULED_NODES, 'k8s.daemonset.current_scheduled_nodes'). + + +%% Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod) +-define(K8S_DAEMONSET_DESIRED_SCHEDULED_NODES, 'k8s.daemonset.desired_scheduled_nodes'). + + +%% Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod +-define(K8S_DAEMONSET_MISSCHEDULED_NODES, 'k8s.daemonset.misscheduled_nodes'). + + +%% 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_READY_NODES, 'k8s.daemonset.ready_nodes'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment +-define(K8S_DEPLOYMENT_AVAILABLE_PODS, 'k8s.deployment.available_pods'). + + +%% Number of desired replica pods in this deployment +-define(K8S_DEPLOYMENT_DESIRED_PODS, 'k8s.deployment.desired_pods'). + + +%% Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler +-define(K8S_HPA_CURRENT_PODS, 'k8s.hpa.current_pods'). + + +%% Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler +-define(K8S_HPA_DESIRED_PODS, 'k8s.hpa.desired_pods'). + + +%% The upper limit for the number of replica pods to which the autoscaler can scale up +-define(K8S_HPA_MAX_PODS, 'k8s.hpa.max_pods'). + + +%% The lower limit for the number of replica pods to which the autoscaler can scale down +-define(K8S_HPA_MIN_PODS, 'k8s.hpa.min_pods'). + + +%% The number of pending and actively running pods for a job +-define(K8S_JOB_ACTIVE_PODS, 'k8s.job.active_pods'). + + +%% The desired number of successfully finished pods the job should be run with +-define(K8S_JOB_DESIRED_SUCCESSFUL_PODS, 'k8s.job.desired_successful_pods'). + + +%% The number of pods which reached phase Failed for a job +-define(K8S_JOB_FAILED_PODS, 'k8s.job.failed_pods'). + + +%% The max desired number of pods the job should run at any given time +-define(K8S_JOB_MAX_PARALLEL_PODS, 'k8s.job.max_parallel_pods'). + + +%% The number of pods which reached phase Succeeded for a job +-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'). + + +%% 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'). + + +%% Memory usage of the Node +-define(K8S_NODE_MEMORY_USAGE, 'k8s.node.memory.usage'). + + +%% 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'). + + +%% 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'). + + +%% Memory usage of the Pod +-define(K8S_POD_MEMORY_USAGE, 'k8s.pod.memory.usage'). + + +%% 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'). + + +%% The time the Pod has been running +-define(K8S_POD_UPTIME, 'k8s.pod.uptime'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset +-define(K8S_REPLICASET_AVAILABLE_PODS, 'k8s.replicaset.available_pods'). + + +%% Number of desired replica pods in this replicaset +-define(K8S_REPLICASET_DESIRED_PODS, 'k8s.replicaset.desired_pods'). + +%% @deprecated Replaced by `k8s.replicationcontroller.available_pods`. +%% Deprecated, use `k8s.replicationcontroller.available_pods` instead. +-define(K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS, 'k8s.replication_controller.available_pods'). + +%% @deprecated Replaced by `k8s.replicationcontroller.desired_pods`. +%% Deprecated, use `k8s.replicationcontroller.desired_pods` instead. +-define(K8S_REPLICATION_CONTROLLER_DESIRED_PODS, 'k8s.replication_controller.desired_pods'). + + +%% Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller +-define(K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS, 'k8s.replicationcontroller.available_pods'). + + +%% Number of desired replica pods in this replication controller +-define(K8S_REPLICATIONCONTROLLER_DESIRED_PODS, 'k8s.replicationcontroller.desired_pods'). + + +%% The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision +-define(K8S_STATEFULSET_CURRENT_PODS, 'k8s.statefulset.current_pods'). + + +%% Number of desired replica pods in this statefulset +-define(K8S_STATEFULSET_DESIRED_PODS, 'k8s.statefulset.desired_pods'). + + +%% The number of replica pods created for this statefulset with a Ready Condition +-define(K8S_STATEFULSET_READY_PODS, 'k8s.statefulset.ready_pods'). + + +%% Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision +-define(K8S_STATEFULSET_UPDATED_PODS, 'k8s.statefulset.updated_pods'). 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 381d81d6..5ac7e9a4 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'). 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 00000000..c561bbf8 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/otel_metrics.hrl @@ -0,0 +1,102 @@ + +%%%------------------------------------------------------------------------ +%% 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 Renamed to `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 Renamed to `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 Renamed to `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'). + + +%% The number of created spans for which the end operation was called +-define(OTEL_SDK_SPAN_ENDED, 'otel.sdk.span.ended'). + +%% @deprecated Renamed to `otel.sdk.span.ended`. +%% Deprecated, use `otel.sdk.span.ended` instead. +-define(OTEL_SDK_SPAN_ENDED_COUNT, 'otel.sdk.span.ended.count'). + + +%% The number of created spans for which the end operation has not been called yet +-define(OTEL_SDK_SPAN_LIVE, 'otel.sdk.span.live'). + +%% @deprecated Renamed to `otel.sdk.span.live`. +%% Deprecated, use `otel.sdk.span.live` instead. +-define(OTEL_SDK_SPAN_LIVE_COUNT, 'otel.sdk.span.live.count'). 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 e4dbe3ba..16064515 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/process_metrics.hrl @@ -52,3 +52,7 @@ %% Process threads count. -define(PROCESS_THREAD_COUNT, 'process.thread.count'). + + +%% The time the process has been running. +-define(PROCESS_UPTIME, 'process.uptime'). 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 5e38b8d6..361cba58 100644 --- a/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl +++ b/apps/opentelemetry_semantic_conventions/include/incubating/metrics/system_metrics.hrl @@ -13,8 +13,8 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- - -%% Reports the current frequency of the CPU in Hz +%% @deprecated Replaced by `cpu.frequency`. +%% Deprecated. Use `cpu.frequency` instead. -define(SYSTEM_CPU_FREQUENCY, 'system.cpu.frequency'). @@ -25,16 +25,16 @@ %% 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 +%% @deprecated Replaced by `cpu.time`. +%% Deprecated. Use `cpu.time` instead. -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 +%% @deprecated Replaced by `cpu.utilization`. +%% Deprecated. Use `cpu.utilization` instead. -define(SYSTEM_CPU_UTILIZATION, 'system.cpu.utilization'). -%% none +%% -define(SYSTEM_DISK_IO, 'system.disk.io'). @@ -42,7 +42,11 @@ -define(SYSTEM_DISK_IO_TIME, 'system.disk.io_time'). -%% none +%% The total storage capacity of the disk +-define(SYSTEM_DISK_LIMIT, 'system.disk.limit'). + + +%% -define(SYSTEM_DISK_MERGED, 'system.disk.merged'). @@ -50,15 +54,19 @@ -define(SYSTEM_DISK_OPERATION_TIME, 'system.disk.operation_time'). -%% none +%% -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 +%% -define(SYSTEM_FILESYSTEM_UTILIZATION, 'system.filesystem.utilization'). @@ -82,11 +90,11 @@ -define(SYSTEM_MEMORY_USAGE, 'system.memory.usage'). -%% none +%% -define(SYSTEM_MEMORY_UTILIZATION, 'system.memory.utilization'). -%% none +%% -define(SYSTEM_NETWORK_CONNECTIONS, 'system.network.connections'). @@ -98,19 +106,19 @@ -define(SYSTEM_NETWORK_ERRORS, 'system.network.errors'). -%% none +%% -define(SYSTEM_NETWORK_IO, 'system.network.io'). -%% none +%% -define(SYSTEM_NETWORK_PACKETS, 'system.network.packets'). -%% none +%% -define(SYSTEM_PAGING_FAULTS, 'system.paging.faults'). -%% none +%% -define(SYSTEM_PAGING_OPERATIONS, 'system.paging.operations'). @@ -118,7 +126,7 @@ -define(SYSTEM_PAGING_USAGE, 'system.paging.usage'). -%% none +%% -define(SYSTEM_PAGING_UTILIZATION, 'system.paging.utilization'). @@ -128,3 +136,7 @@ %% 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 00000000..58fc9aff --- /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 00000000..b55e4376 --- /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/lib/attributes/code_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/code_attributes.ex new file mode 100644 index 00000000..ab94da28 --- /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 00000000..56cf7497 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/db_attributes.ex @@ -0,0 +1,513 @@ +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/database/database-spans.md#generating-a-summary-of-the-query) + section. + + ### 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/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. + 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 be7cbd23..85d61a0b 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/error_attributes.ex @@ -38,8 +38,8 @@ defmodule OpenTelemetry.SemConv.ErrorAttributes do If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it's RECOMMENDED to: - * Use a domain-specific attribute - * Set `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 7bb01402..90054143 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/exception_attributes.ex @@ -4,46 +4,8 @@ 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 - - iex> OpenTelemetry.SemConv.ExceptionAttributes.exception_escaped() - :"exception.escaped" - - ### Erlang - - ```erlang - ?EXCEPTION_ESCAPED. - 'exception.escaped' - ``` - - + @deprecated """ + It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. """ @spec exception_escaped :: :"exception.escaped" def exception_escaped do @@ -92,6 +54,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 2264b2a9..4a0c54e8 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\"]"] ``` @@ -222,14 +235,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\"]"] ``` diff --git a/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/network_attributes.ex index 75aa42f4..23f32e0c 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 @@ -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/url_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex index a5fa0b6c..682552f3 100644 --- a/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/attributes/url_attributes.ex @@ -44,9 +44,29 @@ 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. + + 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 +142,19 @@ 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. + + 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 e7b7ce2c..7a1571b9 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/android_attributes.ex @@ -4,6 +4,79 @@ 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). @@ -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` 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 """ + Renamed to `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 00000000..2ff3707e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/app_attributes.ex @@ -0,0 +1,197 @@ +defmodule OpenTelemetry.SemConv.Incubating.AppAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for App attributes. + """ + + @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 [here](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 """ + 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 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 dcabd888..2a90a8d2 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 4adf3a02..01f11a7d 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/aws_attributes.ex @@ -12,7 +12,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }"] + [["{ \"AttributeName\": \"string\", \"AttributeType\": \"string\" }"]] ``` @@ -44,7 +44,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["lives", "id"] + [["lives", "id"]] ``` @@ -103,7 +103,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 +199,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 +232,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 +360,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 +643,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["Users", "Cats"] + [["Users", "Cats"]] ``` @@ -988,6 +988,38 @@ 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 full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). @@ -1037,7 +1069,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 +1106,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["/aws/lambda/my-function", "opentelemetry-service"] + [["/aws/lambda/my-function", "opentelemetry-service"]] ``` @@ -1111,7 +1143,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 +1176,7 @@ defmodule OpenTelemetry.SemConv.Incubating.AWSAttributes do ### Examples ``` - ["logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"] + [["logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"]] ``` @@ -1169,7 +1201,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()`. 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 e7ef58e0..e048ae54 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/azure_attributes.ex @@ -5,34 +5,290 @@ defmodule OpenTelemetry.SemConv.Incubating.AzureAttributes do """ @doc """ - The unique identifier of the service request. It's generated by the Azure service and returned with the response. + The unique identifier of the client instance. ### Value type Value must be of type `atom() | String.t()`. ### Examples ``` - ["00000000-0000-0000-0000-000000000000"] + ["3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.az_service_request_id() - :"az.service_request_id" + iex> OpenTelemetry.SemConv.Incubating.AzureAttributes.azure_client_id() + :"azure.client.id" ### Erlang ```erlang - ?AZ_SERVICE_REQUEST_ID. - 'az.service_request_id' + ?AZURE_CLIENT_ID. + 'azure.client.id' ``` """ - @spec az_service_request_id :: :"az.service_request_id" - def az_service_request_id do - :"az.service_request_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`)^ + * `: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 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/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location) + + ### 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 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 63b85baf..79154c38 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 00000000..06023541 --- /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`)^ + * `: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 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 af727996..609cc36f 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cicd_attributes.ex @@ -1,9 +1,75 @@ -defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do +defmodule OpenTelemetry.SemConv.Incubating.CICDAttributes do # This is an auto-generated file @moduledoc """ - OpenTelemetry Semantic Conventions for Cicd attributes. + 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. @@ -20,7 +86,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_name() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_name() :"cicd.pipeline.name" ### Erlang @@ -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. @@ -53,7 +194,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_run_id() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_run_id() :"cicd.pipeline.run.id" ### Erlang @@ -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 @@ -86,7 +327,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_name() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_name() :"cicd.pipeline.task.name" ### Erlang @@ -119,7 +360,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_id() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_run_id() :"cicd.pipeline.task.run.id" ### Erlang @@ -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 @@ -152,7 +468,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_run_url_full() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_run_url_full() :"cicd.pipeline.task.run.url.full" ### Erlang @@ -197,13 +513,13 @@ defmodule OpenTelemetry.SemConv.Incubating.CicdAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type() + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_type() :"cicd.pipeline.task.type" - iex> OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type_values().build + iex> OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_type_values().build :build - iex> %{OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type() => OpenTelemetry.SemConv.Incubating.CicdAttributes.cicd_pipeline_task_type_values().build} + iex> %{OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_type() => OpenTelemetry.SemConv.Incubating.CICDAttributes.cicd_pipeline_task_type_values().build} %{:"cicd.pipeline.task.type" => :build} ### Erlang @@ -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/client_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/client_attributes.ex new file mode 100644 index 00000000..38066bc6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/client_attributes.ex @@ -0,0 +1,9 @@ +defmodule OpenTelemetry.SemConv.Incubating.ClientAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Client attributes. + """ + defdelegate client_address(), to: OpenTelemetry.SemConv.ClientAttributes + + defdelegate client_port(), to: OpenTelemetry.SemConv.ClientAttributes +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 9301dfce..5d418ca6 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cloud_attributes.ex @@ -104,6 +104,8 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do * `: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 * `: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) @@ -134,6 +136,8 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp_app_engine => :gcp_app_engine, :gcp_openshift => :gcp_openshift, :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 @@ -208,6 +212,8 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp_app_engine => :gcp_app_engine, :gcp_openshift => :gcp_openshift, :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 @@ -225,6 +231,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do * `:gcp` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Google Cloud Platform * `:heroku` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Heroku Platform as a Service * `: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 """ @type cloud_provider_values() :: %{ @@ -234,6 +241,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp => :gcp, :heroku => :heroku, :ibm_cloud => :ibm_cloud, + :oracle_cloud => :oracle_cloud, :tencent_cloud => :tencent_cloud } @doc """ @@ -283,6 +291,7 @@ defmodule OpenTelemetry.SemConv.Incubating.CloudAttributes do :gcp => :gcp, :heroku => :heroku, :ibm_cloud => :ibm_cloud, + :oracle_cloud => :oracle_cloud, :tencent_cloud => :tencent_cloud } end @@ -325,7 +334,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 +347,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://docs.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 00000000..12584589 --- /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 154e989a..8a0e481f 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/code_attributes.ex @@ -3,202 +3,53 @@ defmodule OpenTelemetry.SemConv.Incubating.CodeAttributes do @moduledoc """ OpenTelemetry Semantic Conventions for Code attributes. """ + defdelegate code_column_number(), to: OpenTelemetry.SemConv.CodeAttributes - @doc """ - The column number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. + defdelegate code_file_path(), to: OpenTelemetry.SemConv.CodeAttributes - ### Value type + defdelegate code_function_name(), to: OpenTelemetry.SemConv.CodeAttributes - Value must be of type `integer()`. - ### Examples + defdelegate code_line_number(), to: OpenTelemetry.SemConv.CodeAttributes - ``` - 16 - ``` + defdelegate code_stacktrace(), to: OpenTelemetry.SemConv.CodeAttributes - - - ### 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 - ``` - - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.CodeAttributes.code_function() - :"code.function" - - ### Erlang - - ```erlang - ?CODE_FUNCTION. - 'code.function' - ``` - - + @deprecated """ + Replaced by `code.function.name` """ @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 - - ```erlang - ?CODE_NAMESPACE. - 'code.namespace' - ``` - - + @deprecated """ + Value should be included in `code.function.name` which is expected to be a fully-qualified name. """ @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 531bd0fb..cad3edc5 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 @@ -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 @@ -255,7 +329,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ContainerAttributes do ### Examples ``` - ["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"] + [["example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"]] ``` @@ -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"] ``` 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 b953cb15..a7663bd9 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/cpu_attributes.ex @@ -1,9 +1,41 @@ -defmodule OpenTelemetry.SemConv.Incubating.CpuAttributes do +defmodule OpenTelemetry.SemConv.Incubating.CPUAttributes do # This is an auto-generated file @moduledoc """ - OpenTelemetry Semantic Conventions for Cpu attributes. + 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 @@ -40,13 +72,13 @@ defmodule OpenTelemetry.SemConv.Incubating.CpuAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode() + iex> OpenTelemetry.SemConv.Incubating.CPUAttributes.cpu_mode() :"cpu.mode" - iex> OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode_values().user + iex> OpenTelemetry.SemConv.Incubating.CPUAttributes.cpu_mode_values().user :user - iex> %{OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode() => OpenTelemetry.SemConv.Incubating.CpuAttributes.cpu_mode_values().user} + iex> %{OpenTelemetry.SemConv.Incubating.CPUAttributes.cpu_mode() => OpenTelemetry.SemConv.Incubating.CPUAttributes.cpu_mode_values().user} %{:"cpu.mode" => :user} ### Erlang 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 7cc22a87..d305520e 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/db_attributes.ex @@ -3,10 +3,28 @@ 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`)^ @@ -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 @@ -386,79 +254,16 @@ 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" def db_connection_string 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 +271,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 +297,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 +342,44 @@ 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`)^ + * `:batch` ^[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`)^ + * `: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`)^ - * `:upsert` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:batch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:patch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:query` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ * `:query_plan` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:execute_javascript` ^[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 """ + No replacement at this time. """ @spec db_cosmosdb_operation_type :: :"db.cosmosdb.operation_type" def db_cosmosdb_operation_type do @@ -606,141 +389,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 """ + Replaced by `db.response.status_code`. """ @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 +455,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 @@ -865,45 +511,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 +520,69 @@ 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. - - ### Examples - - ``` - ["findAndModify", "HMSET", "SELECT"] - ``` - - + If a query parameter has no name and instead is referenced only by index, + then `` **SHOULD** be the 0-based index. - ### Elixir + `db.query.parameter.` **SHOULD** match + up with the parameterized placeholders present in `db.query.text`. - iex> OpenTelemetry.SemConv.Incubating.DBAttributes.db_operation_name() - :"db.operation.name" + `db.query.parameter.` **SHOULD** **NOT** be captured on batch operations. - ### Erlang + Examples: - ```erlang - ?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"`. - - """ - @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 +611,48 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do :"db.query.parameter" end - @doc """ - The database query being executed. + @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 + @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" - 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" + @spec db_response_returned_rows :: :"db.response.returned_rows" + def db_response_returned_rows do + :"db.response.returned_rows" 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,18 +668,18 @@ 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. * `:adabas` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Adabas (Adaptable Database System) - * `:cache` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `intersystems_cache` instead.~~ + * `:cache` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated, use `intersystems_cache` instead. * `:intersystems_cache` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - InterSystems Caché * `:cassandra` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Cassandra * `:clickhouse` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - ClickHouse - * `:cloudscape` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `other_sql` instead.~~ + * `:cloudscape` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated, use `other_sql` instead. * `:cockroachdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CockroachDB - * `:coldfusion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, no replacement at this time.~~ + * `:coldfusion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated, no replacement at this time. * `:cosmosdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft Azure Cosmos DB * `:couchbase` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Couchbase * `:couchdb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - CouchDB @@ -1111,7 +690,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do * `:elasticsearch` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Elasticsearch * `:filemaker` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - FileMaker * `:firebird` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Firebird - * `:firstsql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, use `other_sql` instead.~~ + * `:firstsql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated, use `other_sql` instead. * `:geode` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Apache Geode * `:h2` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - H2 * `:hanadb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - SAP HANA @@ -1128,7 +707,7 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do * `:memcached` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Memcached * `:mongodb` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - MongoDB * `:mssql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Microsoft SQL Server - * `:mssqlcompact` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - **deprecated** ~~Deprecated, Microsoft SQL Server Compact is discontinued.~~ + * `:mssqlcompact` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated, Microsoft SQL Server Compact is discontinued. * `:mysql` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - MySQL * `:neo4j` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Neo4j * `:netezza` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Netezza @@ -1203,41 +782,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 @@ -1311,39 +857,4 @@ defmodule OpenTelemetry.SemConv.Incubating.DBAttributes do def db_user do :"db.user" end - - @deprecated """ - Replaced by `db.client.connection.pool.name`. - """ - @spec pool_name :: :"pool.name" - def pool_name do - :"pool.name" - end - - @typedoc """ - Deprecated, use `db.client.connection.state` instead. - - ### Enum Values - * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - """ - @type state_values() :: %{ - :idle => :idle, - :used => :used - } - @deprecated """ - Replaced by `db.client.connection.state`. - """ - @spec state :: :state - def state do - :state - end - - @spec state_values() :: state_values() - def state_values() do - %{ - :idle => :idle, - :used => :used - } - end end 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 daf364bf..0f3eaee8 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/deployment_attributes.ex @@ -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 3e77f70f..ff1a0a6f 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 [here](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/attributes-registry/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/elasticsearch_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/elasticsearch_attributes.ex new file mode 100644 index 00000000..da0fd6d0 --- /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 6afd155d..e90078c6 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/enduser_attributes.ex @@ -4,14 +4,85 @@ 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. """ 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 00000000..c5fd8f8e --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/error_attributes.ex @@ -0,0 +1,49 @@ +defmodule OpenTelemetry.SemConv.Incubating.ErrorAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Error attributes. + """ + defdelegate error_type(), to: OpenTelemetry.SemConv.ErrorAttributes + + defdelegate error_type_values(), to: OpenTelemetry.SemConv.ErrorAttributes + + @doc """ + A message providing more detail about an error in human-readable form. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + `error.message` should provide additional context and detail about an error. + It is **NOT** RECOMMENDED to duplicate the value of `error.type` in `error.message`. + It is also **NOT** RECOMMENDED to duplicate the value of `exception.message` in `error.message`. + + `error.message` is **NOT** RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status. + + ### Examples + + ``` + ["Unexpected input type: string", "The user has exceeded their storage quota"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.ErrorAttributes.error_message() + :"error.message" + + ### Erlang + + ```erlang + ?ERROR_MESSAGE. + 'error.message' + ``` + + + """ + @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 521f4aeb..1565ba18 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,8 @@ defmodule OpenTelemetry.SemConv.Incubating.EventAttributes do OpenTelemetry Semantic Conventions for Event attributes. """ - @doc """ - Identifies the class / type of 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' - ``` - - + @deprecated """ + Replaced by EventName top-level field on the LogRecord """ @spec event_name :: :"event.name" def event_name do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/exception_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/exception_attributes.ex new file mode 100644 index 00000000..8e4ba7fc --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/exception_attributes.ex @@ -0,0 +1,13 @@ +defmodule OpenTelemetry.SemConv.Incubating.ExceptionAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Exception attributes. + """ + defdelegate exception_escaped(), to: OpenTelemetry.SemConv.ExceptionAttributes + + defdelegate exception_message(), to: OpenTelemetry.SemConv.ExceptionAttributes + + defdelegate exception_stacktrace(), to: OpenTelemetry.SemConv.ExceptionAttributes + + defdelegate exception_type(), to: OpenTelemetry.SemConv.ExceptionAttributes +end 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 d8b01347..f80a3a6a 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 + - **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. + - **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 b4a89310..5bc076c1 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,96 @@ 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 + + @deprecated """ + Replaced by `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 +126,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 +141,108 @@ 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 """ - SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. + 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 """ + A semantic identifier for an evaluated flag value. ### Value type @@ -80,10 +253,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 +263,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_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_VARIANT. - 'feature_flag.variant' + ?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 8f960803..26f7bd12 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.Identifer"] + ``` + + + + ### 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 7026b158..33a99231 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,447 @@ 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 """ Identifies the Google Cloud service for which the official client library is intended. ### Value type 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 b697684d..70436fd2 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 @@ -1,54 +1,298 @@ -defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do +defmodule OpenTelemetry.SemConv.Incubating.GenAIAttributes do # This is an auto-generated file @moduledoc """ OpenTelemetry Semantic Conventions for Gen_Ai attributes. """ @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 + ### Examples + + ``` + ["Helps with math problems", "Generates fiction stories"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_agent_description() + :"gen_ai.agent.description" + + ### Erlang + + ```erlang + ?GEN_AI_AGENT_DESCRIPTION. + 'gen_ai.agent.description' + ``` + + + """ + @spec gen_ai_agent_description :: :"gen_ai.agent.description" + def gen_ai_agent_description do + :"gen_ai.agent.description" + end + + @doc """ + The unique identifier of the GenAI agent. + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["asst_5j66UpCpwteGg4YSxUnt7lPY"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_agent_id() + :"gen_ai.agent.id" + + ### Erlang + + ```erlang + ?GEN_AI_AGENT_ID. + 'gen_ai.agent.id' + ``` + + + """ + @spec gen_ai_agent_id :: :"gen_ai.agent.id" + def gen_ai_agent_id do + :"gen_ai.agent.id" + end - It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) + @doc """ + Human-readable name of the GenAI agent provided by the application. + ### Value type + + Value must be of type `atom() | String.t()`. ### Examples ``` - ["[{'role': 'assistant', 'content': 'The capital of France is Paris.'}]"] + ["Math Tutor", "Fiction Writer"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_completion() - :"gen_ai.completion" + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_agent_name() + :"gen_ai.agent.name" ### Erlang ```erlang - ?GEN_AI_COMPLETION. - 'gen_ai.completion' + ?GEN_AI_AGENT_NAME. + 'gen_ai.agent.name' ``` """ + @spec gen_ai_agent_name :: :"gen_ai.agent.name" + def gen_ai_agent_name do + :"gen_ai.agent.name" + end + + @deprecated """ + Removed, no replacement at this time. + """ @spec gen_ai_completion :: :"gen_ai.completion" def gen_ai_completion do :"gen_ai.completion" end + @typedoc """ + Deprecated, use `gen_ai.output.type`. + + + ### 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 + + @deprecated """ + Replaced by `gen_ai.request.seed` attribute. + """ + @spec gen_ai_openai_request_seed :: :"gen_ai.openai.request.seed" + def gen_ai_openai_request_seed do + :"gen_ai.openai.request.seed" + 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 gen_ai_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.GenAIAttributes.gen_ai_openai_request_service_tier() + :"gen_ai.openai.request.service_tier" + + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_openai_request_service_tier_values().auto + :auto + + iex> %{OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_openai_request_service_tier() => OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_openai_request_service_tier_values().auto} + %{:"gen_ai.openai.request.service_tier" => :auto} + + ### Erlang + + ```erlang + ?GEN_AI_OPENAI_REQUEST_SERVICE_TIER. + 'gen_ai.openai.request.service_tier' + + ?GEN_AI_OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO. + 'auto' + + \#{?GEN_AI_OPENAI_REQUEST_SERVICE_TIER => ?GEN_AI_OPENAI_REQUEST_SERVICE_TIER_VALUES_AUTO}. + \#{'gen_ai.openai.request.service_tier' => 'auto'} + ``` + + + """ + @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 + + @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 + + @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.GenAIAttributes.gen_ai_openai_response_service_tier() + :"gen_ai.openai.response.service_tier" + + ### Erlang + + ```erlang + ?GEN_AI_OPENAI_RESPONSE_SERVICE_TIER. + 'gen_ai.openai.response.service_tier' + ``` + + + """ + @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 + + @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.GenAIAttributes.gen_ai_openai_response_system_fingerprint() + :"gen_ai.openai.response.system_fingerprint" + + ### Erlang + + ```erlang + ?GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT. + 'gen_ai.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 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) + * `: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) + * `: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_operation_name_values() :: %{ :chat => :chat, - :text_completion => :text_completion + :generate_content => :generate_content, + :text_completion => :text_completion, + :embeddings => :embeddings, + :create_agent => :create_agent, + :invoke_agent => :invoke_agent, + :execute_tool => :execute_tool } @doc """ The name of the operation being performed. @@ -62,13 +306,13 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_operation_name() :"gen_ai.operation.name" - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_operation_name_values().chat + 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} + 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 @@ -95,43 +339,157 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do def gen_ai_operation_name_values() do %{ :chat => :chat, - :text_completion => :text_completion + :generate_content => :generate_content, + :text_completion => :text_completion, + :embeddings => :embeddings, + :create_agent => :create_agent, + :invoke_agent => :invoke_agent, + :execute_tool => :execute_tool + } + 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 full prompt sent to the GenAI model. + The target number of candidate completions to return. ### Value type - Value must be of type `atom() | String.t()`. + 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 - It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) + In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request. + ### Examples ``` - ["[{'role': 'user', 'content': 'What is the capital of France?'}]"] + [["base64"], ["float", "binary"]] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_prompt() - :"gen_ai.prompt" + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_encoding_formats() + :"gen_ai.request.encoding_formats" ### Erlang ```erlang - ?GEN_AI_PROMPT. - 'gen_ai.prompt' + ?GEN_AI_REQUEST_ENCODING_FORMATS. + 'gen_ai.request.encoding_formats' ``` """ - @spec gen_ai_prompt :: :"gen_ai.prompt" - def gen_ai_prompt do - :"gen_ai.prompt" + @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 """ @@ -149,7 +507,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_frequency_penalty() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_frequency_penalty() :"gen_ai.request.frequency_penalty" ### Erlang @@ -181,7 +539,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_max_tokens() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_max_tokens() :"gen_ai.request.max_tokens" ### Erlang @@ -213,7 +571,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_model() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_model() :"gen_ai.request.model" ### Erlang @@ -245,7 +603,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_presence_penalty() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_presence_penalty() :"gen_ai.request.presence_penalty" ### Erlang @@ -262,6 +620,38 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes 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 @@ -270,14 +660,14 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Examples ``` - ["forest", "lived"] + [["forest", "lived"]] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_stop_sequences() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_stop_sequences() :"gen_ai.request.stop_sequences" ### Erlang @@ -309,7 +699,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_temperature() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_temperature() :"gen_ai.request.temperature" ### Erlang @@ -341,7 +731,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_k() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_top_k() :"gen_ai.request.top_k" ### Erlang @@ -373,7 +763,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_request_top_p() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_request_top_p() :"gen_ai.request.top_p" ### Erlang @@ -398,14 +788,14 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Examples ``` - ["stop"] + [["stop"], ["stop", "length"]] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_finish_reasons() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_response_finish_reasons() :"gen_ai.response.finish_reasons" ### Erlang @@ -437,7 +827,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_id() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_response_id() :"gen_ai.response.id" ### Erlang @@ -469,7 +859,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_response_model() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_response_model() :"gen_ai.response.model" ### Erlang @@ -491,15 +881,41 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### 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`)^ - Vertex AI + * `:gemini` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Gemini * `:anthropic` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Anthropic * `:cohere` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Cohere + * `:"az.ai.inference"` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Azure AI Inference + * `:"az.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 + :cohere => :cohere, + :"az.ai.inference" => :"az.ai.inference", + :"az.ai.openai" => :"az.ai.openai", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :xai => :xai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai } @doc """ The Generative AI product as identified by the client or server instrumentation. @@ -510,8 +926,10 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do by `gen_ai.request.model` and `gen_ai.response.model` attributes. 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. + Multiple systems, including Azure OpenAI and Gemini, are accessible by OpenAI client + libraries. In such cases, the `gen_ai.system` is set to `openai` based on the + instrumentation's best knowledge, instead of the actual system. The `server.address` + attribute may help identify the actual system in use for `openai`. 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`. @@ -526,13 +944,13 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_system() :"gen_ai.system" - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_system_values().openai :openai - iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_system_values().openai} + iex> %{OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_system() => OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_system_values().openai} %{:"gen_ai.system" => :openai} ### Erlang @@ -559,9 +977,22 @@ 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", + :"ibm.watsonx.ai" => :"ibm.watsonx.ai", + :"aws.bedrock" => :"aws.bedrock", + :perplexity => :perplexity, + :xai => :xai, + :deepseek => :deepseek, + :groq => :groq, + :mistral_ai => :mistral_ai } end @@ -571,10 +1002,12 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Enum Values * `:input` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Input tokens (prompt, input, etc.) * `:completion` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 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. @@ -589,13 +1022,13 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_token_type() :"gen_ai.token.type" - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type_values().input + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_token_type_values().input :input - iex> %{OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type() => OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_token_type_values().input} + iex> %{OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_token_type() => OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_token_type_values().input} %{:"gen_ai.token.type" => :input} ### Erlang @@ -622,10 +1055,147 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do def gen_ai_token_type_values() do %{ :input => :input, - :completion => :output + :completion => :output, + :output => :output } 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 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 + @deprecated """ Replaced by `gen_ai.usage.output_tokens` attribute. """ @@ -649,7 +1219,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_input_tokens() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_usage_input_tokens() :"gen_ai.usage.input_tokens" ### Erlang @@ -681,7 +1251,7 @@ defmodule OpenTelemetry.SemConv.Incubating.GenAiAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.GenAiAttributes.gen_ai_usage_output_tokens() + iex> OpenTelemetry.SemConv.Incubating.GenAIAttributes.gen_ai_usage_output_tokens() :"gen_ai.usage.output_tokens" ### Erlang 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 00000000..6c70ac12 --- /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/host_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/host_attributes.ex index a84f7612..4d0b436f 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 87d7789b..2659c533 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/http_attributes.ex @@ -210,7 +210,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @deprecated """ - Replaced by `http.request.header.content-length`. + Replaced by `http.request.header.`. """ @spec http_request_content_length :: :"http.request_content_length" def http_request_content_length do @@ -292,7 +292,7 @@ defmodule OpenTelemetry.SemConv.Incubating.HTTPAttributes do end @deprecated """ - Replaced by `http.response.header.content-length`. + Replaced by `http.response.header.`. """ @spec http_response_content_length :: :"http.response_content_length" def http_response_content_length do diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hw_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hw_attributes.ex new file mode 100644 index 00000000..72361e3f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/hw_attributes.ex @@ -0,0 +1,264 @@ +defmodule OpenTelemetry.SemConv.Incubating.HWAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HW attributes. + """ + + @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.HWAttributes.hw_id() + :"hw.id" + + ### Erlang + + ```erlang + ?HW_ID. + 'hw.id' + ``` + + + """ + @spec hw_id :: :"hw.id" + def hw_id do + :"hw.id" + 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.HWAttributes.hw_name() + :"hw.name" + + ### Erlang + + ```erlang + ?HW_NAME. + 'hw.name' + ``` + + + """ + @spec hw_name :: :"hw.name" + def hw_name do + :"hw.name" + 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.HWAttributes.hw_parent() + :"hw.parent" + + ### Erlang + + ```erlang + ?HW_PARENT. + 'hw.parent' + ``` + + + """ + @spec hw_parent :: :"hw.parent" + def hw_parent do + :"hw.parent" + end + + @typedoc """ + The current state of the component + + + ### Enum Values + * `:ok` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Ok + * `:degraded` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Degraded + * `:failed` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Failed + """ + @type hw_state_values() :: %{ + :ok => :ok, + :degraded => :degraded, + :failed => :failed + } + @doc """ + The current state of the component + + + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.HWAttributes.hw_state() + :"hw.state" + + iex> OpenTelemetry.SemConv.Incubating.HWAttributes.hw_state_values().ok + :ok + + iex> %{OpenTelemetry.SemConv.Incubating.HWAttributes.hw_state() => OpenTelemetry.SemConv.Incubating.HWAttributes.hw_state_values().ok} + %{:"hw.state" => :ok} + + ### Erlang + + ```erlang + ?HW_STATE. + 'hw.state' + + ?HW_STATE_VALUES_OK. + 'ok' + + \#{?HW_STATE => ?HW_STATE_VALUES_OK}. + \#{'hw.state' => 'ok'} + ``` + + + """ + @spec hw_state :: :"hw.state" + def hw_state do + :"hw.state" + end + + @spec hw_state_values() :: hw_state_values() + def hw_state_values() do + %{ + :ok => :ok, + :degraded => :degraded, + :failed => :failed + } + 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.HWAttributes.hw_type() + :"hw.type" + + iex> OpenTelemetry.SemConv.Incubating.HWAttributes.hw_type_values().battery + :battery + + iex> %{OpenTelemetry.SemConv.Incubating.HWAttributes.hw_type() => OpenTelemetry.SemConv.Incubating.HWAttributes.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 +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 e220fd82..9fbc9660 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. @@ -191,73 +191,91 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do end @doc """ - The name of the CronJob. + 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 ``` - ["opentelemetry"] + ["4", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_name() - :"k8s.cronjob.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_annotation() + :"k8s.cronjob.annotation" ### Erlang ```erlang - ?K8S_CRONJOB_NAME. - 'k8s.cronjob.name' + ?K8S_CRONJOB_ANNOTATION. + 'k8s.cronjob.annotation' ``` """ - @spec k8s_cronjob_name :: :"k8s.cronjob.name" - def k8s_cronjob_name do - :"k8s.cronjob.name" + @spec k8s_cronjob_annotation :: :"k8s.cronjob.annotation" + def k8s_cronjob_annotation do + :"k8s.cronjob.annotation" end @doc """ - The UID of the CronJob. + 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 ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["weekly", ""] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_uid() - :"k8s.cronjob.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_label() + :"k8s.cronjob.label" ### Erlang ```erlang - ?K8S_CRONJOB_UID. - 'k8s.cronjob.uid' + ?K8S_CRONJOB_LABEL. + 'k8s.cronjob.label' ``` """ - @spec k8s_cronjob_uid :: :"k8s.cronjob.uid" - def k8s_cronjob_uid do - :"k8s.cronjob.uid" + @spec k8s_cronjob_label :: :"k8s.cronjob.label" + def k8s_cronjob_label do + :"k8s.cronjob.label" end @doc """ - The name of the DaemonSet. + The name of the CronJob. ### Value type @@ -272,25 +290,25 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_name() - :"k8s.daemonset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_name() + :"k8s.cronjob.name" ### Erlang ```erlang - ?K8S_DAEMONSET_NAME. - 'k8s.daemonset.name' + ?K8S_CRONJOB_NAME. + 'k8s.cronjob.name' ``` """ - @spec k8s_daemonset_name :: :"k8s.daemonset.name" - def k8s_daemonset_name do - :"k8s.daemonset.name" + @spec k8s_cronjob_name :: :"k8s.cronjob.name" + def k8s_cronjob_name do + :"k8s.cronjob.name" end @doc """ - The UID of the DaemonSet. + The UID of the CronJob. ### Value type @@ -305,91 +323,99 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_uid() - :"k8s.daemonset.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_cronjob_uid() + :"k8s.cronjob.uid" ### Erlang ```erlang - ?K8S_DAEMONSET_UID. - 'k8s.daemonset.uid' + ?K8S_CRONJOB_UID. + 'k8s.cronjob.uid' ``` """ - @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" - def k8s_daemonset_uid do - :"k8s.daemonset.uid" + @spec k8s_cronjob_uid :: :"k8s.cronjob.uid" + def k8s_cronjob_uid do + :"k8s.cronjob.uid" end @doc """ - The name of the Deployment. + The annotation key-value pairs placed on the DaemonSet. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + ### Examples ``` - ["opentelemetry"] + ["k8s.daemonset.annotation.replicas=1", "k8s.daemonset.annotation.data="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_name() - :"k8s.deployment.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_annotation() + :"k8s.daemonset.annotation" ### Erlang ```erlang - ?K8S_DEPLOYMENT_NAME. - 'k8s.deployment.name' + ?K8S_DAEMONSET_ANNOTATION. + 'k8s.daemonset.annotation' ``` """ - @spec k8s_deployment_name :: :"k8s.deployment.name" - def k8s_deployment_name do - :"k8s.deployment.name" + @spec k8s_daemonset_annotation :: :"k8s.daemonset.annotation" + def k8s_daemonset_annotation do + :"k8s.daemonset.annotation" end @doc """ - The UID of the Deployment. + The label key-value pairs placed on the DaemonSet. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["k8s.daemonset.label.app=guestbook", "k8s.daemonset.label.injected="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_uid() - :"k8s.deployment.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_label() + :"k8s.daemonset.label" ### Erlang ```erlang - ?K8S_DEPLOYMENT_UID. - 'k8s.deployment.uid' + ?K8S_DAEMONSET_LABEL. + 'k8s.daemonset.label' ``` """ - @spec k8s_deployment_uid :: :"k8s.deployment.uid" - def k8s_deployment_uid do - :"k8s.deployment.uid" + @spec k8s_daemonset_label :: :"k8s.daemonset.label" + def k8s_daemonset_label do + :"k8s.daemonset.label" end @doc """ - The name of the Job. + The name of the DaemonSet. ### Value type @@ -404,25 +430,25 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_name() - :"k8s.job.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_name() + :"k8s.daemonset.name" ### Erlang ```erlang - ?K8S_JOB_NAME. - 'k8s.job.name' + ?K8S_DAEMONSET_NAME. + 'k8s.daemonset.name' ``` """ - @spec k8s_job_name :: :"k8s.job.name" - def k8s_job_name do - :"k8s.job.name" + @spec k8s_daemonset_name :: :"k8s.daemonset.name" + def k8s_daemonset_name do + :"k8s.daemonset.name" end @doc """ - The UID of the Job. + The UID of the DaemonSet. ### Value type @@ -437,91 +463,99 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_uid() - :"k8s.job.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_daemonset_uid() + :"k8s.daemonset.uid" ### Erlang ```erlang - ?K8S_JOB_UID. - 'k8s.job.uid' + ?K8S_DAEMONSET_UID. + 'k8s.daemonset.uid' ``` """ - @spec k8s_job_uid :: :"k8s.job.uid" - def k8s_job_uid do - :"k8s.job.uid" + @spec k8s_daemonset_uid :: :"k8s.daemonset.uid" + def k8s_daemonset_uid do + :"k8s.daemonset.uid" end @doc """ - The name of the namespace that the pod is running in. + The annotation key-value pairs placed on the Deployment. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + ### Examples ``` - ["default"] + ["k8s.deployment.annotation.replicas=1", "k8s.deployment.annotation.data="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_namespace_name() - :"k8s.namespace.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_annotation() + :"k8s.deployment.annotation" ### Erlang ```erlang - ?K8S_NAMESPACE_NAME. - 'k8s.namespace.name' + ?K8S_DEPLOYMENT_ANNOTATION. + 'k8s.deployment.annotation' ``` """ - @spec k8s_namespace_name :: :"k8s.namespace.name" - def k8s_namespace_name do - :"k8s.namespace.name" + @spec k8s_deployment_annotation :: :"k8s.deployment.annotation" + def k8s_deployment_annotation do + :"k8s.deployment.annotation" end @doc """ - The name of the Node. + The label key-value pairs placed on the Deployment. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + ### Examples ``` - ["node-1"] + ["k8s.deployment.label.app=guestbook", "k8s.deployment.label.injected="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_name() - :"k8s.node.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_label() + :"k8s.deployment.label" ### Erlang ```erlang - ?K8S_NODE_NAME. - 'k8s.node.name' + ?K8S_DEPLOYMENT_LABEL. + 'k8s.deployment.label' ``` """ - @spec k8s_node_name :: :"k8s.node.name" - def k8s_node_name do - :"k8s.node.name" + @spec k8s_deployment_label :: :"k8s.deployment.label" + def k8s_deployment_label do + :"k8s.deployment.label" end @doc """ - The UID of the Node. + The name of the Deployment. ### Value type @@ -529,32 +563,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"] + ["opentelemetry"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_node_uid() - :"k8s.node.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_deployment_name() + :"k8s.deployment.name" ### Erlang ```erlang - ?K8S_NODE_UID. - 'k8s.node.uid' + ?K8S_DEPLOYMENT_NAME. + 'k8s.deployment.name' ``` """ - @spec k8s_node_uid :: :"k8s.node.uid" - def k8s_node_uid do - :"k8s.node.uid" + @spec k8s_deployment_name :: :"k8s.deployment.name" + def k8s_deployment_name do + :"k8s.deployment.name" 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 Deployment. ### Value type @@ -562,32 +596,32 @@ 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_deployment_uid() + :"k8s.deployment.uid" ### Erlang ```erlang - ?K8S_POD_ANNOTATION. - 'k8s.pod.annotation' + ?K8S_DEPLOYMENT_UID. + 'k8s.deployment.uid' ``` """ - @spec k8s_pod_annotation :: :"k8s.pod.annotation" - def k8s_pod_annotation do - :"k8s.pod.annotation" + @spec k8s_deployment_uid :: :"k8s.deployment.uid" + def k8s_deployment_uid do + :"k8s.deployment.uid" end @doc """ - The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. + The name of the horizontal pod autoscaler. ### Value type @@ -595,40 +629,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["k8s.pod.label.app=my-app", "k8s.pod.label.mycompany.io/arch=x64", "k8s.pod.label.data="] + ["opentelemetry"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_label() - :"k8s.pod.label" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_name() + :"k8s.hpa.name" ### Erlang ```erlang - ?K8S_POD_LABEL. - 'k8s.pod.label' + ?K8S_HPA_NAME. + 'k8s.hpa.name' ``` """ - @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_hpa_name :: :"k8s.hpa.name" + def k8s_hpa_name do + :"k8s.hpa.name" end @doc """ - The name of the Pod. + The UID of the horizontal pod autoscaler. ### Value type @@ -636,98 +662,106 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["opentelemetry-pod-autoconf"] + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_name() - :"k8s.pod.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_hpa_uid() + :"k8s.hpa.uid" ### Erlang ```erlang - ?K8S_POD_NAME. - 'k8s.pod.name' + ?K8S_HPA_UID. + 'k8s.hpa.uid' ``` """ - @spec k8s_pod_name :: :"k8s.pod.name" - def k8s_pod_name do - :"k8s.pod.name" + @spec k8s_hpa_uid :: :"k8s.hpa.uid" + def k8s_hpa_uid do + :"k8s.hpa.uid" end @doc """ - The UID of the Pod. + The annotation key-value pairs placed on the Job. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["k8s.job.annotation.number=1", "k8s.job.annotation.data="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_pod_uid() - :"k8s.pod.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_annotation() + :"k8s.job.annotation" ### Erlang ```erlang - ?K8S_POD_UID. - 'k8s.pod.uid' + ?K8S_JOB_ANNOTATION. + 'k8s.job.annotation' ``` """ - @spec k8s_pod_uid :: :"k8s.pod.uid" - def k8s_pod_uid do - :"k8s.pod.uid" + @spec k8s_job_annotation :: :"k8s.job.annotation" + def k8s_job_annotation do + :"k8s.job.annotation" end @doc """ - The name of the ReplicaSet. + The label key-value pairs placed on the Job. ### Value type Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + ### Examples ``` - ["opentelemetry"] + ["k8s.job.label.jobtype=ci", "k8s.job.label.automated="] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_name() - :"k8s.replicaset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_label() + :"k8s.job.label" ### Erlang ```erlang - ?K8S_REPLICASET_NAME. - 'k8s.replicaset.name' + ?K8S_JOB_LABEL. + 'k8s.job.label' ``` """ - @spec k8s_replicaset_name :: :"k8s.replicaset.name" - def k8s_replicaset_name do - :"k8s.replicaset.name" + @spec k8s_job_label :: :"k8s.job.label" + def k8s_job_label do + :"k8s.job.label" end @doc """ - The UID of the ReplicaSet. + The name of the Job. ### Value type @@ -735,32 +769,32 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] + ["opentelemetry"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_replicaset_uid() - :"k8s.replicaset.uid" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_name() + :"k8s.job.name" ### Erlang ```erlang - ?K8S_REPLICASET_UID. - 'k8s.replicaset.uid' + ?K8S_JOB_NAME. + 'k8s.job.name' ``` """ - @spec k8s_replicaset_uid :: :"k8s.replicaset.uid" - def k8s_replicaset_uid do - :"k8s.replicaset.uid" + @spec k8s_job_name :: :"k8s.job.name" + def k8s_job_name do + :"k8s.job.name" end @doc """ - The name of the StatefulSet. + The UID of the Job. ### Value type @@ -768,29 +802,895 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do ### Examples ``` - ["opentelemetry"] + ["275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"] ``` ### Elixir - iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_name() - :"k8s.statefulset.name" + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_job_uid() + :"k8s.job.uid" ### Erlang ```erlang - ?K8S_STATEFULSET_NAME. - 'k8s.statefulset.name' + ?K8S_JOB_UID. + 'k8s.job.uid' ``` """ - @spec k8s_statefulset_name :: :"k8s.statefulset.name" - def k8s_statefulset_name do - :"k8s.statefulset.name" - end + @spec k8s_job_uid :: :"k8s.job.uid" + def k8s_job_uid do + :"k8s.job.uid" + end + + @doc """ + The annotation key-value pairs placed on the Namespace. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Examples + + ``` + ["k8s.namespace.annotation.ttl=0", "k8s.namespace.annotation.data="] + ``` + + + + ### 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 key-value pairs placed on the Namespace. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + + ### Examples + + ``` + ["k8s.namespace.label.kubernetes.io/metadata.name=default", "k8s.namespace.label.data="] + ``` + + + + ### 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 + + @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 """ + 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 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 key-value pairs placed on the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Examples + + ``` + ["k8s.replicaset.annotation.replicas=0", "k8s.replicaset.annotation.data="] + ``` + + + + ### 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 key-value pairs placed on the ReplicaSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + + ### Examples + + ``` + ["k8s.replicaset.label.app=guestbook", "k8s.replicaset.label.injected="] + ``` + + + + ### 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 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 key-value pairs placed on the StatefulSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the annotation name, the value being the annotation value, even if the value is empty. + + ### Examples + + ``` + ["k8s.statefulset.annotation.replicas=1", "k8s.statefulset.annotation.data="] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_annotation() + :"k8s.statefulset.annotation" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_ANNOTATION. + 'k8s.statefulset.annotation' + ``` + + + """ + @spec k8s_statefulset_annotation :: :"k8s.statefulset.annotation" + def k8s_statefulset_annotation do + :"k8s.statefulset.annotation" + end + + @doc """ + The label key-value pairs placed on the StatefulSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Notes + + The `` being the label name, the value being the label value, even if the value is empty. + + ### Examples + + ``` + ["k8s.statefulset.label.app=guestbook", "k8s.statefulset.label.injected="] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_label() + :"k8s.statefulset.label" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_LABEL. + 'k8s.statefulset.label' + ``` + + + """ + @spec k8s_statefulset_label :: :"k8s.statefulset.label" + def k8s_statefulset_label do + :"k8s.statefulset.label" + end + + @doc """ + The name of the StatefulSet. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["opentelemetry"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_statefulset_name() + :"k8s.statefulset.name" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_NAME. + 'k8s.statefulset.name' + ``` + + + """ + @spec k8s_statefulset_name :: :"k8s.statefulset.name" + def k8s_statefulset_name do + :"k8s.statefulset.name" + end @doc """ The UID of the StatefulSet. @@ -824,4 +1724,112 @@ defmodule OpenTelemetry.SemConv.Incubating.K8SAttributes do def k8s_statefulset_uid do :"k8s.statefulset.uid" end + + @doc """ + The name of the K8s volume. + + ### Value type + + Value must be of type `atom() | String.t()`. + ### Examples + + ``` + ["volume0"] + ``` + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.K8SAttributes.k8s_volume_name() + :"k8s.volume.name" + + ### Erlang + + ```erlang + ?K8S_VOLUME_NAME. + 'k8s.volume.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 type of the K8s volume. + + + ### Examples + + ``` + ["emptyDir", "persistentVolumeClaim"] + ``` + + + + ### Elixir + + 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_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_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/log_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/log_attributes.ex index 4e896783..a377425f 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/message_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/message_attributes.ex new file mode 100644 index 00000000..6c935426 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/message_attributes.ex @@ -0,0 +1,57 @@ +defmodule OpenTelemetry.SemConv.Incubating.MessageAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Message attributes. + """ + + @deprecated """ + Replaced by `rpc.message.compressed_size`. + """ + @spec message_compressed_size :: :"message.compressed_size" + def message_compressed_size do + :"message.compressed_size" + end + + @deprecated """ + Replaced by `rpc.message.id`. + """ + @spec message_id :: :"message.id" + def message_id do + :"message.id" + end + + @typedoc """ + Deprecated, use `rpc.message.type` instead. + + ### Enum Values + * `: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`. + """ + @spec message_type :: :"message.type" + def message_type do + :"message.type" + end + + @spec message_type_values() :: message_type_values() + def message_type_values() do + %{ + :sent => :SENT, + :received => :RECEIVED + } + end + + @deprecated """ + Replaced by `rpc.message.uncompressed_size`. + """ + @spec message_uncompressed_size :: :"message.uncompressed_size" + def message_uncompressed_size do + :"message.uncompressed_size" + 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 a9f83b37..c3929e61 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/messaging_attributes.ex @@ -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 @@ -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. @@ -817,15 +814,17 @@ 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.~~ + * `:deliver` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Deprecated. Use `process` instead. + * `:publish` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - 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 @@ -949,7 +949,6 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do @deprecated """ Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. - """ @spec messaging_rocketmq_client_group :: :"messaging.rocketmq.client_group" def messaging_rocketmq_client_group do @@ -1125,7 +1124,7 @@ defmodule OpenTelemetry.SemConv.Incubating.MessagingAttributes do ### Examples ``` - ["keyA", "keyB"] + [["keyA", "keyB"]] ``` @@ -1280,8 +1279,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" diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/net_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/net_attributes.ex new file mode 100644 index 00000000..d40e6b4b --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/net_attributes.ex @@ -0,0 +1,176 @@ +defmodule OpenTelemetry.SemConv.Incubating.NetAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Net attributes. + """ + + @deprecated """ + Replaced by `network.local.address`. + """ + @spec net_host_ip :: :"net.host.ip" + def net_host_ip do + :"net.host.ip" + end + + @deprecated """ + Replaced by `server.address`. + """ + @spec net_host_name :: :"net.host.name" + def net_host_name do + :"net.host.name" + end + + @deprecated """ + Replaced by `server.port`. + """ + @spec net_host_port :: :"net.host.port" + def net_host_port do + :"net.host.port" + end + + @deprecated """ + Replaced by `network.peer.address`. + """ + @spec net_peer_ip :: :"net.peer.ip" + def net_peer_ip do + :"net.peer.ip" + end + + @deprecated """ + Replaced by `server.address` on client spans and `client.address` on server spans. + """ + @spec net_peer_name :: :"net.peer.name" + def net_peer_name do + :"net.peer.name" + end + + @deprecated """ + Replaced by `server.port` on client spans and `client.port` on server spans. + """ + @spec net_peer_port :: :"net.peer.port" + def net_peer_port do + :"net.peer.port" + end + + @deprecated """ + Replaced by `network.protocol.name`. + """ + @spec net_protocol_name :: :"net.protocol.name" + def net_protocol_name do + :"net.protocol.name" + end + + @deprecated """ + Replaced by `network.protocol.version`. + """ + @spec net_protocol_version :: :"net.protocol.version" + def net_protocol_version do + :"net.protocol.version" + end + + @typedoc """ + Deprecated, use `network.transport` and `network.type`. + + ### Enum Values + * `:inet` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv4 address + * `:inet6` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv6 address + * `:unix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Unix domain socket path + """ + @type net_sock_family_values() :: %{ + :inet => :inet, + :inet6 => :inet6, + :unix => :unix + } + @deprecated """ + Split to `network.transport` and `network.type`. + """ + @spec net_sock_family :: :"net.sock.family" + def net_sock_family do + :"net.sock.family" + end + + @spec net_sock_family_values() :: net_sock_family_values() + def net_sock_family_values() do + %{ + :inet => :inet, + :inet6 => :inet6, + :unix => :unix + } + end + + @deprecated """ + Replaced by `network.local.address`. + """ + @spec net_sock_host_addr :: :"net.sock.host.addr" + def net_sock_host_addr do + :"net.sock.host.addr" + end + + @deprecated """ + Replaced by `network.local.port`. + """ + @spec net_sock_host_port :: :"net.sock.host.port" + def net_sock_host_port do + :"net.sock.host.port" + end + + @deprecated """ + Replaced by `network.peer.address`. + """ + @spec net_sock_peer_addr :: :"net.sock.peer.addr" + def net_sock_peer_addr do + :"net.sock.peer.addr" + end + + @deprecated """ + Removed. + """ + @spec net_sock_peer_name :: :"net.sock.peer.name" + def net_sock_peer_name do + :"net.sock.peer.name" + end + + @deprecated """ + Replaced by `network.peer.port`. + """ + @spec net_sock_peer_port :: :"net.sock.peer.port" + def net_sock_peer_port do + :"net.sock.peer.port" + end + + @typedoc """ + Deprecated, use `network.transport`. + + ### Enum Values + * `: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). + """ + @type net_transport_values() :: %{ + :ip_tcp => :ip_tcp, + :ip_udp => :ip_udp, + :pipe => :pipe, + :inproc => :inproc, + :other => :other + } + @deprecated """ + Replaced by `network.transport`. + """ + @spec net_transport :: :"net.transport" + def net_transport do + :"net.transport" + end + + @spec net_transport_values() :: net_transport_values() + def net_transport_values() do + %{ + :ip_tcp => :ip_tcp, + :ip_udp => :ip_udp, + :pipe => :pipe, + :inproc => :inproc, + :other => :other + } + end +end 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 dafaa058..7ce42c78 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/network_attributes.ex @@ -23,176 +23,6 @@ defmodule OpenTelemetry.SemConv.Incubating.NetworkAttributes do defdelegate network_type_values(), to: OpenTelemetry.SemConv.NetworkAttributes - @deprecated """ - Replaced by `network.local.address`. - """ - @spec net_host_ip :: :"net.host.ip" - def net_host_ip do - :"net.host.ip" - end - - @deprecated """ - Replaced by `server.address`. - """ - @spec net_host_name :: :"net.host.name" - def net_host_name do - :"net.host.name" - end - - @deprecated """ - Replaced by `server.port`. - """ - @spec net_host_port :: :"net.host.port" - def net_host_port do - :"net.host.port" - end - - @deprecated """ - Replaced by `network.peer.address`. - """ - @spec net_peer_ip :: :"net.peer.ip" - def net_peer_ip do - :"net.peer.ip" - end - - @deprecated """ - Replaced by `server.address` on client spans and `client.address` on server spans. - """ - @spec net_peer_name :: :"net.peer.name" - def net_peer_name do - :"net.peer.name" - end - - @deprecated """ - Replaced by `server.port` on client spans and `client.port` on server spans. - """ - @spec net_peer_port :: :"net.peer.port" - def net_peer_port do - :"net.peer.port" - end - - @deprecated """ - Replaced by `network.protocol.name`. - """ - @spec net_protocol_name :: :"net.protocol.name" - def net_protocol_name do - :"net.protocol.name" - end - - @deprecated """ - Replaced by `network.protocol.version`. - """ - @spec net_protocol_version :: :"net.protocol.version" - def net_protocol_version do - :"net.protocol.version" - end - - @typedoc """ - Deprecated, use `network.transport` and `network.type`. - - ### Enum Values - * `:inet` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv4 address - * `:inet6` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - IPv6 address - * `:unix` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ - Unix domain socket path - """ - @type net_sock_family_values() :: %{ - :inet => :inet, - :inet6 => :inet6, - :unix => :unix - } - @deprecated """ - Split to `network.transport` and `network.type`. - """ - @spec net_sock_family :: :"net.sock.family" - def net_sock_family do - :"net.sock.family" - end - - @spec net_sock_family_values() :: net_sock_family_values() - def net_sock_family_values() do - %{ - :inet => :inet, - :inet6 => :inet6, - :unix => :unix - } - end - - @deprecated """ - Replaced by `network.local.address`. - """ - @spec net_sock_host_addr :: :"net.sock.host.addr" - def net_sock_host_addr do - :"net.sock.host.addr" - end - - @deprecated """ - Replaced by `network.local.port`. - """ - @spec net_sock_host_port :: :"net.sock.host.port" - def net_sock_host_port do - :"net.sock.host.port" - end - - @deprecated """ - Replaced by `network.peer.address`. - """ - @spec net_sock_peer_addr :: :"net.sock.peer.addr" - def net_sock_peer_addr do - :"net.sock.peer.addr" - end - - @deprecated """ - Removed. - """ - @spec net_sock_peer_name :: :"net.sock.peer.name" - def net_sock_peer_name do - :"net.sock.peer.name" - end - - @deprecated """ - Replaced by `network.peer.port`. - """ - @spec net_sock_peer_port :: :"net.sock.peer.port" - def net_sock_peer_port do - :"net.sock.peer.port" - end - - @typedoc """ - Deprecated, use `network.transport`. - - ### Enum Values - * `: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). - """ - @type net_transport_values() :: %{ - :ip_tcp => :ip_tcp, - :ip_udp => :ip_udp, - :pipe => :pipe, - :inproc => :inproc, - :other => :other - } - @deprecated """ - Replaced by `network.transport`. - """ - @spec net_transport :: :"net.transport" - def net_transport do - :"net.transport" - end - - @spec net_transport_values() :: net_transport_values() - def net_transport_values() do - %{ - :ip_tcp => :ip_tcp, - :ip_udp => :ip_udp, - :pipe => :pipe, - :inproc => :inproc, - :other => :other - } - end - @doc """ The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. ### Value type @@ -321,6 +151,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. @@ -509,6 +430,38 @@ 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. 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 7bed10ea..d7390358 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/otel_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/otel_attributes.ex index d0fc65f4..e593b864 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,185 @@ 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 + + * `: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 + + """ + @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, + :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 + } + @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, + :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 + } + end @deprecated """ - use the `otel.scope.name` attribute. + Use the `otel.scope.name` attribute. """ @spec otel_library_name :: :"otel.library.name" def otel_library_name do @@ -13,10 +189,69 @@ defmodule OpenTelemetry.SemConv.Incubating.OtelAttributes do end @deprecated """ - use the `otel.scope.version` attribute. + Use the `otel.scope.version` attribute. """ @spec otel_library_version :: :"otel.library.version" def otel_library_version do :"otel.library.version" 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/other_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/other_attributes.ex new file mode 100644 index 00000000..0bfdaa8f --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/other_attributes.ex @@ -0,0 +1,33 @@ +defmodule OpenTelemetry.SemConv.Incubating.OtherAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Other attributes. + """ + + @typedoc """ + Deprecated, use `db.client.connection.state` instead. + + ### Enum Values + * `:idle` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + * `:used` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ + """ + @type state_values() :: %{ + :idle => :idle, + :used => :used + } + @deprecated """ + Replaced by `db.client.connection.state`. + """ + @spec state :: :state + def state do + :state + end + + @spec state_values() :: state_values() + def state_values() do + %{ + :idle => :idle, + :used => :used + } + end +end diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pool_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pool_attributes.ex new file mode 100644 index 00000000..e21365a1 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/pool_attributes.ex @@ -0,0 +1,14 @@ +defmodule OpenTelemetry.SemConv.Incubating.PoolAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Pool attributes. + """ + + @deprecated """ + Replaced by `db.client.connection.pool.name`. + """ + @spec pool_name :: :"pool.name" + def pool_name do + :"pool.name" + 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 a05d0e91..17a64468 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`. @@ -46,7 +83,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do ### Examples ``` - ["cmd/otecol", "--config=config.yaml"] + [["cmd/otecol", "--config=config.yaml"]] ``` @@ -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. @@ -836,6 +1060,43 @@ defmodule OpenTelemetry.SemConv.Incubating.ProcessAttributes do :"process.session_leader.pid" 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 +1199,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 00000000..b51306b4 --- /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 21ff59ae..e40e12d5 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/rpc_attributes.ex @@ -4,59 +4,8 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do OpenTelemetry Semantic Conventions for RPC attributes. """ - @deprecated """ - Replaced by `rpc.message.compressed_size`. - """ - @spec message_compressed_size :: :"message.compressed_size" - def message_compressed_size do - :"message.compressed_size" - end - - @deprecated """ - Replaced by `rpc.message.id`. - """ - @spec message_id :: :"message.id" - def message_id do - :"message.id" - end - @typedoc """ - Deprecated, use `rpc.message.type` instead. - - ### Enum Values - * `: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`. - """ - @spec message_type :: :"message.type" - def message_type do - :"message.type" - end - - @spec message_type_values() :: message_type_values() - def message_type_values() do - %{ - :sent => :SENT, - :received => :RECEIVED - } - end - - @deprecated """ - Replaced by `rpc.message.uncompressed_size`. - """ - @spec message_uncompressed_size :: :"message.uncompressed_size" - def message_uncompressed_size do - :"message.uncompressed_size" - end - - @typedoc """ - The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. ### Enum Values * `:cancelled` ^[e](`m:OpenTelemetry.SemConv#experimental`)^ @@ -95,7 +44,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do :unauthenticated => :unauthenticated } @doc """ - The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. + The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values. @@ -161,12 +110,16 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do 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. + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. + Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` **SHOULD** be recorded as + the `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` ### Examples ``` - ["rpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] + ["[\"1.2.3.4\", \"1.2.3.5\"]"] ``` @@ -198,12 +151,16 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do 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. + 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.connect_rpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` ### Examples ``` - ["rpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] + ["attribute_value"] ``` @@ -235,12 +192,16 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do 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. + Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. + Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. + + For example, a property `my-custom-key` with value `["1.2.3.4", "1.2.3.5"]` **SHOULD** be recorded as + `rpc.grpc.request.metadata.my-custom-key` attribute with value `["1.2.3.4", "1.2.3.5"]` ### Examples ``` - ["rpc.grpc.request.metadata.my-custom-metadata-attribute=[\"1.2.3.4\", \"1.2.3.5\"]"] + ["[\"1.2.3.4\", \"1.2.3.5\"]"] ``` @@ -272,12 +233,16 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do 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. + 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.grpc.response.metadata.my-custom-key` attribute with value `["attribute_value"]` ### Examples ``` - ["rpc.grpc.response.metadata.my-custom-metadata-attribute=[\"attribute_value\"]"] + ["[\"attribute_value\"]"] ``` @@ -678,7 +643,7 @@ defmodule OpenTelemetry.SemConv.Incubating.RPCAttributes do 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). + 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.name` 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). ### Examples 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 00000000..4796ce0a --- /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/server_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/server_attributes.ex new file mode 100644 index 00000000..378db2de --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/server_attributes.ex @@ -0,0 +1,9 @@ +defmodule OpenTelemetry.SemConv.Incubating.ServerAttributes do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for Server attributes. + """ + defdelegate server_address(), to: OpenTelemetry.SemConv.ServerAttributes + + defdelegate server_port(), to: OpenTelemetry.SemConv.ServerAttributes +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 9654e319..15ac0093 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/service_attributes.ex @@ -27,7 +27,7 @@ defmodule OpenTelemetry.SemConv.Incubating.ServiceAttributes do 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 + [`/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. 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 07fcfbdb..6ca424b1 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/system_attributes.ex @@ -5,7 +5,7 @@ defmodule OpenTelemetry.SemConv.Incubating.SystemAttributes do """ @doc """ - The logical CPU number [0..n-1] + Deprecated, use `cpu.logical_number` instead. ### Value type Value must be of type `integer()`. @@ -382,7 +382,7 @@ 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`)^ @@ -412,42 +412,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 """ + Removed, report network connection state with `network.connection.state` attribute """ @spec system_network_state :: :"system.network.state" def system_network_state 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 4360c506..d7315440 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/tls_attributes.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/tls_attributes.ex index 2f171b6c..d497a0f7 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,7 +504,7 @@ 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 @@ -516,7 +516,7 @@ defmodule OpenTelemetry.SemConv.Incubating.TLSAttributes do :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 82665c4a..b125af10 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 b9d8c84c..1678f524 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 @@ -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 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 94b0ad1a..41485f29 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 a339fa71..e9c3b141 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/attributes/vcs_attributes.ex @@ -1,11 +1,11 @@ -defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do +defmodule OpenTelemetry.SemConv.Incubating.VCSAttributes do # This is an auto-generated file @moduledoc """ - OpenTelemetry Semantic Conventions for Vcs attributes. + OpenTelemetry Semantic Conventions for VCS attributes. """ @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, 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 """ + Deprecated, use `vcs.change.id` instead. + """ + @spec vcs_repository_change_id :: :"vcs.repository.change.id" + def vcs_repository_change_id do + :"vcs.repository.change.id" + end + + @deprecated """ + Deprecated, use `vcs.change.title` instead. + """ + @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 """ + Deprecated, use `vcs.ref.head.name` instead. + """ + @spec vcs_repository_ref_name :: :"vcs.repository.ref.name" + def vcs_repository_ref_name do + :"vcs.repository.ref.name" + end + + @deprecated """ + Deprecated, use `vcs.ref.head.revision` instead. + """ + @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 """ + Deprecated, use `vcs.ref.head.type` instead. + """ @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?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) 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 ``` @@ -227,7 +800,7 @@ defmodule OpenTelemetry.SemConv.Incubating.VcsAttributes do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.VcsAttributes.vcs_repository_url_full() + iex> OpenTelemetry.SemConv.Incubating.VCSAttributes.vcs_repository_url_full() :"vcs.repository.url.full" ### Erlang @@ -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/metrics/azure_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/azure_metrics.ex new file mode 100644 index 00000000..eb5f3489 --- /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 00000000..9fae9332 --- /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 afb594d1..d39ddea8 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/container_metrics.ex @@ -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. @@ -126,4 +157,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 00000000..60b70bb6 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/cpu_metrics.ex @@ -0,0 +1,86 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.CPUMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for CPU metrics. + """ + @doc """ + Operating frequency of the logical CPU in Hertz. + + Instrument: `gauge` + Unit: `Hz` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CPUMetrics.cpu_frequency() + :"cpu.frequency" + + ### Erlang + + ```erlang + ?CPU_FREQUENCY. + 'cpu.frequency' + ``` + + + """ + + @spec cpu_frequency :: :"cpu.frequency" + def cpu_frequency do + :"cpu.frequency" + end + + @doc """ + Seconds each logical CPU spent on each mode + + Instrument: `counter` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CPUMetrics.cpu_time() + :"cpu.time" + + ### Erlang + + ```erlang + ?CPU_TIME. + 'cpu.time' + ``` + + + """ + + @spec cpu_time :: :"cpu.time" + def cpu_time do + :"cpu.time" + end + + @doc """ + 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` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.CPUMetrics.cpu_utilization() + :"cpu.utilization" + + ### Erlang + + ```erlang + ?CPU_UTILIZATION. + '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/db_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex index e8b1e665..c9c3d1c5 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/db_metrics.ex @@ -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}` @@ -327,6 +327,25 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do :"db.client.connections.wait_time" end + @deprecated """ + Replaced by `azure.cosmosdb.client.active_instance.count`. + """ + + @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 + + @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 """ Duration of database client operations. @@ -357,4 +376,31 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.DBMetrics do def db_client_operation_duration do :"db.client.operation.duration" 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_response_returned_rows() + :"db.client.response.returned_rows" + + ### Erlang + + ```erlang + ?DB_CLIENT_RESPONSE_RETURNED_ROWS. + 'db.client.response.returned_rows' + ``` + + + """ + + @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/gen_ai_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/gen_ai_metrics.ex index 2a2d8b9b..0a35749d 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 @@ -1,4 +1,4 @@ -defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do +defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics do # This is an auto-generated file @moduledoc """ OpenTelemetry Semantic Conventions for Gen_Ai metrics. @@ -12,7 +12,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_client_operation_duration() + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics.gen_ai_client_operation_duration() :"gen_ai.client.operation.duration" ### Erlang @@ -39,7 +39,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_client_token_usage() + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics.gen_ai_client_token_usage() :"gen_ai.client.token.usage" ### Erlang @@ -66,7 +66,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_request_duration() + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics.gen_ai_server_request_duration() :"gen_ai.server.request.duration" ### Erlang @@ -93,7 +93,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_time_per_output_token() + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics.gen_ai_server_time_per_output_token() :"gen_ai.server.time_per_output_token" ### Erlang @@ -120,7 +120,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics do ### Elixir - iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAiMetrics.gen_ai_server_time_to_first_token() + iex> OpenTelemetry.SemConv.Incubating.Metrics.GenAIMetrics.gen_ai_server_time_to_first_token() :"gen_ai.server.time_to_first_token" ### Erlang diff --git a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex index 525b8079..76781fae 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/http_metrics.ex @@ -115,6 +115,33 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics do :"http.client.request.body.size" end + @doc """ + Duration of HTTP client requests. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_client_request_duration() + :"http.client.request.duration" + + ### Erlang + + ```erlang + ?HTTP_CLIENT_REQUEST_DURATION. + 'http.client.request.duration' + ``` + + + """ + + @spec http_client_request_duration :: :"http.client.request.duration" + def http_client_request_duration do + :"http.client.request.duration" + end + @doc """ Size of HTTP client response bodies. @@ -204,6 +231,33 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics do :"http.server.request.body.size" end + @doc """ + Duration of HTTP server requests. + + Instrument: `histogram` + Unit: `s` + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.HTTPMetrics.http_server_request_duration() + :"http.server.request.duration" + + ### Erlang + + ```erlang + ?HTTP_SERVER_REQUEST_DURATION. + 'http.server.request.duration' + ``` + + + """ + + @spec http_server_request_duration :: :"http.server.request.duration" + def http_server_request_duration do + :"http.server.request.duration" + end + @doc """ Size of HTTP server response bodies. 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 00000000..9f6021cd --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/hw_metrics.ex @@ -0,0 +1,239 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.HWMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for HW metrics. + """ + @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 """ + 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 """ + 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 """ + 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 +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 00000000..a14af42c --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/k8s_metrics.ex @@ -0,0 +1,1253 @@ +defmodule OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics do + # This is an auto-generated file + @moduledoc """ + OpenTelemetry Semantic Conventions for K8S metrics. + """ + @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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.cronjob`](../resource/k8s.md#cronjob) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_cronjob_active_jobs() + :"k8s.cronjob.active_jobs" + + ### Erlang + + ```erlang + ?K8S_CRONJOB_ACTIVE_JOBS. + 'k8s.cronjob.active_jobs' + ``` + + + """ + + @spec k8s_cronjob_active_jobs :: :"k8s.cronjob.active_jobs" + def k8s_cronjob_active_jobs do + :"k8s.cronjob.active_jobs" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.daemonset`](../resource/k8s.md#daemonset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_current_scheduled_nodes() + :"k8s.daemonset.current_scheduled_nodes" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_CURRENT_SCHEDULED_NODES. + 'k8s.daemonset.current_scheduled_nodes' + ``` + + + """ + + @spec k8s_daemonset_current_scheduled_nodes :: :"k8s.daemonset.current_scheduled_nodes" + def k8s_daemonset_current_scheduled_nodes do + :"k8s.daemonset.current_scheduled_nodes" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.daemonset`](../resource/k8s.md#daemonset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_desired_scheduled_nodes() + :"k8s.daemonset.desired_scheduled_nodes" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_DESIRED_SCHEDULED_NODES. + 'k8s.daemonset.desired_scheduled_nodes' + ``` + + + """ + + @spec k8s_daemonset_desired_scheduled_nodes :: :"k8s.daemonset.desired_scheduled_nodes" + def k8s_daemonset_desired_scheduled_nodes do + :"k8s.daemonset.desired_scheduled_nodes" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.daemonset`](../resource/k8s.md#daemonset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_misscheduled_nodes() + :"k8s.daemonset.misscheduled_nodes" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_MISSCHEDULED_NODES. + 'k8s.daemonset.misscheduled_nodes' + ``` + + + """ + + @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 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.daemonset`](../resource/k8s.md#daemonset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_daemonset_ready_nodes() + :"k8s.daemonset.ready_nodes" + + ### Erlang + + ```erlang + ?K8S_DAEMONSET_READY_NODES. + 'k8s.daemonset.ready_nodes' + ``` + + + """ + + @spec k8s_daemonset_ready_nodes :: :"k8s.daemonset.ready_nodes" + def k8s_daemonset_ready_nodes do + :"k8s.daemonset.ready_nodes" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.deployment`](../resource/k8s.md#deployment) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_deployment_available_pods() + :"k8s.deployment.available_pods" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_AVAILABLE_PODS. + 'k8s.deployment.available_pods' + ``` + + + """ + + @spec k8s_deployment_available_pods :: :"k8s.deployment.available_pods" + def k8s_deployment_available_pods do + :"k8s.deployment.available_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.deployment`](../resource/k8s.md#deployment) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_deployment_desired_pods() + :"k8s.deployment.desired_pods" + + ### Erlang + + ```erlang + ?K8S_DEPLOYMENT_DESIRED_PODS. + 'k8s.deployment.desired_pods' + ``` + + + """ + + @spec k8s_deployment_desired_pods :: :"k8s.deployment.desired_pods" + def k8s_deployment_desired_pods do + :"k8s.deployment.desired_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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_current_pods() + :"k8s.hpa.current_pods" + + ### Erlang + + ```erlang + ?K8S_HPA_CURRENT_PODS. + 'k8s.hpa.current_pods' + ``` + + + """ + + @spec k8s_hpa_current_pods :: :"k8s.hpa.current_pods" + def k8s_hpa_current_pods do + :"k8s.hpa.current_pods" + 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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_desired_pods() + :"k8s.hpa.desired_pods" + + ### Erlang + + ```erlang + ?K8S_HPA_DESIRED_PODS. + 'k8s.hpa.desired_pods' + ``` + + + """ + + @spec k8s_hpa_desired_pods :: :"k8s.hpa.desired_pods" + def k8s_hpa_desired_pods do + :"k8s.hpa.desired_pods" + 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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_max_pods() + :"k8s.hpa.max_pods" + + ### Erlang + + ```erlang + ?K8S_HPA_MAX_PODS. + 'k8s.hpa.max_pods' + ``` + + + """ + + @spec k8s_hpa_max_pods :: :"k8s.hpa.max_pods" + def k8s_hpa_max_pods do + :"k8s.hpa.max_pods" + 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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.hpa`](../resource/k8s.md#horizontalpodautoscaler) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_hpa_min_pods() + :"k8s.hpa.min_pods" + + ### Erlang + + ```erlang + ?K8S_HPA_MIN_PODS. + 'k8s.hpa.min_pods' + ``` + + + """ + + @spec k8s_hpa_min_pods :: :"k8s.hpa.min_pods" + def k8s_hpa_min_pods do + :"k8s.hpa.min_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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.job`](../resource/k8s.md#job) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_active_pods() + :"k8s.job.active_pods" + + ### Erlang + + ```erlang + ?K8S_JOB_ACTIVE_PODS. + 'k8s.job.active_pods' + ``` + + + """ + + @spec k8s_job_active_pods :: :"k8s.job.active_pods" + def k8s_job_active_pods do + :"k8s.job.active_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.job`](../resource/k8s.md#job) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_desired_successful_pods() + :"k8s.job.desired_successful_pods" + + ### Erlang + + ```erlang + ?K8S_JOB_DESIRED_SUCCESSFUL_PODS. + 'k8s.job.desired_successful_pods' + ``` + + + """ + + @spec k8s_job_desired_successful_pods :: :"k8s.job.desired_successful_pods" + def k8s_job_desired_successful_pods do + :"k8s.job.desired_successful_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.job`](../resource/k8s.md#job) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_failed_pods() + :"k8s.job.failed_pods" + + ### Erlang + + ```erlang + ?K8S_JOB_FAILED_PODS. + 'k8s.job.failed_pods' + ``` + + + """ + + @spec k8s_job_failed_pods :: :"k8s.job.failed_pods" + def k8s_job_failed_pods do + :"k8s.job.failed_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.job`](../resource/k8s.md#job) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_max_parallel_pods() + :"k8s.job.max_parallel_pods" + + ### Erlang + + ```erlang + ?K8S_JOB_MAX_PARALLEL_PODS. + 'k8s.job.max_parallel_pods' + ``` + + + """ + + @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 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.job`](../resource/k8s.md#job) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_job_successful_pods() + :"k8s.job.successful_pods" + + ### Erlang + + ```erlang + ?K8S_JOB_SUCCESSFUL_PODS. + 'k8s.job.successful_pods' + ``` + + + """ + + @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}` + ### Notes + + This metric SHOULD, at a minimum, be reported against a + [`k8s.namespace`](../resource/k8s.md#namespace) resource. + + + + ### 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 + + @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 """ + 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 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 """ + 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 """ + 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 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 """ + 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 """ + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.replicaset`](../resource/k8s.md#replicaset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicaset_available_pods() + :"k8s.replicaset.available_pods" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_AVAILABLE_PODS. + 'k8s.replicaset.available_pods' + ``` + + + """ + + @spec k8s_replicaset_available_pods :: :"k8s.replicaset.available_pods" + def k8s_replicaset_available_pods do + :"k8s.replicaset.available_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.replicaset`](../resource/k8s.md#replicaset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicaset_desired_pods() + :"k8s.replicaset.desired_pods" + + ### Erlang + + ```erlang + ?K8S_REPLICASET_DESIRED_PODS. + 'k8s.replicaset.desired_pods' + ``` + + + """ + + @spec k8s_replicaset_desired_pods :: :"k8s.replicaset.desired_pods" + def k8s_replicaset_desired_pods do + :"k8s.replicaset.desired_pods" + end + + @deprecated """ + Replaced by `k8s.replicationcontroller.available_pods`. + """ + + @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.desired_pods`. + """ + + @spec k8s_replication_controller_desired_pods :: :"k8s.replication_controller.desired_pods" + def k8s_replication_controller_desired_pods do + :"k8s.replication_controller.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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicationcontroller_available_pods() + :"k8s.replicationcontroller.available_pods" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS. + 'k8s.replicationcontroller.available_pods' + ``` + + + """ + + @spec k8s_replicationcontroller_available_pods :: :"k8s.replicationcontroller.available_pods" + def k8s_replicationcontroller_available_pods do + :"k8s.replicationcontroller.available_pods" + 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) + + This metric SHOULD, at a minimum, be reported against a + [`k8s.replicationcontroller`](../resource/k8s.md#replicationcontroller) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_replicationcontroller_desired_pods() + :"k8s.replicationcontroller.desired_pods" + + ### Erlang + + ```erlang + ?K8S_REPLICATIONCONTROLLER_DESIRED_PODS. + 'k8s.replicationcontroller.desired_pods' + ``` + + + """ + + @spec k8s_replicationcontroller_desired_pods :: :"k8s.replicationcontroller.desired_pods" + def k8s_replicationcontroller_desired_pods do + :"k8s.replicationcontroller.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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.statefulset`](../resource/k8s.md#statefulset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_current_pods() + :"k8s.statefulset.current_pods" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_CURRENT_PODS. + 'k8s.statefulset.current_pods' + ``` + + + """ + + @spec k8s_statefulset_current_pods :: :"k8s.statefulset.current_pods" + def k8s_statefulset_current_pods do + :"k8s.statefulset.current_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.statefulset`](../resource/k8s.md#statefulset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_desired_pods() + :"k8s.statefulset.desired_pods" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_DESIRED_PODS. + 'k8s.statefulset.desired_pods' + ``` + + + """ + + @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 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.statefulset`](../resource/k8s.md#statefulset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_ready_pods() + :"k8s.statefulset.ready_pods" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_READY_PODS. + 'k8s.statefulset.ready_pods' + ``` + + + """ + + @spec k8s_statefulset_ready_pods :: :"k8s.statefulset.ready_pods" + def k8s_statefulset_ready_pods do + :"k8s.statefulset.ready_pods" + 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). + + This metric SHOULD, at a minimum, be reported against a + [`k8s.statefulset`](../resource/k8s.md#statefulset) resource. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.K8SMetrics.k8s_statefulset_updated_pods() + :"k8s.statefulset.updated_pods" + + ### Erlang + + ```erlang + ?K8S_STATEFULSET_UPDATED_PODS. + 'k8s.statefulset.updated_pods' + ``` + + + """ + + @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/messaging_metrics.ex b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/messaging_metrics.ex index e672e67e..a103f039 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 """ 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 00000000..7fda0d62 --- /dev/null +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/otel_metrics.ex @@ -0,0 +1,590 @@ +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 """ + Renamed to `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 """ + Renamed to `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 """ + Renamed to `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 + + @doc """ + The number of created spans for which the end operation was called + + Instrument: `counter` + Unit: `{span}` + ### Notes + + For spans with `recording=true`: Implementations **MUST** record both `otel.sdk.span.live` and `otel.sdk.span.ended`. + For spans with `recording=false`: If implementations decide to record this metric, they **MUST** also record `otel.sdk.span.live`. + + + + ### Elixir + + iex> OpenTelemetry.SemConv.Incubating.Metrics.OtelMetrics.otel_sdk_span_ended() + :"otel.sdk.span.ended" + + ### Erlang + + ```erlang + ?OTEL_SDK_SPAN_ENDED. + 'otel.sdk.span.ended' + ``` + + + """ + + @spec otel_sdk_span_ended :: :"otel.sdk.span.ended" + def otel_sdk_span_ended do + :"otel.sdk.span.ended" + end + + @deprecated """ + Renamed to `otel.sdk.span.ended`. + """ + + @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 for which the end operation has not been called yet + + Instrument: `updowncounter` + Unit: `{span}` + ### Notes + + For spans with `recording=true`: Implementations **MUST** record both `otel.sdk.span.live` and `otel.sdk.span.ended`. + For spans with `recording=false`: If implementations decide to record this metric, they **MUST** also record `otel.sdk.span.ended`. + + + + ### 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 """ + Renamed to `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 +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 07b3f74d..f98b4a8e 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 @@ -196,7 +196,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do Number of file descriptors in use by the process. Instrument: `updowncounter` - Unit: `{count}` + Unit: `{file_descriptor}` ### Elixir @@ -272,4 +272,36 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.ProcessMetrics do def process_thread_count do :"process.thread.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 end 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 0c5f0336..9f568de7 100644 --- a/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex +++ b/apps/opentelemetry_semantic_conventions/lib/incubating/metrics/system_metrics.ex @@ -3,26 +3,9 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do @moduledoc """ OpenTelemetry Semantic Conventions for System metrics. """ - @doc """ - Reports the current frequency of the CPU in Hz - - Instrument: `gauge` - Unit: `{Hz}` - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_frequency() - :"system.cpu.frequency" - - ### Erlang - - ```erlang - ?SYSTEM_CPU_FREQUENCY. - 'system.cpu.frequency' - ``` - + @deprecated """ + Replaced by `cpu.frequency`. """ @spec system_cpu_frequency :: :"system.cpu.frequency" @@ -35,6 +18,9 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do 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 @@ -62,6 +48,9 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do Instrument: `updowncounter` Unit: `{cpu}` + ### Notes + + Calculated by multiplying the number of sockets by the number of cores per socket ### Elixir @@ -84,26 +73,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do :"system.cpu.physical.count" end - @doc """ - Seconds each logical CPU spent on each mode - - Instrument: `counter` - Unit: `s` - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_time() - :"system.cpu.time" - - ### Erlang - - ```erlang - ?SYSTEM_CPU_TIME. - 'system.cpu.time' - ``` - - + @deprecated """ + Replaced by `cpu.time`. """ @spec system_cpu_time :: :"system.cpu.time" @@ -111,26 +82,8 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do :"system.cpu.time" end - @doc """ - Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs - - Instrument: `gauge` - Unit: `1` - - - ### Elixir - - iex> OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics.system_cpu_utilization() - :"system.cpu.utilization" - - ### Erlang - - ```erlang - ?SYSTEM_CPU_UTILIZATION. - 'system.cpu.utilization' - ``` - - + @deprecated """ + Replaced by `cpu.utilization`. """ @spec system_cpu_utilization :: :"system.cpu.utilization" @@ -139,7 +92,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `By` @@ -202,7 +155,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 """ + Instrument: `counter` Unit: `{operation}` @@ -263,7 +243,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `{operation}` @@ -290,10 +270,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 +329,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `gauge` Unit: `1` @@ -507,7 +519,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `gauge` Unit: `1` @@ -534,7 +546,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `updowncounter` Unit: `{connection}` @@ -631,7 +643,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `By` @@ -658,7 +670,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `{packet}` @@ -685,7 +697,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `{fault}` @@ -712,7 +724,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `counter` Unit: `{operation}` @@ -766,7 +778,7 @@ defmodule OpenTelemetry.SemConv.Incubating.Metrics.SystemMetrics do end @doc """ - none + Instrument: `gauge` Unit: `1` @@ -845,4 +857,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 00000000..8e536e21 --- /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 00000000..9c24de15 --- /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 16b1e0b7..72de5236 100644 --- a/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex +++ b/apps/opentelemetry_semantic_conventions/lib/schema_urls.ex @@ -1,3 +1,4 @@ defmodule OpenTelemetry.SemConv.Schemas do def v1_27_0, do: "https://opentelemetry.io/schemas/1.27.0" + def v1_33_0, do: "https://opentelemetry.io/schemas/1.33.0" end diff --git a/apps/opentelemetry_semantic_conventions/makefile b/apps/opentelemetry_semantic_conventions/makefile index 27cbddfb..15293a9f 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.33.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.15.0/weaver-installer.sh | sh checkout: mkdir semtmp @@ -28,18 +28,17 @@ checkout: cd semtmp; \ git checkout v$(SEMCON_VERSION) && \ cp -r docs ../guides - rm -rf guides/docs - rm -f $(addprefix guides/attributes-registry/, android.md aspnetcore.md dotnet.md go.md ios.md jvm.md kestrel.md nodejs.md signalr.md v8js.md veightjs.md webengine.md) + rm -rf $(addprefix guides/, docs dotnet mobile) + rm -f $(addprefix guides/attributes-registry/, android.md aspnetcore.md cpython.md dotnet.md go.md ios.md jvm.md kestrel.md nodejs.md signalr.md v8js.md veightjs.md webengine.md) + rm -f $(addprefix guides/runtime/, cpython-metrics.md dotnet-metrics.md go-metrics.md jvm-metrics.md nodejs-metrics.md v8js-metrics.md) generate: generate-elixir generate-erlang format-and-test generate-elixir: - weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/ --param stability=stable elixir . - weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/incubating/ --param stability=experimental elixir . + weaver registry generate --registry=semtmp/model --templates=templates --param output=lib/ elixir . generate-erlang: - weaver registry generate --registry=semtmp/model --templates=templates --param output=include/ --param stability=stable erlang . - weaver registry generate --registry=semtmp/model --templates=templates --param output=include/incubating/ --param stability=experimental erlang . + weaver registry generate --registry=semtmp/model --templates=templates --param output=include/ erlang . format-and-test: mix format diff --git a/apps/opentelemetry_semantic_conventions/mix.exs b/apps/opentelemetry_semantic_conventions/mix.exs index 7027c3c1..b687297f 100644 --- a/apps/opentelemetry_semantic_conventions/mix.exs +++ b/apps/opentelemetry_semantic_conventions/mix.exs @@ -24,20 +24,28 @@ defmodule OpenTelemetry.SemanticConventions.MixProject do extra_section: "GUIDES", extras: guides() ++ [], groups_for_extras: [ + General: Path.wildcard("guides/{general,non-normative}/**/*.md"), + App: Path.wildcard("guides/app/*.md"), "Attributes Registry": Path.wildcard("guides/attributes-registry/*.md"), + Azure: Path.wildcard("guides/azure/*.md"), + Browser: Path.wildcard("guides/browser/*.md"), + "CI/CD": Path.wildcard("guides/cicd/*.md"), + CLI: Path.wildcard("guides/cli/*.md"), "Cloud Providers": Path.wildcard("guides/cloud-providers/*.md"), "Cloud Events": Path.wildcard("guides/cloudevents/*.md"), + Code: Path.wildcard("guides/code/*.md"), Database: Path.wildcard("guides/database/*.md"), DNS: Path.wildcard("guides/dns/*.md"), Exceptions: Path.wildcard("guides/exceptions/*.md"), FAAS: Path.wildcard("guides/faas/*.md"), "Feature Flags": Path.wildcard("guides/feature-flags/*.md"), - General: Path.wildcard("guides/general/*.md"), "Generative AI": Path.wildcard("guides/gen-ai/*.md"), GraphQL: Path.wildcard("guides/graphql/*.md"), + Hardware: Path.wildcard("guides/{hardware,hw}/*.md"), HTTP: Path.wildcard("guides/http/*.md"), Messaging: Path.wildcard("guides/messaging/*.md"), "Object Stores": Path.wildcard("guides/object-stores/*.md"), + OTel: Path.wildcard("guides/otel/*.md"), Resource: Path.wildcard("guides/resource/**/*.md"), RPC: Path.wildcard("guides/rpc/*.md"), Runtime: Path.wildcard("guides/runtime/*.md"), 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 58a5779b..dd1962ed 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.33.0"}, {registered, []}, {applications, [kernel, 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 0509b475..d80f6a96 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 @@ -1,12 +1,12 @@ {%- import 'common.j2' as c %} -{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_attributes.ex" -%} +{%- set file_name = ctx.output ~ c.file_name(ctx.root_namespace) ~ "_attributes.ex" -%} {{ template.set_file_name(file_name) }} -{%- set module_name = ctx.id | pascal_case | acronym ~ "Attributes" -%} +{%- set module_name = ctx.root_namespace | pascal_case | acronym ~ "Attributes" -%} {%- set incubating_module_namespace = "OpenTelemetry.SemConv.Incubating" -%} {%- set stable_module_namespace = "OpenTelemetry.SemConv" -%} -{%- if params.stability == "experimental" -%} +{%- if ctx.stability == "incubating" -%} {%- set module_namespace = incubating_module_namespace -%} {%- else -%} {%- set module_namespace = stable_module_namespace -%} @@ -14,10 +14,10 @@ defmodule {{ module_namespace }}.{{ module_name }} do # This is an auto-generated file @moduledoc """ - OpenTelemetry Semantic Conventions for {{ ctx.id | title | acronym }} attributes. + OpenTelemetry Semantic Conventions for {{ ctx.root_namespace | title | acronym }} attributes. """ -{%- if params.stability == "experimental" and (ctx.all_attributes | length) > (ctx.attributes | length) %} -{%- for attribute in ctx.all_attributes | sort(attribute="name") %} +{%- if ctx.stability == "incubating" %} +{%- for attribute in ctx.attributes %} {%- if attribute is stable %} defdelegate {{ c.func_name(attribute.name) }}(), to: {{ stable_module_namespace }}.{{ module_name }} {% if attribute.type is mapping %} @@ -27,6 +27,7 @@ defmodule {{ module_namespace }}.{{ module_name }} do {% endfor %} {% endif -%} {%- for attribute in ctx.attributes | sort(attribute="name") %} + {%- if (attribute is stable and ctx.stability == "stable") or (attribute is experimental and ctx.stability == "incubating") %} {% if attribute.type is mapping %} @typedoc """ {{ c.strong_reqs(attribute.brief) }} @@ -42,7 +43,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) %} @@ -122,5 +123,6 @@ defmodule {{ module_namespace }}.{{ module_name }} do {{ c.enum_to_map(attribute.type.members) }} end {%- endif %} + {%- endif -%} {% endfor %} -end +end \ No newline at end of file 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 d22fc609..1f657978 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 @@ -1,11 +1,11 @@ {%- import 'common.j2' as c %} -{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_metrics.ex" -%} +{%- set file_name = ctx.output ~ c.file_name(ctx.root_namespace) ~ "_metrics.ex" -%} {%- set trim_blocks = true %} {%- set trim_lstrip_blocks = true %} {{ template.set_file_name(file_name) }} -{%- set module_name = ctx.id | pascal_case | acronym ~ "Metrics" -%} -{%- if params.stability == "experimental" -%} +{%- set module_name = ctx.root_namespace | pascal_case | acronym ~ "Metrics" -%} +{%- if ctx.stability == "incubating" -%} {%- set module_namespace = "OpenTelemetry.SemConv.Incubating.Metrics" -%} {%- else -%} {%- set module_namespace = "OpenTelemetry.SemConv.Metrics" -%} @@ -13,12 +13,12 @@ defmodule {{ module_namespace }}.{{ module_name }} do # This is an auto-generated file @moduledoc """ - OpenTelemetry Semantic Conventions for {{ ctx.id | title | acronym }} metrics. + OpenTelemetry Semantic Conventions for {{ ctx.root_namespace | title | acronym }} metrics. """ -{%- for metric in ctx.metrics | sort(attribute="metric_name") %} +{%- for metric in ctx.metrics %} {% 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 4e437050..7ebc491b 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml +++ b/apps/opentelemetry_semantic_conventions/templates/registry/elixir/weaver.yaml @@ -1,41 +1,58 @@ params: - stability: "stable" - excluded: ["aspnetcore", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] - excluded_attrs: ["messaging.client_id"] + excluded_namespaces: ["aspnetcore", "az", "cpython", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] + excluded_attributes: [] templates: - pattern: semantic_attributes.ex.j2 filter: > - .groups - | 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)) - | group_by(.group_id) - | 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), - output: $output + "/attributes/" + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental"] # experimental here is fine, weaver matches all non-stable things to it + }) | map({ + root_namespace: .root_namespace, + attributes: .attributes, + excluded_attributes: $excluded_attributes, + output: "lib/attributes/", + stability: "stable" }) - | map(select( .id as $id | any( $excluded[]; . == $id) | not )) - | map(select(.attributes | length > 0)) application_mode: each + - pattern: semantic_attributes.ex.j2 + filter: > + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces + }) | map({ + root_namespace: .root_namespace, + attributes: .attributes, + excluded_attributes: $excluded_attributes, + output: "lib/incubating/attributes/", + stability: "incubating" + }) + application_mode: each + - pattern: semantic_metrics.ex.j2 filter: > - .groups - | map(select(.type == "metric")) - | map(select(.stability == $stability)) - | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) - | group_by(.group_id) - | map({ - id: .[0].group_id, - metrics: . | sort_by(.metric_name), - output: $output + "/metrics/" + semconv_grouped_metrics({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental"] # experimental here is fine, weaver matches all non-stable things to it + }) | map({ + root_namespace: .root_namespace, + metrics: .metrics, + output: "lib/metrics/", + stability: "stable" }) - | map(select( .id as $id | any( $excluded[]; . == $id) | not )) - | map(select(.metrics | length > 0)) application_mode: each + - pattern: semantic_metrics.ex.j2 + filter: > + semconv_grouped_metrics({ + "exclude_root_namespace": $excluded_namespaces + }) | map({ + root_namespace: .root_namespace, + metrics: .metrics, + output: "lib/incubating/metrics/", + stability: "incubating" + }) + application_mode: each + text_maps: elixir_types: "int": "integer()" @@ -55,4 +72,4 @@ text_maps: "template[double[]]": "[float()]" "template[boolean[]]": "[boolean()]" -acronyms: ["iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] +acronyms: ["GenAI", "CICD", "VCS", "CPU", "HW", "iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] 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 edc3f77d..8dbb72ce 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 @@ -1,5 +1,5 @@ {%- import 'common.j2' as c %} -{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_attributes.hrl" -%} +{%- set file_name = ctx.output ~ c.file_name(ctx.root_namespace) ~ "_attributes.hrl" -%} {{ template.set_file_name(file_name) }} %%%------------------------------------------------------------------------ %% Copyright The OpenTelemetry Authors @@ -15,12 +15,12 @@ %% See the License for the specific language governing permissions and %% limitations under the License. %%%------------------------------------------------------------------------- -{%- if params.stability == "experimental" and (ctx.all_attributes | length) > (ctx.attributes | length) %} --include_lib("opentelemetry_semantic_conventions/include/attributes/{{ c.file_name(ctx.id) }}_attributes.hrl"). +{%- if ctx.stability == "incubating" %} +-include_lib("opentelemetry_semantic_conventions/include/attributes/{{ c.file_name(ctx.root_namespace) }}_attributes.hrl"). {% endif -%} -{%- for attribute in ctx.attributes | sort(attribute="name") %} +{%- for attribute in ctx.attributes %} {% 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 169b7e2a..9a842c28 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 @@ -1,5 +1,5 @@ {%- import 'common.j2' as c %} -{%- set file_name = ctx.output ~ c.file_name(ctx.id) ~ "_metrics.hrl" -%} +{%- set file_name = ctx.output ~ c.file_name(ctx.root_namespace) ~ "_metrics.hrl" -%} {{ template.set_file_name(file_name) }} %%%------------------------------------------------------------------------ %% Copyright The OpenTelemetry Authors @@ -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 a82e13ec..50b5eb1f 100644 --- a/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml +++ b/apps/opentelemetry_semantic_conventions/templates/registry/erlang/weaver.yaml @@ -1,43 +1,61 @@ params: - stability: "stable" - excluded: ["android", "aspnetcore", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] - excluded_attrs: ["messaging.client_id"] + excluded_namespaces: ["aspnetcore", "az", "cpython", "dotnet", "go", "ios", "jvm", "kestrel", "nodejs", "signalr", "v8js", "veightjs", "webengine"] + excluded_attributes: [] templates: - pattern: semantic_attributes.hrl.j2 filter: > - .groups - | 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)) - | group_by(.group_id) - | 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[]], - output: $output + "/attributes/" + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental"] # experimental here is fine, weaver matches all non-stable things to it + }) | map({ + root_namespace: .root_namespace, + attributes: .attributes, + excluded_attributes: $excluded_attributes, + output: "include/attributes/", + stability: "stable" + }) + application_mode: each + - pattern: semantic_attributes.hrl.j2 + filter: > + semconv_grouped_attributes({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["stable"] + }) | map({ + root_namespace: .root_namespace, + attributes: .attributes, + excluded_attributes: $excluded_attributes, + output: "include/incubating/attributes/", + stability: "incubating" + }) + application_mode: each + + - pattern: semantic_metrics.hrl.j2 + filter: > + semconv_grouped_metrics({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["experimental"] # experimental here is fine, weaver matches all non-stable things to it + }) | map({ + root_namespace: .root_namespace, + metrics: .metrics, + output: "include/metrics/", + stability: "stable" }) - | map(select( .id as $id | any( $excluded[]; . == $id) | not )) - | map(select(.attributes | length > 0)) application_mode: each - pattern: semantic_metrics.hrl.j2 filter: > - .groups - | map(select(.type == "metric")) - | map(select(.stability == $stability)) - | map({ id: .id, group_id: .id | split(".") | .[1], brief, unit, stability, deprecated, instrument, metric_name, note}) - | group_by(.group_id) - | map({ - id: .[0].group_id, - metrics: . | sort_by(.metric_name), - output: $output + "/metrics/" + semconv_grouped_metrics({ + "exclude_root_namespace": $excluded_namespaces, + "exclude_stability": ["stable"] + }) | map({ + root_namespace: .root_namespace, + metrics: .metrics, + output: "include/incubating/metrics/", + stability: "incubating" }) - | map(select( .id as $id | any( $excluded[]; . == $id) | not )) - | map(select(.metrics | length > 0)) application_mode: each -acronyms: ["iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] +acronyms: ["GenAI", "CICD", "VCS", "CPU", "HW", "iOS", "HTTP", "API", "SDK", "CLI", "URL", "JSON", "XML", "HTML", "TLS", "RPC", "OS", "OCI", "GCP", "FAAS", "DNS", "DB", "AWS", "S3", "K8S" ] text_maps: erlang_types: