From c9d0c751f918a2029d0ff4104b34acd58621cfc5 Mon Sep 17 00:00:00 2001 From: Nev Wylie <54870357+MSNev@users.noreply.github.com> Date: Wed, 15 Nov 2023 16:37:19 -0800 Subject: [PATCH] chore: Semantic Conventions export individual strings --- CHANGELOG.md | 2 + .../test/util/resource-assertions.ts | 20 +- .../detectors/browser/EnvDetector.test.ts | 7 +- .../test/resource-assertions.test.ts | 16 +- .../test/util/resource-assertions.ts | 20 +- .../src/internal/constants.ts | 101 + .../src/internal/utils.ts | 34 + .../resource/SemanticResourceAttributes.ts | 1555 ++++++++- .../src/trace/SemanticAttributes.ts | 2866 +++++++++++++++-- scripts/semconv/generate.sh | 12 +- .../templates/SemanticAttributes.ts.j2 | 156 +- 11 files changed, 4282 insertions(+), 507 deletions(-) create mode 100644 packages/opentelemetry-semantic-conventions/src/internal/constants.ts create mode 100644 packages/opentelemetry-semantic-conventions/src/internal/utils.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 336e211d6f1..fc7cdbd98da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :rocket: (Enhancement) +* chore: Semantic Conventions export individual strings [4185](https://github.com/open-telemetry/opentelemetry-js/issues/4185) + ### :books: (Refine Doc) ### :house: (Internal) diff --git a/experimental/packages/opentelemetry-sdk-node/test/util/resource-assertions.ts b/experimental/packages/opentelemetry-sdk-node/test/util/resource-assertions.ts index bcbdceadc07..80c8c04ecca 100644 --- a/experimental/packages/opentelemetry-sdk-node/test/util/resource-assertions.ts +++ b/experimental/packages/opentelemetry-sdk-node/test/util/resource-assertions.ts @@ -17,7 +17,12 @@ import { SDK_INFO } from '@opentelemetry/core'; import * as assert from 'assert'; import { IResource, Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, + SEMRESATTRS_TELEMETRY_SDK_NAME, + SEMRESATTRS_TELEMETRY_SDK_VERSION, + SemanticResourceAttributes, +} from '@opentelemetry/semantic-conventions'; /** * Test utility method to validate a cloud resource @@ -199,9 +204,9 @@ export const assertTelemetrySDKResource = ( } ) => { const defaults = { - name: SDK_INFO.NAME, - language: SDK_INFO.LANGUAGE, - version: SDK_INFO.VERSION, + name: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_NAME], + language: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], + version: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_VERSION], }; validations = { ...defaults, ...validations }; @@ -317,7 +322,9 @@ const assertHasOneLabel = (prefix: string, resource: Resource): void => { assert.ok( hasOne, - 'Resource must have one of the following attributes: ' + + 'Must have one node Resource(s) starting with [' + + prefix + + '] matching the following attributes: ' + Object.entries(SemanticResourceAttributes) .reduce((result, [key, value]) => { if (key.startsWith(prefix)) { @@ -325,6 +332,7 @@ const assertHasOneLabel = (prefix: string, resource: Resource): void => { } return result; }) - .join(', ') + .join(', ') + + JSON.stringify(Object.keys(SemanticResourceAttributes)) ); }; diff --git a/packages/opentelemetry-resources/test/detectors/browser/EnvDetector.test.ts b/packages/opentelemetry-resources/test/detectors/browser/EnvDetector.test.ts index 89015957737..0a263ce4b39 100644 --- a/packages/opentelemetry-resources/test/detectors/browser/EnvDetector.test.ts +++ b/packages/opentelemetry-resources/test/detectors/browser/EnvDetector.test.ts @@ -16,7 +16,6 @@ import * as assert from 'assert'; import { RAW_ENVIRONMENT } from '@opentelemetry/core'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { envDetector, IResource } from '../../../src'; import { assertEmptyResource, @@ -41,9 +40,9 @@ describeBrowser('envDetector() on web browser', () => { it('should return resource information from environment variable', async () => { const resource: IResource = await envDetector.detect(); assertWebEngineResource(resource, { - [SemanticResourceAttributes.WEBENGINE_NAME]: 'chromium', - [SemanticResourceAttributes.WEBENGINE_VERSION]: '99', - [SemanticResourceAttributes.WEBENGINE_DESCRIPTION]: 'Chromium', + name: 'chromium', + version: '99', + description: 'Chromium', }); assert.strictEqual(resource.attributes['custom.key'], 'custom value'); }); diff --git a/packages/opentelemetry-resources/test/resource-assertions.test.ts b/packages/opentelemetry-resources/test/resource-assertions.test.ts index cde2b8a9f2c..7dcb278f8af 100644 --- a/packages/opentelemetry-resources/test/resource-assertions.test.ts +++ b/packages/opentelemetry-resources/test/resource-assertions.test.ts @@ -15,7 +15,12 @@ */ import { SDK_INFO } from '@opentelemetry/core'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, + SEMRESATTRS_TELEMETRY_SDK_NAME, + SEMRESATTRS_TELEMETRY_SDK_VERSION, + SemanticResourceAttributes, +} from '@opentelemetry/semantic-conventions'; import { Resource } from '../src/Resource'; import { assertCloudResource, @@ -132,9 +137,12 @@ describe('assertK8sResource', () => { describe('assertTelemetrySDKResource', () => { it('uses default validations', () => { const resource = new Resource({ - [SemanticResourceAttributes.TELEMETRY_SDK_NAME]: SDK_INFO.NAME, - [SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: SDK_INFO.LANGUAGE, - [SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: SDK_INFO.VERSION, + [SemanticResourceAttributes.TELEMETRY_SDK_NAME]: + SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_NAME], + [SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: + SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], + [SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: + SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_VERSION], }); assertTelemetrySDKResource(resource, {}); }); diff --git a/packages/opentelemetry-resources/test/util/resource-assertions.ts b/packages/opentelemetry-resources/test/util/resource-assertions.ts index 02f1a70dd40..c9da0b36ac3 100644 --- a/packages/opentelemetry-resources/test/util/resource-assertions.ts +++ b/packages/opentelemetry-resources/test/util/resource-assertions.ts @@ -17,7 +17,12 @@ import { SDK_INFO } from '@opentelemetry/core'; import * as assert from 'assert'; import { IResource } from '../../src/IResource'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, + SEMRESATTRS_TELEMETRY_SDK_NAME, + SEMRESATTRS_TELEMETRY_SDK_VERSION, + SemanticResourceAttributes, +} from '@opentelemetry/semantic-conventions'; /** * Test utility method to validate a cloud resource @@ -199,9 +204,9 @@ export const assertTelemetrySDKResource = ( } ) => { const defaults = { - name: SDK_INFO.NAME, - language: SDK_INFO.LANGUAGE, - version: SDK_INFO.VERSION, + name: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_NAME], + language: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], + version: SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_VERSION], }; validations = { ...defaults, ...validations }; @@ -382,7 +387,9 @@ const assertHasOneLabel = (prefix: string, resource: IResource): void => { assert.ok( hasOne, - 'Resource must have one of the following attributes: ' + + 'Must have one Resource(s) starting with [' + + prefix + + '] matching the following attributes: ' + Object.entries(SemanticResourceAttributes) .reduce((result, [key, value]) => { if (key.startsWith(prefix)) { @@ -390,6 +397,7 @@ const assertHasOneLabel = (prefix: string, resource: IResource): void => { } return result; }) - .join(', ') + .join(', ') + + JSON.stringify(Object.keys(SemanticResourceAttributes)) ); }; diff --git a/packages/opentelemetry-semantic-conventions/src/internal/constants.ts b/packages/opentelemetry-semantic-conventions/src/internal/constants.ts new file mode 100644 index 00000000000..0853e31e193 --- /dev/null +++ b/packages/opentelemetry-semantic-conventions/src/internal/constants.ts @@ -0,0 +1,101 @@ +/* + * 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 + * + * https://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. + */ + +export const ACCOUNT_DOT = 'account.'; +export const ARN = 'arn'; +export const AWS = 'aws'; +export const AZURE = 'azure'; +export const CASSANDRA_DOT = 'cassandra.'; +export const CARRIER_DOT = 'carrier.'; +export const CLOUD_DOT = 'cloud.'; +export const CLUSTER_DOT = 'cluster.'; +export const CODE_DOT = 'code.'; +export const COLLECTION = 'collection'; +export const COMMAND = 'command'; +export const COMPRESSED = 'compressed'; +export const CONTAINER_DOT = 'container.'; +export const CONTENT = 'content'; +export const CONNECTION = 'connection'; +export const COORDINATOR_DOT = 'coordinator.'; +export const CRON = 'cron'; +export const DAEMON = 'daemon'; +export const DB_DOT = 'db.'; +export const DEPLOYMENT_DOT = 'deployment.'; +export const DESCRIPTION = 'description'; +export const DEVICE_DOT = 'device.'; +export const DOCUMENT_DOT = 'document.'; +export const DOT = '.'; +export const DYNAMODB_DOT = 'dynamodb.'; +export const ECS_DOT = 'ecs.'; +export const EKS_DOT = 'eks.'; +export const EXECUTABLE_DOT = 'executable.'; +export const ENDUSER_DOT = 'enduser.'; +export const EXCEPTION_DOT = 'exception.'; +export const FAAS_DOT = 'faas.'; +export const GLOBAL = 'global'; +export const GROUP_DOT = 'group.'; +export const KAFKA_DOT = 'kafka.'; +export const K8S_DOT = 'k8s.'; +export const HTTP_DOT = 'http.'; +export const HOST = 'host'; +export const ID = 'id'; +export const IMAGE_DOT = 'image.'; +export const INDEX = 'index'; +export const INSTANCE = 'instance'; +export const INVOKED = 'invoked'; +export const JOB = 'job'; +export const JSONRPC_DOT = 'jsonrpc.'; +export const LAMBDA_DOT = 'lambda.'; +export const LENGTH = 'length'; +export const LOCAL = 'local'; +export const LOG_DOT = 'log.'; +export const MESSAGE = 'message'; +export const MESSAGING_DOT = 'messaging.'; +export const MODEL_DOT = 'model.'; +export const MONGODB_DOT = 'mongodb.'; +export const MSSQL_DOT = 'mssql.'; +export const NAME = 'name'; +export const NET_DOT = 'net.'; +export const NODE_DOT = 'node.'; +export const OS_DOT = 'os.'; +export const PEER_DOT = 'peer.'; +export const PORT = 'port'; +export const PROCESS_DOT = 'process.'; +export const PROTOCOL = 'protocol'; +export const PROVISIONED = 'provisioned'; +export const READ = 'read'; +export const REQUEST = 'request'; +export const REPLICA = 'replica'; +export const RESPONSE = 'response'; +export const RPC_DOT = 'rpc.'; +export const RUNTIME_DOT = 'runtime.'; +export const SDK_DOT = 'sdk.'; +export const SECONDARY = 'secondary'; +export const SERVICE_DOT = 'service.'; +export const SET_DOT = 'set.'; +export const SPACE = 'space'; +export const STATEFUL = 'stateful'; +export const STREAM_DOT = 'stream.'; +export const TASK_DOT = 'task.'; +export const TELEMETRY_DOT = 'telemetry.'; +export const THREAD_DOT = 'thread.'; +export const TYPE = 'type'; +export const UID = 'uid'; +export const UN = 'un'; +export const UNDERSCORE = '_'; +export const WEBENGINE_DOT = 'webengine.'; +export const WRITE = 'write'; +export const VERSION = 'version'; diff --git a/packages/opentelemetry-semantic-conventions/src/internal/utils.ts b/packages/opentelemetry-semantic-conventions/src/internal/utils.ts new file mode 100644 index 00000000000..876dfe87ed2 --- /dev/null +++ b/packages/opentelemetry-semantic-conventions/src/internal/utils.ts @@ -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 + * + * https://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. + */ + +/** + * Creates a const map from the given values + * @param values - An array of values to be used as keys and values in the map. + * @returns A populated version of the map with the values and keys derived from the values. + */ +export const createConstMap = (values: Array): T => { + // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any + let res: any = {}; + const len = values.length; + for (let lp = 0; lp < len; lp++) { + const val = values[lp]; + if (val) { + res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val; + } + } + + return res as T; +}; diff --git a/packages/opentelemetry-semantic-conventions/src/resource/SemanticResourceAttributes.ts b/packages/opentelemetry-semantic-conventions/src/resource/SemanticResourceAttributes.ts index e123c3513e1..161a2e0854a 100644 --- a/packages/opentelemetry-semantic-conventions/src/resource/SemanticResourceAttributes.ts +++ b/packages/opentelemetry-semantic-conventions/src/resource/SemanticResourceAttributes.ts @@ -14,155 +14,837 @@ * limitations under the License. */ +import { createConstMap } from '../internal/utils'; +import { + DOT, + UNDERSCORE, + ACCOUNT_DOT, + CLOUD_DOT, + CONTAINER_DOT, + CLUSTER_DOT, + DEPLOYMENT_DOT, + DEVICE_DOT, + ECS_DOT, + EKS_DOT, + EXECUTABLE_DOT, + FAAS_DOT, + GROUP_DOT, + K8S_DOT, + LOG_DOT, + IMAGE_DOT, + MODEL_DOT, + NODE_DOT, + OS_DOT, + PROCESS_DOT, + RUNTIME_DOT, + SDK_DOT, + SERVICE_DOT, + SET_DOT, + STREAM_DOT, + TASK_DOT, + TELEMETRY_DOT, + WEBENGINE_DOT, + ARN, + AWS, + AZURE, + COMMAND, + CRON, + DAEMON, + DESCRIPTION, + HOST, + ID, + INSTANCE, + JOB, + NAME, + REPLICA, + SPACE, + STATEFUL, + TYPE, + UID, + VERSION, +} from '../internal/constants'; + +//---------------------------------------------------------------------------------------------------------- // DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -export const SemanticResourceAttributes = { +//---------------------------------------------------------------------------------------------------------- + +//---------------------------------------------------------------------------------------------------------- +// Constant values for SemanticResourceAttributes +//---------------------------------------------------------------------------------------------------------- + +/** + * Name of the cloud provider. + */ +export const SEMRESATTRS_CLOUD_PROVIDER = (CLOUD_DOT + + 'provider') as 'cloud.provider'; + +/** + * The cloud account ID the resource is assigned to. + */ +export const SEMRESATTRS_CLOUD_ACCOUNT_ID = (CLOUD_DOT + + ACCOUNT_DOT + + ID) as 'cloud.account.id'; + +/** + * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). + */ +export const SEMRESATTRS_CLOUD_REGION = (CLOUD_DOT + + 'region') as 'cloud.region'; + +/** + * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. + * + * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + */ +export const SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = (CLOUD_DOT + + 'availability_zone') as 'cloud.availability_zone'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const SEMRESATTRS_CLOUD_PLATFORM = (CLOUD_DOT + + 'platform') as 'cloud.platform'; + +/** + * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + */ +export const SEMRESATTRS_AWS_ECS_CONTAINER_ARN = (AWS + + DOT + + ECS_DOT + + CONTAINER_DOT + + ARN) as 'aws.ecs.container.arn'; + +/** + * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + */ +export const SEMRESATTRS_AWS_ECS_CLUSTER_ARN = (AWS + + DOT + + ECS_DOT + + CLUSTER_DOT + + ARN) as 'aws.ecs.cluster.arn'; + +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +export const SEMRESATTRS_AWS_ECS_LAUNCHTYPE = (AWS + + DOT + + ECS_DOT + + 'launchtype') as 'aws.ecs.launchtype'; + +/** + * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + */ +export const SEMRESATTRS_AWS_ECS_TASK_ARN = (AWS + + DOT + + ECS_DOT + + TASK_DOT + + ARN) as 'aws.ecs.task.arn'; + +/** + * The task definition family this task definition is a member of. + */ +export const SEMRESATTRS_AWS_ECS_TASK_FAMILY = (AWS + + DOT + + ECS_DOT + + TASK_DOT + + 'family') as 'aws.ecs.task.family'; + +/** + * The revision for this task definition. + */ +export const SEMRESATTRS_AWS_ECS_TASK_REVISION = (AWS + + DOT + + ECS_DOT + + TASK_DOT + + 'revision') as 'aws.ecs.task.revision'; + +/** + * The ARN of an EKS cluster. + */ +export const SEMRESATTRS_AWS_EKS_CLUSTER_ARN = (AWS + + DOT + + EKS_DOT + + CLUSTER_DOT + + ARN) as 'aws.eks.cluster.arn'; + +/** + * The name(s) of the AWS log group(s) an application is writing to. + * + * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. + */ +export const SEMRESATTRS_AWS_LOG_GROUP_NAMES = (AWS + + DOT + + LOG_DOT + + GROUP_DOT + + NAME + + 's') as 'aws.log.group.names'; + +/** + * The Amazon Resource Name(s) (ARN) of the AWS log group(s). + * + * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + */ +export const SEMRESATTRS_AWS_LOG_GROUP_ARNS = (AWS + + DOT + + LOG_DOT + + GROUP_DOT + + ARN + + 's') as 'aws.log.group.arns'; + +/** + * The name(s) of the AWS log stream(s) an application is writing to. + */ +export const SEMRESATTRS_AWS_LOG_STREAM_NAMES = (AWS + + DOT + + LOG_DOT + + STREAM_DOT + + NAME + + 's') as 'aws.log.stream.names'; + +/** + * The ARN(s) of the AWS log stream(s). + * + * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. + */ +export const SEMRESATTRS_AWS_LOG_STREAM_ARNS = (AWS + + DOT + + LOG_DOT + + STREAM_DOT + + ARN + + 's') as 'aws.log.stream.arns'; + +/** + * Container name. + */ +export const SEMRESATTRS_CONTAINER_NAME = (CONTAINER_DOT + + NAME) as 'container.name'; + +/** + * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. + */ +export const SEMRESATTRS_CONTAINER_ID = (CONTAINER_DOT + ID) as 'container.id'; + +/** + * The container runtime managing this container. + */ +export const SEMRESATTRS_CONTAINER_RUNTIME = (CONTAINER_DOT + + 'runtime') as 'container.runtime'; + +/** + * Name of the image the container was built on. + */ +export const SEMRESATTRS_CONTAINER_IMAGE_NAME = (CONTAINER_DOT + + IMAGE_DOT + + NAME) as 'container.image.name'; + +/** + * Container image tag. + */ +export const SEMRESATTRS_CONTAINER_IMAGE_TAG = (CONTAINER_DOT + + IMAGE_DOT + + 'tag') as 'container.image.tag'; + +/** + * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). + */ +export const SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = (DEPLOYMENT_DOT + + 'environment') as 'deployment.environment'; + +/** + * A unique identifier representing the device. + * + * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. + */ +export const SEMRESATTRS_DEVICE_ID = (DEVICE_DOT + ID) as 'device.id'; + +/** + * The model identifier for the device. + * + * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. + */ +export const SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = (DEVICE_DOT + + MODEL_DOT + + ID + + 'entifier') as 'device.model.identifier'; + +/** + * The marketing name for the device model. + * + * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. + */ +export const SEMRESATTRS_DEVICE_MODEL_NAME = (DEVICE_DOT + + MODEL_DOT + + NAME) as 'device.model.name'; + +/** + * The name of the single function that this runtime instance executes. + * + * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). + */ +export const SEMRESATTRS_FAAS_NAME = (FAAS_DOT + NAME) as 'faas.name'; + +/** +* The unique ID of the single function that this runtime instance executes. +* +* Note: Depending on the cloud provider, use: + +* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). +Take care not to use the "invoked ARN" directly but replace any +[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple +different aliases. +* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) +* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). + +On some providers, it may not be possible to determine the full ID at startup, +which is why this field cannot be made required. For example, on AWS the account ID +part of the ARN is not available without calling another AWS API +which may be deemed too slow for a short-running lambda function. +As an alternative, consider setting `faas.id` as a span attribute instead. +*/ +export const SEMRESATTRS_FAAS_ID = (FAAS_DOT + ID) as 'faas.id'; + +/** +* The immutable version of the function being executed. +* +* Note: Depending on the cloud provider and platform, use: + +* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + (an integer represented as a decimal string). +* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) + (i.e., the function name plus the revision suffix). +* **Google Cloud Functions:** The value of the + [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). +* **Azure Functions:** Not applicable. Do not set this attribute. +*/ +export const SEMRESATTRS_FAAS_VERSION = (FAAS_DOT + VERSION) as 'faas.version'; + +/** + * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. + * + * Note: * **AWS Lambda:** Use the (full) log stream name. + */ +export const SEMRESATTRS_FAAS_INSTANCE = (FAAS_DOT + + INSTANCE) as 'faas.instance'; + +/** + * The amount of memory available to the serverless function in MiB. + * + * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. + */ +export const SEMRESATTRS_FAAS_MAX_MEMORY = (FAAS_DOT + + 'max_memory') as 'faas.max_memory'; + +/** + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. + */ +export const SEMRESATTRS_HOST_ID = (HOST + DOT + ID) as 'host.id'; + +/** + * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. + */ +export const SEMRESATTRS_HOST_NAME = (HOST + DOT + NAME) as 'host.name'; + +/** + * Type of host. For Cloud, this must be the machine type. + */ +export const SEMRESATTRS_HOST_TYPE = (HOST + DOT + TYPE) as 'host.type'; + +/** + * The CPU architecture the host system is running on. + */ +export const SEMRESATTRS_HOST_ARCH = (HOST + DOT + 'arch') as 'host.arch'; + +/** + * Name of the VM image or OS install the host was instantiated from. + */ +export const SEMRESATTRS_HOST_IMAGE_NAME = (HOST + + DOT + + IMAGE_DOT + + NAME) as 'host.image.name'; + +/** + * VM image ID. For Cloud, this value is from the provider. + */ +export const SEMRESATTRS_HOST_IMAGE_ID = (HOST + + DOT + + IMAGE_DOT + + ID) as 'host.image.id'; + +/** + * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). + */ +export const SEMRESATTRS_HOST_IMAGE_VERSION = (HOST + + DOT + + IMAGE_DOT + + VERSION) as 'host.image.version'; + +/** + * The name of the cluster. + */ +export const SEMRESATTRS_K8S_CLUSTER_NAME = (K8S_DOT + + CLUSTER_DOT + + NAME) as 'k8s.cluster.name'; + +/** + * The name of the Node. + */ +export const SEMRESATTRS_K8S_NODE_NAME = (K8S_DOT + + NODE_DOT + + NAME) as 'k8s.node.name'; + +/** + * The UID of the Node. + */ +export const SEMRESATTRS_K8S_NODE_UID = (K8S_DOT + + NODE_DOT + + UID) as 'k8s.node.uid'; + +/** + * The name of the namespace that the pod is running in. + */ +export const SEMRESATTRS_K8S_NAMESPACE_NAME = (K8S_DOT + + NAME + + SPACE + + DOT + + NAME) as 'k8s.namespace.name'; + +/** + * The UID of the Pod. + */ +export const SEMRESATTRS_K8S_POD_UID = (K8S_DOT + 'pod.uid') as 'k8s.pod.uid'; + +/** + * The name of the Pod. + */ +export const SEMRESATTRS_K8S_POD_NAME = (K8S_DOT + + 'pod.name') as 'k8s.pod.name'; + +/** + * The name of the Container in a Pod template. + */ +export const SEMRESATTRS_K8S_CONTAINER_NAME = (K8S_DOT + + CONTAINER_DOT + + NAME) as 'k8s.container.name'; + +/** + * The UID of the ReplicaSet. + */ +export const SEMRESATTRS_K8S_REPLICASET_UID = (K8S_DOT + + REPLICA + + SET_DOT + + UID) as 'k8s.replicaset.uid'; + +/** + * The name of the ReplicaSet. + */ +export const SEMRESATTRS_K8S_REPLICASET_NAME = (K8S_DOT + + REPLICA + + SET_DOT + + NAME) as 'k8s.replicaset.name'; + +/** + * The UID of the Deployment. + */ +export const SEMRESATTRS_K8S_DEPLOYMENT_UID = (K8S_DOT + + DEPLOYMENT_DOT + + UID) as 'k8s.deployment.uid'; + +/** + * The name of the Deployment. + */ +export const SEMRESATTRS_K8S_DEPLOYMENT_NAME = (K8S_DOT + + DEPLOYMENT_DOT + + NAME) as 'k8s.deployment.name'; + +/** + * The UID of the StatefulSet. + */ +export const SEMRESATTRS_K8S_STATEFULSET_UID = (K8S_DOT + + STATEFUL + + SET_DOT + + UID) as 'k8s.statefulset.uid'; + +/** + * The name of the StatefulSet. + */ +export const SEMRESATTRS_K8S_STATEFULSET_NAME = (K8S_DOT + + STATEFUL + + SET_DOT + + NAME) as 'k8s.statefulset.name'; + +/** + * The UID of the DaemonSet. + */ +export const SEMRESATTRS_K8S_DAEMONSET_UID = (K8S_DOT + + DAEMON + + SET_DOT + + UID) as 'k8s.daemonset.uid'; + +/** + * The name of the DaemonSet. + */ +export const SEMRESATTRS_K8S_DAEMONSET_NAME = (K8S_DOT + + DAEMON + + SET_DOT + + NAME) as 'k8s.daemonset.name'; + +/** + * The UID of the Job. + */ +export const SEMRESATTRS_K8S_JOB_UID = (K8S_DOT + + JOB + + DOT + + UID) as 'k8s.job.uid'; + +/** + * The name of the Job. + */ +export const SEMRESATTRS_K8S_JOB_NAME = (K8S_DOT + + JOB + + DOT + + NAME) as 'k8s.job.name'; + +/** + * The UID of the CronJob. + */ +export const SEMRESATTRS_K8S_CRONJOB_UID = (K8S_DOT + + CRON + + JOB + + DOT + + UID) as 'k8s.cronjob.uid'; + +/** + * The name of the CronJob. + */ +export const SEMRESATTRS_K8S_CRONJOB_NAME = (K8S_DOT + + CRON + + JOB + + DOT + + NAME) as 'k8s.cronjob.name'; + +/** + * The operating system type. + */ +export const SEMRESATTRS_OS_TYPE = (OS_DOT + TYPE) as 'os.type'; + +/** + * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. + */ +export const SEMRESATTRS_OS_DESCRIPTION = (OS_DOT + + DESCRIPTION) as 'os.description'; + +/** + * Human readable operating system name. + */ +export const SEMRESATTRS_OS_NAME = (OS_DOT + NAME) as 'os.name'; + +/** + * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes). + */ +export const SEMRESATTRS_OS_VERSION = (OS_DOT + VERSION) as 'os.version'; + +/** + * Process identifier (PID). + */ +export const SEMRESATTRS_PROCESS_PID = (PROCESS_DOT + 'pid') as 'process.pid'; + +/** + * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. + */ +export const SEMRESATTRS_PROCESS_EXECUTABLE_NAME = (PROCESS_DOT + + EXECUTABLE_DOT + + NAME) as 'process.executable.name'; + +/** + * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. + */ +export const SEMRESATTRS_PROCESS_EXECUTABLE_PATH = (PROCESS_DOT + + EXECUTABLE_DOT + + 'path') as 'process.executable.path'; + +/** + * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. + */ +export const SEMRESATTRS_PROCESS_COMMAND = (PROCESS_DOT + + COMMAND) as 'process.command'; + +/** + * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. + */ +export const SEMRESATTRS_PROCESS_COMMAND_LINE = (PROCESS_DOT + + COMMAND + + UNDERSCORE + + 'line') as 'process.command_line'; + +/** + * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. + */ +export const SEMRESATTRS_PROCESS_COMMAND_ARGS = (PROCESS_DOT + + COMMAND + + UNDERSCORE + + 'args') as 'process.command_args'; + +/** + * The username of the user that owns the process. + */ +export const SEMRESATTRS_PROCESS_OWNER = (PROCESS_DOT + + 'owner') as 'process.owner'; + +/** + * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. + */ +export const SEMRESATTRS_PROCESS_RUNTIME_NAME = (PROCESS_DOT + + RUNTIME_DOT + + NAME) as 'process.runtime.name'; + +/** + * The version of the runtime of this process, as returned by the runtime without modification. + */ +export const SEMRESATTRS_PROCESS_RUNTIME_VERSION = (PROCESS_DOT + + RUNTIME_DOT + + VERSION) as 'process.runtime.version'; + +/** + * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. + */ +export const SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = (PROCESS_DOT + + RUNTIME_DOT + + DESCRIPTION) as 'process.runtime.description'; + +/** + * Logical name of the service. + * + * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. + */ +export const SEMRESATTRS_SERVICE_NAME = (SERVICE_DOT + NAME) as 'service.name'; + +/** + * A namespace for `service.name`. + * + * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. + */ +export const SEMRESATTRS_SERVICE_NAMESPACE = (SERVICE_DOT + + NAME + + SPACE) as 'service.namespace'; + +/** + * The string ID of the service instance. + * + * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). + */ +export const SEMRESATTRS_SERVICE_INSTANCE_ID = (SERVICE_DOT + + INSTANCE + + DOT + + ID) as 'service.instance.id'; + +/** + * The version string of the service API or implementation. + */ +export const SEMRESATTRS_SERVICE_VERSION = (SERVICE_DOT + + VERSION) as 'service.version'; + +/** + * The name of the telemetry SDK as defined above. + */ +export const SEMRESATTRS_TELEMETRY_SDK_NAME = (TELEMETRY_DOT + + SDK_DOT + + NAME) as 'telemetry.sdk.name'; + +/** + * The language of the telemetry SDK. + */ +export const SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = (TELEMETRY_DOT + + SDK_DOT + + 'language') as 'telemetry.sdk.language'; + +/** + * The version string of the telemetry SDK. + */ +export const SEMRESATTRS_TELEMETRY_SDK_VERSION = (TELEMETRY_DOT + + SDK_DOT + + VERSION) as 'telemetry.sdk.version'; + +/** + * The version string of the auto instrumentation agent, if used. + */ +export const SEMRESATTRS_TELEMETRY_AUTO_VERSION = (TELEMETRY_DOT + + 'auto.version') as 'telemetry.auto.version'; + +/** + * The name of the web engine. + */ +export const SEMRESATTRS_WEBENGINE_NAME = (WEBENGINE_DOT + + NAME) as 'webengine.name'; + +/** + * The version of the web engine. + */ +export const SEMRESATTRS_WEBENGINE_VERSION = (WEBENGINE_DOT + + VERSION) as 'webengine.version'; + +/** + * Additional description of the web engine (e.g. detailed version and edition information). + */ +export const SEMRESATTRS_WEBENGINE_DESCRIPTION = (WEBENGINE_DOT + + DESCRIPTION) as 'webengine.description'; + +/** + * Definition of available values for SemanticResourceAttributes + * This type is used for backward compatibility, you should use the individual exported + * constants SemanticResourceAttributes_XXXXX rather than the exported constant map. As any single reference + * to a constant map value will result in all strings being included into your bundle. + * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification. + */ +export type SemanticResourceAttributes = { /** * Name of the cloud provider. */ - CLOUD_PROVIDER: 'cloud.provider', + CLOUD_PROVIDER: 'cloud.provider'; /** * The cloud account ID the resource is assigned to. */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', + CLOUD_ACCOUNT_ID: 'cloud.account.id'; /** * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). */ - CLOUD_REGION: 'cloud.region', + CLOUD_REGION: 'cloud.region'; /** * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. * * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', + CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone'; /** * The cloud platform in use. * * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. */ - CLOUD_PLATFORM: 'cloud.platform', + CLOUD_PLATFORM: 'cloud.platform'; /** * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', + AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn'; /** * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', + AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn'; /** * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', + AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype'; /** * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', + AWS_ECS_TASK_ARN: 'aws.ecs.task.arn'; /** * The task definition family this task definition is a member of. */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', + AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family'; /** * The revision for this task definition. */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', + AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision'; /** * The ARN of an EKS cluster. */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', + AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn'; /** * The name(s) of the AWS log group(s) an application is writing to. * * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', + AWS_LOG_GROUP_NAMES: 'aws.log.group.names'; /** * The Amazon Resource Name(s) (ARN) of the AWS log group(s). * * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', + AWS_LOG_GROUP_ARNS: 'aws.log.group.arns'; /** * The name(s) of the AWS log stream(s) an application is writing to. */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', + AWS_LOG_STREAM_NAMES: 'aws.log.stream.names'; /** * The ARN(s) of the AWS log stream(s). * * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', + AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns'; /** * Container name. */ - CONTAINER_NAME: 'container.name', + CONTAINER_NAME: 'container.name'; /** * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. */ - CONTAINER_ID: 'container.id', + CONTAINER_ID: 'container.id'; /** * The container runtime managing this container. */ - CONTAINER_RUNTIME: 'container.runtime', + CONTAINER_RUNTIME: 'container.runtime'; /** * Name of the image the container was built on. */ - CONTAINER_IMAGE_NAME: 'container.image.name', + CONTAINER_IMAGE_NAME: 'container.image.name'; /** * Container image tag. */ - CONTAINER_IMAGE_TAG: 'container.image.tag', + CONTAINER_IMAGE_TAG: 'container.image.tag'; /** * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', + DEPLOYMENT_ENVIRONMENT: 'deployment.environment'; /** * A unique identifier representing the device. * * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. */ - DEVICE_ID: 'device.id', + DEVICE_ID: 'device.id'; /** * The model identifier for the device. * * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', + DEVICE_MODEL_IDENTIFIER: 'device.model.identifier'; /** * The marketing name for the device model. * * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. */ - DEVICE_MODEL_NAME: 'device.model.name', + DEVICE_MODEL_NAME: 'device.model.name'; /** * The name of the single function that this runtime instance executes. * * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). */ - FAAS_NAME: 'faas.name', + FAAS_NAME: 'faas.name'; /** * The unique ID of the single function that this runtime instance executes. @@ -182,7 +864,7 @@ part of the ARN is not available without calling another AWS API which may be deemed too slow for a short-running lambda function. As an alternative, consider setting `faas.id` as a span attribute instead. */ - FAAS_ID: 'faas.id', + FAAS_ID: 'faas.id'; /** * The immutable version of the function being executed. @@ -197,411 +879,968 @@ As an alternative, consider setting `faas.id` as a span attribute instead. [`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. */ - FAAS_VERSION: 'faas.version', + FAAS_VERSION: 'faas.version'; /** * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. * * Note: * **AWS Lambda:** Use the (full) log stream name. */ - FAAS_INSTANCE: 'faas.instance', + FAAS_INSTANCE: 'faas.instance'; /** * The amount of memory available to the serverless function in MiB. * * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. */ - FAAS_MAX_MEMORY: 'faas.max_memory', + FAAS_MAX_MEMORY: 'faas.max_memory'; /** * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. */ - HOST_ID: 'host.id', + HOST_ID: 'host.id'; /** * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. */ - HOST_NAME: 'host.name', + HOST_NAME: 'host.name'; /** * Type of host. For Cloud, this must be the machine type. */ - HOST_TYPE: 'host.type', + HOST_TYPE: 'host.type'; /** * The CPU architecture the host system is running on. */ - HOST_ARCH: 'host.arch', + HOST_ARCH: 'host.arch'; /** * Name of the VM image or OS install the host was instantiated from. */ - HOST_IMAGE_NAME: 'host.image.name', + HOST_IMAGE_NAME: 'host.image.name'; /** * VM image ID. For Cloud, this value is from the provider. */ - HOST_IMAGE_ID: 'host.image.id', + HOST_IMAGE_ID: 'host.image.id'; /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). + * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). */ - HOST_IMAGE_VERSION: 'host.image.version', + HOST_IMAGE_VERSION: 'host.image.version'; /** * The name of the cluster. */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', + K8S_CLUSTER_NAME: 'k8s.cluster.name'; /** * The name of the Node. */ - K8S_NODE_NAME: 'k8s.node.name', + K8S_NODE_NAME: 'k8s.node.name'; /** * The UID of the Node. */ - K8S_NODE_UID: 'k8s.node.uid', + K8S_NODE_UID: 'k8s.node.uid'; /** * The name of the namespace that the pod is running in. */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', + K8S_NAMESPACE_NAME: 'k8s.namespace.name'; /** * The UID of the Pod. */ - K8S_POD_UID: 'k8s.pod.uid', + K8S_POD_UID: 'k8s.pod.uid'; /** * The name of the Pod. */ - K8S_POD_NAME: 'k8s.pod.name', + K8S_POD_NAME: 'k8s.pod.name'; /** * The name of the Container in a Pod template. */ - K8S_CONTAINER_NAME: 'k8s.container.name', + K8S_CONTAINER_NAME: 'k8s.container.name'; /** * The UID of the ReplicaSet. */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', + K8S_REPLICASET_UID: 'k8s.replicaset.uid'; /** * The name of the ReplicaSet. */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', + K8S_REPLICASET_NAME: 'k8s.replicaset.name'; /** * The UID of the Deployment. */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', + K8S_DEPLOYMENT_UID: 'k8s.deployment.uid'; /** * The name of the Deployment. */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', + K8S_DEPLOYMENT_NAME: 'k8s.deployment.name'; /** * The UID of the StatefulSet. */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', + K8S_STATEFULSET_UID: 'k8s.statefulset.uid'; /** * The name of the StatefulSet. */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', + K8S_STATEFULSET_NAME: 'k8s.statefulset.name'; /** * The UID of the DaemonSet. */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', + K8S_DAEMONSET_UID: 'k8s.daemonset.uid'; /** * The name of the DaemonSet. */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', + K8S_DAEMONSET_NAME: 'k8s.daemonset.name'; /** * The UID of the Job. */ - K8S_JOB_UID: 'k8s.job.uid', + K8S_JOB_UID: 'k8s.job.uid'; /** * The name of the Job. */ - K8S_JOB_NAME: 'k8s.job.name', + K8S_JOB_NAME: 'k8s.job.name'; /** * The UID of the CronJob. */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', + K8S_CRONJOB_UID: 'k8s.cronjob.uid'; /** * The name of the CronJob. */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', + K8S_CRONJOB_NAME: 'k8s.cronjob.name'; /** * The operating system type. */ - OS_TYPE: 'os.type', + OS_TYPE: 'os.type'; /** * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. */ - OS_DESCRIPTION: 'os.description', + OS_DESCRIPTION: 'os.description'; /** * Human readable operating system name. */ - OS_NAME: 'os.name', + OS_NAME: 'os.name'; /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). + * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes). */ - OS_VERSION: 'os.version', + OS_VERSION: 'os.version'; /** * Process identifier (PID). */ - PROCESS_PID: 'process.pid', + PROCESS_PID: 'process.pid'; /** * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', + PROCESS_EXECUTABLE_NAME: 'process.executable.name'; /** * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', + PROCESS_EXECUTABLE_PATH: 'process.executable.path'; /** * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. */ - PROCESS_COMMAND: 'process.command', + PROCESS_COMMAND: 'process.command'; /** * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. */ - PROCESS_COMMAND_LINE: 'process.command_line', + PROCESS_COMMAND_LINE: 'process.command_line'; /** * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. */ - PROCESS_COMMAND_ARGS: 'process.command_args', + PROCESS_COMMAND_ARGS: 'process.command_args'; /** * The username of the user that owns the process. */ - PROCESS_OWNER: 'process.owner', + PROCESS_OWNER: 'process.owner'; /** * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', + PROCESS_RUNTIME_NAME: 'process.runtime.name'; /** * The version of the runtime of this process, as returned by the runtime without modification. */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', + PROCESS_RUNTIME_VERSION: 'process.runtime.version'; /** * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', + PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description'; /** * Logical name of the service. * * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. */ - SERVICE_NAME: 'service.name', + SERVICE_NAME: 'service.name'; /** * A namespace for `service.name`. * * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. */ - SERVICE_NAMESPACE: 'service.namespace', + SERVICE_NAMESPACE: 'service.namespace'; /** * The string ID of the service instance. * * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). */ - SERVICE_INSTANCE_ID: 'service.instance.id', + SERVICE_INSTANCE_ID: 'service.instance.id'; /** * The version string of the service API or implementation. */ - SERVICE_VERSION: 'service.version', + SERVICE_VERSION: 'service.version'; /** * The name of the telemetry SDK as defined above. */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', + TELEMETRY_SDK_NAME: 'telemetry.sdk.name'; /** * The language of the telemetry SDK. */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', + TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language'; /** * The version string of the telemetry SDK. */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', + TELEMETRY_SDK_VERSION: 'telemetry.sdk.version'; /** * The version string of the auto instrumentation agent, if used. */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', + TELEMETRY_AUTO_VERSION: 'telemetry.auto.version'; /** * The name of the web engine. */ - WEBENGINE_NAME: 'webengine.name', + WEBENGINE_NAME: 'webengine.name'; /** * The version of the web engine. */ - WEBENGINE_VERSION: 'webengine.version', + WEBENGINE_VERSION: 'webengine.version'; /** * Additional description of the web engine (e.g. detailed version and edition information). */ - WEBENGINE_DESCRIPTION: 'webengine.description', + WEBENGINE_DESCRIPTION: 'webengine.description'; }; -export const CloudProviderValues = { +/** + * Create exported Value Map for SemanticResourceAttributes values + * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification + */ +export const SemanticResourceAttributes: SemanticResourceAttributes = + createConstMap([ + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_ACCOUNT_ID, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_CLOUD_AVAILABILITY_ZONE, + SEMRESATTRS_CLOUD_PLATFORM, + SEMRESATTRS_AWS_ECS_CONTAINER_ARN, + SEMRESATTRS_AWS_ECS_CLUSTER_ARN, + SEMRESATTRS_AWS_ECS_LAUNCHTYPE, + SEMRESATTRS_AWS_ECS_TASK_ARN, + SEMRESATTRS_AWS_ECS_TASK_FAMILY, + SEMRESATTRS_AWS_ECS_TASK_REVISION, + SEMRESATTRS_AWS_EKS_CLUSTER_ARN, + SEMRESATTRS_AWS_LOG_GROUP_NAMES, + SEMRESATTRS_AWS_LOG_GROUP_ARNS, + SEMRESATTRS_AWS_LOG_STREAM_NAMES, + SEMRESATTRS_AWS_LOG_STREAM_ARNS, + SEMRESATTRS_CONTAINER_NAME, + SEMRESATTRS_CONTAINER_ID, + SEMRESATTRS_CONTAINER_RUNTIME, + SEMRESATTRS_CONTAINER_IMAGE_NAME, + SEMRESATTRS_CONTAINER_IMAGE_TAG, + SEMRESATTRS_DEPLOYMENT_ENVIRONMENT, + SEMRESATTRS_DEVICE_ID, + SEMRESATTRS_DEVICE_MODEL_IDENTIFIER, + SEMRESATTRS_DEVICE_MODEL_NAME, + SEMRESATTRS_FAAS_NAME, + SEMRESATTRS_FAAS_ID, + SEMRESATTRS_FAAS_VERSION, + SEMRESATTRS_FAAS_INSTANCE, + SEMRESATTRS_FAAS_MAX_MEMORY, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_HOST_NAME, + SEMRESATTRS_HOST_TYPE, + SEMRESATTRS_HOST_ARCH, + SEMRESATTRS_HOST_IMAGE_NAME, + SEMRESATTRS_HOST_IMAGE_ID, + SEMRESATTRS_HOST_IMAGE_VERSION, + SEMRESATTRS_K8S_CLUSTER_NAME, + SEMRESATTRS_K8S_NODE_NAME, + SEMRESATTRS_K8S_NODE_UID, + SEMRESATTRS_K8S_NAMESPACE_NAME, + SEMRESATTRS_K8S_POD_UID, + SEMRESATTRS_K8S_POD_NAME, + SEMRESATTRS_K8S_CONTAINER_NAME, + SEMRESATTRS_K8S_REPLICASET_UID, + SEMRESATTRS_K8S_REPLICASET_NAME, + SEMRESATTRS_K8S_DEPLOYMENT_UID, + SEMRESATTRS_K8S_DEPLOYMENT_NAME, + SEMRESATTRS_K8S_STATEFULSET_UID, + SEMRESATTRS_K8S_STATEFULSET_NAME, + SEMRESATTRS_K8S_DAEMONSET_UID, + SEMRESATTRS_K8S_DAEMONSET_NAME, + SEMRESATTRS_K8S_JOB_UID, + SEMRESATTRS_K8S_JOB_NAME, + SEMRESATTRS_K8S_CRONJOB_UID, + SEMRESATTRS_K8S_CRONJOB_NAME, + SEMRESATTRS_OS_TYPE, + SEMRESATTRS_OS_DESCRIPTION, + SEMRESATTRS_OS_NAME, + SEMRESATTRS_OS_VERSION, + SEMRESATTRS_PROCESS_PID, + SEMRESATTRS_PROCESS_EXECUTABLE_NAME, + SEMRESATTRS_PROCESS_EXECUTABLE_PATH, + SEMRESATTRS_PROCESS_COMMAND, + SEMRESATTRS_PROCESS_COMMAND_LINE, + SEMRESATTRS_PROCESS_COMMAND_ARGS, + SEMRESATTRS_PROCESS_OWNER, + SEMRESATTRS_PROCESS_RUNTIME_NAME, + SEMRESATTRS_PROCESS_RUNTIME_VERSION, + SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION, + SEMRESATTRS_SERVICE_NAME, + SEMRESATTRS_SERVICE_NAMESPACE, + SEMRESATTRS_SERVICE_INSTANCE_ID, + SEMRESATTRS_SERVICE_VERSION, + SEMRESATTRS_TELEMETRY_SDK_NAME, + SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, + SEMRESATTRS_TELEMETRY_SDK_VERSION, + SEMRESATTRS_TELEMETRY_AUTO_VERSION, + SEMRESATTRS_WEBENGINE_NAME, + SEMRESATTRS_WEBENGINE_VERSION, + SEMRESATTRS_WEBENGINE_DESCRIPTION, + ]); + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for CloudProviderValues enum definition + * + * Name of the cloud provider. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Name of the cloud provider. + */ +export const CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; + +/** + * Name of the cloud provider. + */ +export const CLOUDPROVIDERVALUES_AWS = AWS as 'aws'; + +/** + * Name of the cloud provider. + */ +export const CLOUDPROVIDERVALUES_AZURE = AZURE as 'azure'; + +/** + * Name of the cloud provider. + */ +export const CLOUDPROVIDERVALUES_GCP = 'gcp'; + +/** + * Identifies the Values for CloudProviderValues enum definition + * + * Name of the cloud provider. + * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification. + */ +export type CloudProviderValues = { /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', + ALIBABA_CLOUD: 'alibaba_cloud'; /** Amazon Web Services. */ - AWS: 'aws', + AWS: 'aws'; /** Microsoft Azure. */ - AZURE: 'azure', + AZURE: 'azure'; /** Google Cloud Platform. */ - GCP: 'gcp', -} as const; -export type CloudProviderValues = - (typeof CloudProviderValues)[keyof typeof CloudProviderValues]; + GCP: 'gcp'; +}; + +/** + * The constant map of values for CloudProviderValues. + * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification. + */ +export const CloudProviderValues: CloudProviderValues = { + ALIBABA_CLOUD: CLOUDPROVIDERVALUES_ALIBABA_CLOUD, + AWS: CLOUDPROVIDERVALUES_AWS, + AZURE: CLOUDPROVIDERVALUES_AZURE, + GCP: CLOUDPROVIDERVALUES_GCP, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for CloudPlatformValues enum definition + * + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AWS_EC2 = (AWS + + UNDERSCORE + + 'ec2') as 'aws_ec2'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AWS_ECS = (AWS + + UNDERSCORE + + 'ecs') as 'aws_ecs'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AWS_EKS = (AWS + + UNDERSCORE + + 'eks') as 'aws_eks'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AWS_LAMBDA = (AWS + + UNDERSCORE + + 'lambda') as 'aws_lambda'; -export const CloudPlatformValues = { +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = (AWS + + UNDERSCORE + + 'elastic_beanstalk') as 'aws_elastic_beanstalk'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AZURE_VM = (AZURE + + UNDERSCORE + + 'vm') as 'azure_vm'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = (AZURE + + UNDERSCORE + + 'container_instances') as 'azure_container_instances'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AZURE_AKS = (AZURE + + UNDERSCORE + + 'aks') as 'azure_aks'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = (AZURE + + UNDERSCORE + + 'functions') as 'azure_functions'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = (AZURE + + UNDERSCORE + + 'app_service') as 'azure_app_service'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = + 'gcp_kubernetes_engine'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions'; + +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +export const CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine'; + +/** + * Identifies the Values for CloudPlatformValues enum definition + * + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification. + */ +export type CloudPlatformValues = { /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', + ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs'; /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', + ALIBABA_CLOUD_FC: 'alibaba_cloud_fc'; /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', + AWS_EC2: 'aws_ec2'; /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', + AWS_ECS: 'aws_ecs'; /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', + AWS_EKS: 'aws_eks'; /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', + AWS_LAMBDA: 'aws_lambda'; /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', + AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk'; /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', + AZURE_VM: 'azure_vm'; /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', + AZURE_CONTAINER_INSTANCES: 'azure_container_instances'; /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', + AZURE_AKS: 'azure_aks'; /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', + AZURE_FUNCTIONS: 'azure_functions'; /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', + AZURE_APP_SERVICE: 'azure_app_service'; /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', + GCP_COMPUTE_ENGINE: 'gcp_compute_engine'; /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', + GCP_CLOUD_RUN: 'gcp_cloud_run'; /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', + GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine'; /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', + GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions'; /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -} as const; -export type CloudPlatformValues = - (typeof CloudPlatformValues)[keyof typeof CloudPlatformValues]; + GCP_APP_ENGINE: 'gcp_app_engine'; +}; + +/** + * The constant map of values for CloudPlatformValues. + * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification. + */ +export const CloudPlatformValues: CloudPlatformValues = { + ALIBABA_CLOUD_ECS: CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS, + ALIBABA_CLOUD_FC: CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC, + AWS_EC2: CLOUDPLATFORMVALUES_AWS_EC2, + AWS_ECS: CLOUDPLATFORMVALUES_AWS_ECS, + AWS_EKS: CLOUDPLATFORMVALUES_AWS_EKS, + AWS_LAMBDA: CLOUDPLATFORMVALUES_AWS_LAMBDA, + AWS_ELASTIC_BEANSTALK: CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK, + AZURE_VM: CLOUDPLATFORMVALUES_AZURE_VM, + AZURE_CONTAINER_INSTANCES: CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES, + AZURE_AKS: CLOUDPLATFORMVALUES_AZURE_AKS, + AZURE_FUNCTIONS: CLOUDPLATFORMVALUES_AZURE_FUNCTIONS, + AZURE_APP_SERVICE: CLOUDPLATFORMVALUES_AZURE_APP_SERVICE, + GCP_COMPUTE_ENGINE: CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE, + GCP_CLOUD_RUN: CLOUDPLATFORMVALUES_GCP_CLOUD_RUN, + GCP_KUBERNETES_ENGINE: CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE, + GCP_CLOUD_FUNCTIONS: CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS, + GCP_APP_ENGINE: CLOUDPLATFORMVALUES_GCP_APP_ENGINE, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for AwsEcsLaunchtypeValues enum definition + * + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +export const AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2'; -export const AwsEcsLaunchtypeValues = { +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +export const AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate'; + +/** + * Identifies the Values for AwsEcsLaunchtypeValues enum definition + * + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification. + */ +export type AwsEcsLaunchtypeValues = { /** ec2. */ - EC2: 'ec2', + EC2: 'ec2'; /** fargate. */ - FARGATE: 'fargate', -} as const; -export type AwsEcsLaunchtypeValues = - (typeof AwsEcsLaunchtypeValues)[keyof typeof AwsEcsLaunchtypeValues]; + FARGATE: 'fargate'; +}; + +/** + * The constant map of values for AwsEcsLaunchtypeValues. + * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification. + */ +export const AwsEcsLaunchtypeValues: AwsEcsLaunchtypeValues = { + EC2: AWSECSLAUNCHTYPEVALUES_EC2, + FARGATE: AWSECSLAUNCHTYPEVALUES_FARGATE, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for HostArchValues enum definition + * + * The CPU architecture the host system is running on. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_AMD64 = 'amd64'; + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_ARM32 = 'arm32'; + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_ARM64 = 'arm64'; + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_IA64 = 'ia64'; + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_PPC32 = 'ppc32'; + +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_PPC64 = 'ppc64'; -export const HostArchValues = { +/** + * The CPU architecture the host system is running on. + */ +export const HOSTARCHVALUES_X86 = 'x86'; + +/** + * Identifies the Values for HostArchValues enum definition + * + * The CPU architecture the host system is running on. + * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification. + */ +export type HostArchValues = { /** AMD64. */ - AMD64: 'amd64', + AMD64: 'amd64'; /** ARM32. */ - ARM32: 'arm32', + ARM32: 'arm32'; /** ARM64. */ - ARM64: 'arm64', + ARM64: 'arm64'; /** Itanium. */ - IA64: 'ia64', + IA64: 'ia64'; /** 32-bit PowerPC. */ - PPC32: 'ppc32', + PPC32: 'ppc32'; /** 64-bit PowerPC. */ - PPC64: 'ppc64', + PPC64: 'ppc64'; /** 32-bit x86. */ - X86: 'x86', -} as const; -export type HostArchValues = - (typeof HostArchValues)[keyof typeof HostArchValues]; + X86: 'x86'; +}; + +/** + * The constant map of values for HostArchValues. + * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification. + */ +export const HostArchValues: HostArchValues = { + AMD64: HOSTARCHVALUES_AMD64, + ARM32: HOSTARCHVALUES_ARM32, + ARM64: HOSTARCHVALUES_ARM64, + IA64: HOSTARCHVALUES_IA64, + PPC32: HOSTARCHVALUES_PPC32, + PPC64: HOSTARCHVALUES_PPC64, + X86: HOSTARCHVALUES_X86, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for OsTypeValues enum definition + * + * The operating system type. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The operating system type. + */ +export const OSTYPEVALUES_WINDOWS = 'windows'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_LINUX = 'linux'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_DARWIN = 'darwin'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_FREEBSD = 'freebsd'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_NETBSD = 'netbsd'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_OPENBSD = 'openbsd'; -export const OsTypeValues = { +/** + * The operating system type. + */ +export const OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_HPUX = 'hpux'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_AIX = 'aix'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_SOLARIS = 'solaris'; + +/** + * The operating system type. + */ +export const OSTYPEVALUES_Z_OS = 'z_os'; + +/** + * Identifies the Values for OsTypeValues enum definition + * + * The operating system type. + * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification. + */ +export type OsTypeValues = { /** Microsoft Windows. */ - WINDOWS: 'windows', + WINDOWS: 'windows'; /** Linux. */ - LINUX: 'linux', + LINUX: 'linux'; /** Apple Darwin. */ - DARWIN: 'darwin', + DARWIN: 'darwin'; /** FreeBSD. */ - FREEBSD: 'freebsd', + FREEBSD: 'freebsd'; /** NetBSD. */ - NETBSD: 'netbsd', + NETBSD: 'netbsd'; /** OpenBSD. */ - OPENBSD: 'openbsd', + OPENBSD: 'openbsd'; /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', + DRAGONFLYBSD: 'dragonflybsd'; /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', + HPUX: 'hpux'; /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', + AIX: 'aix'; /** Oracle Solaris. */ - SOLARIS: 'solaris', + SOLARIS: 'solaris'; /** IBM z/OS. */ - Z_OS: 'z_os', -} as const; -export type OsTypeValues = (typeof OsTypeValues)[keyof typeof OsTypeValues]; + Z_OS: 'z_os'; +}; + +/** + * The constant map of values for OsTypeValues. + * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification. + */ +export const OsTypeValues: OsTypeValues = { + WINDOWS: OSTYPEVALUES_WINDOWS, + LINUX: OSTYPEVALUES_LINUX, + DARWIN: OSTYPEVALUES_DARWIN, + FREEBSD: OSTYPEVALUES_FREEBSD, + NETBSD: OSTYPEVALUES_NETBSD, + OPENBSD: OSTYPEVALUES_OPENBSD, + DRAGONFLYBSD: OSTYPEVALUES_DRAGONFLYBSD, + HPUX: OSTYPEVALUES_HPUX, + AIX: OSTYPEVALUES_AIX, + SOLARIS: OSTYPEVALUES_SOLARIS, + Z_OS: OSTYPEVALUES_Z_OS, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for TelemetrySdkLanguageValues enum definition + * + * The language of the telemetry SDK. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet'; -export const TelemetrySdkLanguageValues = { +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_GO = 'go'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_PHP = 'php'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby'; + +/** + * The language of the telemetry SDK. + */ +export const TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs'; + +/** + * Identifies the Values for TelemetrySdkLanguageValues enum definition + * + * The language of the telemetry SDK. + * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification. + */ +export type TelemetrySdkLanguageValues = { /** cpp. */ - CPP: 'cpp', + CPP: 'cpp'; /** dotnet. */ - DOTNET: 'dotnet', + DOTNET: 'dotnet'; /** erlang. */ - ERLANG: 'erlang', + ERLANG: 'erlang'; /** go. */ - GO: 'go', + GO: 'go'; /** java. */ - JAVA: 'java', + JAVA: 'java'; /** nodejs. */ - NODEJS: 'nodejs', + NODEJS: 'nodejs'; /** php. */ - PHP: 'php', + PHP: 'php'; /** python. */ - PYTHON: 'python', + PYTHON: 'python'; /** ruby. */ - RUBY: 'ruby', + RUBY: 'ruby'; /** webjs. */ - WEBJS: 'webjs', -} as const; -export type TelemetrySdkLanguageValues = - (typeof TelemetrySdkLanguageValues)[keyof typeof TelemetrySdkLanguageValues]; + WEBJS: 'webjs'; +}; + +/** + * The constant map of values for TelemetrySdkLanguageValues. + * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification. + */ +export const TelemetrySdkLanguageValues: TelemetrySdkLanguageValues = { + CPP: TELEMETRYSDKLANGUAGEVALUES_CPP, + DOTNET: TELEMETRYSDKLANGUAGEVALUES_DOTNET, + ERLANG: TELEMETRYSDKLANGUAGEVALUES_ERLANG, + GO: TELEMETRYSDKLANGUAGEVALUES_GO, + JAVA: TELEMETRYSDKLANGUAGEVALUES_JAVA, + NODEJS: TELEMETRYSDKLANGUAGEVALUES_NODEJS, + PHP: TELEMETRYSDKLANGUAGEVALUES_PHP, + PYTHON: TELEMETRYSDKLANGUAGEVALUES_PYTHON, + RUBY: TELEMETRYSDKLANGUAGEVALUES_RUBY, + WEBJS: TELEMETRYSDKLANGUAGEVALUES_WEBJS, +}; diff --git a/packages/opentelemetry-semantic-conventions/src/trace/SemanticAttributes.ts b/packages/opentelemetry-semantic-conventions/src/trace/SemanticAttributes.ts index 6d12b0f89a4..10aef021385 100644 --- a/packages/opentelemetry-semantic-conventions/src/trace/SemanticAttributes.ts +++ b/packages/opentelemetry-semantic-conventions/src/trace/SemanticAttributes.ts @@ -14,142 +14,1198 @@ * limitations under the License. */ +import { createConstMap } from '../internal/utils'; +import { + DOT, + UNDERSCORE, + DB_DOT, + CARRIER_DOT, + CASSANDRA_DOT, + CODE_DOT, + COORDINATOR_DOT, + DOCUMENT_DOT, + DYNAMODB_DOT, + ENDUSER_DOT, + EXCEPTION_DOT, + FAAS_DOT, + HTTP_DOT, + JSONRPC_DOT, + KAFKA_DOT, + LAMBDA_DOT, + MESSAGING_DOT, + MONGODB_DOT, + MSSQL_DOT, + NET_DOT, + PEER_DOT, + RPC_DOT, + THREAD_DOT, + AWS, + AZURE, + CONTENT, + COLLECTION, + COMPRESSED, + CONNECTION, + GLOBAL, + HOST, + ID, + INDEX, + INSTANCE, + INVOKED, + LENGTH, + LOCAL, + MESSAGE, + NAME, + PORT, + PROTOCOL, + PROVISIONED, + READ, + REQUEST, + RESPONSE, + SECONDARY, + SPACE, + TYPE, + UN, + VERSION, + WRITE, +} from '../internal/constants'; + +//---------------------------------------------------------------------------------------------------------- // DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -export const SemanticAttributes = { +//---------------------------------------------------------------------------------------------------------- + +//---------------------------------------------------------------------------------------------------------- +// Constant values for SemanticAttributes +//---------------------------------------------------------------------------------------------------------- + +/** + * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). + * + * Note: This may be different from `faas.id` if an alias is involved. + */ +export const SEMATTRS_AWS_LAMBDA_INVOKED_ARN = (AWS + + DOT + + LAMBDA_DOT + + INVOKED + + UNDERSCORE + + 'arn') as 'aws.lambda.invoked_arn'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const SEMATTRS_DB_SYSTEM = (DB_DOT + 'system') as 'db.system'; + +/** + * The connection string used to connect to the database. It is recommended to remove embedded credentials. + */ +export const SEMATTRS_DB_CONNECTION_STRING = (DB_DOT + + CONNECTION + + UNDERSCORE + + 'string') as 'db.connection_string'; + +/** + * Username for accessing the database. + */ +export const SEMATTRS_DB_USER = (DB_DOT + 'user') as 'db.user'; + +/** + * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. + */ +export const SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = (DB_DOT + + 'jdbc.driver_classname') as 'db.jdbc.driver_classname'; + +/** + * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). + * + * Note: In some SQL databases, the database name to be used is called "schema name". + */ +export const SEMATTRS_DB_NAME = (DB_DOT + NAME) as 'db.name'; + +/** + * The database statement being executed. + * + * Note: The value may be sanitized to exclude sensitive information. + */ +export const SEMATTRS_DB_STATEMENT = (DB_DOT + 'statement') as 'db.statement'; + +/** + * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. + * + * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. + */ +export const SEMATTRS_DB_OPERATION = (DB_DOT + 'operation') as 'db.operation'; + +/** + * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. + * + * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). + */ +export const SEMATTRS_DB_MSSQL_INSTANCE_NAME = (DB_DOT + + MSSQL_DOT + + INSTANCE + + UNDERSCORE + + NAME) as 'db.mssql.instance_name'; + +/** + * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. + */ +export const SEMATTRS_DB_CASSANDRA_KEYSPACE = (DB_DOT + + CASSANDRA_DOT + + 'keyspace') as 'db.cassandra.keyspace'; + +/** + * The fetch size used for paging, i.e. how many rows will be returned at once. + */ +export const SEMATTRS_DB_CASSANDRA_PAGE_SIZE = (DB_DOT + + CASSANDRA_DOT + + 'page_size') as 'db.cassandra.page_size'; + +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +export const SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = (DB_DOT + + CASSANDRA_DOT + + 'consistency_level') as 'db.cassandra.consistency_level'; + +/** + * The name of the primary table that the operation is acting upon, including the schema name (if applicable). + * + * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. + */ +export const SEMATTRS_DB_CASSANDRA_TABLE = (DB_DOT + + CASSANDRA_DOT + + 'table') as 'db.cassandra.table'; + +/** + * Whether or not the query is idempotent. + */ +export const SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = (DB_DOT + + CASSANDRA_DOT + + ID + + 'empotence') as 'db.cassandra.idempotence'; + +/** + * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. + */ +export const SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = (DB_DOT + + CASSANDRA_DOT + + 'speculative_execution_count') as 'db.cassandra.speculative_execution_count'; + +/** + * The ID of the coordinating node for a query. + */ +export const SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = (DB_DOT + + CASSANDRA_DOT + + COORDINATOR_DOT + + ID) as 'db.cassandra.coordinator.id'; + +/** + * The data center of the coordinating node for a query. + */ +export const SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = (DB_DOT + + CASSANDRA_DOT + + COORDINATOR_DOT + + 'dc') as 'db.cassandra.coordinator.dc'; + +/** + * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. + */ +export const SEMATTRS_DB_HBASE_NAMESPACE = (DB_DOT + + 'hbase.namespace') as 'db.hbase.namespace'; + +/** + * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. + */ +export const SEMATTRS_DB_REDIS_DATABASE_INDEX = (DB_DOT + + 'redis.database_index') as 'db.redis.database_index'; + +/** + * The collection being accessed within the database stated in `db.name`. + */ +export const SEMATTRS_DB_MONGODB_COLLECTION = (DB_DOT + + MONGODB_DOT + + COLLECTION) as 'db.mongodb.collection'; + +/** + * The name of the primary table that the operation is acting upon, including the schema name (if applicable). + * + * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. + */ +export const SEMATTRS_DB_SQL_TABLE = (DB_DOT + 'sql.table') as 'db.sql.table'; + +/** + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. + */ +export const SEMATTRS_EXCEPTION_TYPE = (EXCEPTION_DOT + + TYPE) as 'exception.type'; + +/** + * The exception message. + */ +export const SEMATTRS_EXCEPTION_MESSAGE = (EXCEPTION_DOT + + MESSAGE) as 'exception.message'; + +/** + * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. + */ +export const SEMATTRS_EXCEPTION_STACKTRACE = (EXCEPTION_DOT + + 'stacktrace') as 'exception.stacktrace'; + +/** +* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. +* +* Note: An exception is considered to have escaped (or left) the scope of a span, +if that span is ended while the exception is still logically "in flight". +This may be actually "in flight" in some languages (e.g. if the exception +is passed to a Context manager's `__exit__` method in Python) but will +usually be caught at the point of recording the exception in most languages. + +It is usually not possible to determine at the point where an exception is thrown +whether it will escape the scope of a span. +However, it is trivial to know that an exception +will escape, if one checks for an active exception just before ending the span, +as done in the [example above](#exception-end-example). + +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. +*/ +export const SEMATTRS_EXCEPTION_ESCAPED = (EXCEPTION_DOT + + 'escaped') as 'exception.escaped'; + +/** + * Type of the trigger on which the function is executed. + */ +export const SEMATTRS_FAAS_TRIGGER = (FAAS_DOT + 'trigger') as 'faas.trigger'; + +/** + * The execution ID of the current function execution. + */ +export const SEMATTRS_FAAS_EXECUTION = (FAAS_DOT + + 'execution') as 'faas.execution'; + +/** + * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. + */ +export const SEMATTRS_FAAS_DOCUMENT_COLLECTION = (FAAS_DOT + + DOCUMENT_DOT + + COLLECTION) as 'faas.document.collection'; + +/** + * Describes the type of the operation that was performed on the data. + */ +export const SEMATTRS_FAAS_DOCUMENT_OPERATION = (FAAS_DOT + + DOCUMENT_DOT + + 'operation') as 'faas.document.operation'; + +/** + * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + */ +export const SEMATTRS_FAAS_DOCUMENT_TIME = (FAAS_DOT + + DOCUMENT_DOT + + 'time') as 'faas.document.time'; + +/** + * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. + */ +export const SEMATTRS_FAAS_DOCUMENT_NAME = (FAAS_DOT + + DOCUMENT_DOT + + NAME) as 'faas.document.name'; + +/** + * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + */ +export const SEMATTRS_FAAS_TIME = (FAAS_DOT + 'time') as 'faas.time'; + +/** + * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + */ +export const SEMATTRS_FAAS_CRON = (FAAS_DOT + 'cron') as 'faas.cron'; + +/** + * A boolean that is true if the serverless function is executed for the first time (aka cold-start). + */ +export const SEMATTRS_FAAS_COLDSTART = (FAAS_DOT + + 'coldstart') as 'faas.coldstart'; + +/** + * The name of the invoked function. + * + * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. + */ +export const SEMATTRS_FAAS_INVOKED_NAME = (FAAS_DOT + + INVOKED + + UNDERSCORE + + NAME) as 'faas.invoked_name'; + +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +export const SEMATTRS_FAAS_INVOKED_PROVIDER = (FAAS_DOT + + INVOKED + + UNDERSCORE + + 'provider') as 'faas.invoked_provider'; + +/** + * The cloud region of the invoked function. + * + * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. + */ +export const SEMATTRS_FAAS_INVOKED_REGION = (FAAS_DOT + + INVOKED + + UNDERSCORE + + 'region') as 'faas.invoked_region'; + +/** + * Transport protocol used. See note below. + */ +export const SEMATTRS_NET_TRANSPORT = (NET_DOT + + 'transport') as 'net.transport'; + +/** + * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). + */ +export const SEMATTRS_NET_PEER_IP = (NET_DOT + + PEER_DOT + + 'ip') as 'net.peer.ip'; + +/** + * Remote port number. + */ +export const SEMATTRS_NET_PEER_PORT = (NET_DOT + + PEER_DOT + + PORT) as 'net.peer.port'; + +/** + * Remote hostname or similar, see note below. + */ +export const SEMATTRS_NET_PEER_NAME = (NET_DOT + + PEER_DOT + + NAME) as 'net.peer.name'; + +/** + * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. + */ +export const SEMATTRS_NET_HOST_IP = (NET_DOT + + HOST + + DOT + + 'ip') as 'net.host.ip'; + +/** + * Like `net.peer.port` but for the host port. + */ +export const SEMATTRS_NET_HOST_PORT = (NET_DOT + + HOST + + DOT + + PORT) as 'net.host.port'; + +/** + * Local hostname or similar, see note below. + */ +export const SEMATTRS_NET_HOST_NAME = (NET_DOT + + HOST + + DOT + + NAME) as 'net.host.name'; + +/** + * The internet connection type currently being used by the host. + */ +export const SEMATTRS_NET_HOST_CONNECTION_TYPE = (NET_DOT + + HOST + + DOT + + CONNECTION + + DOT + + TYPE) as 'net.host.connection.type'; + +/** + * 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. + */ +export const SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = (NET_DOT + + HOST + + DOT + + CONNECTION + + DOT + + 'subtype') as 'net.host.connection.subtype'; + +/** + * The name of the mobile carrier. + */ +export const SEMATTRS_NET_HOST_CARRIER_NAME = (NET_DOT + + HOST + + DOT + + CARRIER_DOT + + NAME) as 'net.host.carrier.name'; + +/** + * The mobile carrier country code. + */ +export const SEMATTRS_NET_HOST_CARRIER_MCC = (NET_DOT + + HOST + + DOT + + CARRIER_DOT + + 'mcc') as 'net.host.carrier.mcc'; + +/** + * The mobile carrier network code. + */ +export const SEMATTRS_NET_HOST_CARRIER_MNC = (NET_DOT + + HOST + + DOT + + CARRIER_DOT + + 'mnc') as 'net.host.carrier.mnc'; + +/** + * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. + */ +export const SEMATTRS_NET_HOST_CARRIER_ICC = (NET_DOT + + HOST + + DOT + + CARRIER_DOT + + 'icc') as 'net.host.carrier.icc'; + +/** + * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. + */ +export const SEMATTRS_PEER_SERVICE = (PEER_DOT + 'service') as 'peer.service'; + +/** + * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. + */ +export const SEMATTRS_ENDUSER_ID = (ENDUSER_DOT + ID) as 'enduser.id'; + +/** + * Actual/assumed role the client is making the request under extracted from token or application security context. + */ +export const SEMATTRS_ENDUSER_ROLE = (ENDUSER_DOT + 'role') as 'enduser.role'; + +/** + * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + */ +export const SEMATTRS_ENDUSER_SCOPE = (ENDUSER_DOT + + 'scope') as 'enduser.scope'; + +/** + * Current "managed" thread ID (as opposed to OS thread ID). + */ +export const SEMATTRS_THREAD_ID = (THREAD_DOT + ID) as 'thread.id'; + +/** + * Current thread name. + */ +export const SEMATTRS_THREAD_NAME = (THREAD_DOT + NAME) as 'thread.name'; + +/** + * The method or function name, or equivalent (usually rightmost part of the code unit's name). + */ +export const SEMATTRS_CODE_FUNCTION = (CODE_DOT + + 'function') as 'code.function'; + +/** + * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. + */ +export const SEMATTRS_CODE_NAMESPACE = (CODE_DOT + + NAME + + SPACE) as 'code.namespace'; + +/** + * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). + */ +export const SEMATTRS_CODE_FILEPATH = (CODE_DOT + + 'filepath') as 'code.filepath'; + +/** + * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. + */ +export const SEMATTRS_CODE_LINENO = (CODE_DOT + 'lineno') as 'code.lineno'; + +/** + * HTTP request method. + */ +export const SEMATTRS_HTTP_METHOD = (HTTP_DOT + 'method') as 'http.method'; + +/** + * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. + * + * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. + */ +export const SEMATTRS_HTTP_URL = (HTTP_DOT + 'url') as 'http.url'; + +/** + * The full request target as passed in a HTTP request line or equivalent. + */ +export const SEMATTRS_HTTP_TARGET = (HTTP_DOT + 'target') as 'http.target'; + +/** + * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. + * + * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. + */ +export const SEMATTRS_HTTP_HOST = (HTTP_DOT + HOST) as 'http.host'; + +/** + * The URI scheme identifying the used protocol. + */ +export const SEMATTRS_HTTP_SCHEME = (HTTP_DOT + 'scheme') as 'http.scheme'; + +/** + * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + */ +export const SEMATTRS_HTTP_STATUS_CODE = (HTTP_DOT + + 'status_code') as 'http.status_code'; + +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const SEMATTRS_HTTP_FLAVOR = (HTTP_DOT + 'flavor') as 'http.flavor'; + +/** + * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. + */ +export const SEMATTRS_HTTP_USER_AGENT = (HTTP_DOT + + 'user_agent') as 'http.user_agent'; + +/** + * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. + */ +export const SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = (HTTP_DOT + + REQUEST + + UNDERSCORE + + CONTENT + + UNDERSCORE + + LENGTH) as 'http.request_content_length'; + +/** + * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. + */ +export const SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = (HTTP_DOT + + REQUEST + + UNDERSCORE + + CONTENT + + UNDERSCORE + + LENGTH + + UNDERSCORE + + UN + + COMPRESSED) as 'http.request_content_length_uncompressed'; + +/** + * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. + */ +export const SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = (HTTP_DOT + + RESPONSE + + UNDERSCORE + + CONTENT + + UNDERSCORE + + LENGTH) as 'http.response_content_length'; + +/** + * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. + */ +export const SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = (HTTP_DOT + + RESPONSE + + UNDERSCORE + + CONTENT + + UNDERSCORE + + LENGTH + + UNDERSCORE + + UN + + COMPRESSED) as 'http.response_content_length_uncompressed'; + +/** + * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). + * + * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. + */ +export const SEMATTRS_HTTP_SERVER_NAME = (HTTP_DOT + + 'server_name') as 'http.server_name'; + +/** + * The matched route (path template). + */ +export const SEMATTRS_HTTP_ROUTE = (HTTP_DOT + 'route') as 'http.route'; + +/** +* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). +* +* Note: This is not necessarily the same as `net.peer.ip`, which would +identify the network-level peer, which may be a proxy. + +This attribute should be set when a source of information different +from the one used for `net.peer.ip`, is available even if that other +source just confirms the same value as `net.peer.ip`. +Rationale: For `net.peer.ip`, one typically does not know if it +comes from a proxy, reverse proxy, or the actual client. Setting +`http.client_ip` when it's the same as `net.peer.ip` means that +one is at least somewhat confident that the address is not that of +the closest proxy. +*/ +export const SEMATTRS_HTTP_CLIENT_IP = (HTTP_DOT + + 'client_ip') as 'http.client_ip'; + +/** + * The keys in the `RequestItems` object field. + */ +export const SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = (AWS + + DOT + + DYNAMODB_DOT + + 'table_names') as 'aws.dynamodb.table_names'; + +/** + * The JSON-serialized value of each item in the `ConsumedCapacity` response field. + */ +export const SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = (AWS + + DOT + + DYNAMODB_DOT + + 'consumed_capacity') as 'aws.dynamodb.consumed_capacity'; + +/** + * The JSON-serialized value of the `ItemCollectionMetrics` response field. + */ +export const SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = (AWS + + DOT + + DYNAMODB_DOT + + 'item_collection_metrics') as 'aws.dynamodb.item_collection_metrics'; + +/** + * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = (AWS + + DOT + + DYNAMODB_DOT + + PROVISIONED + + UNDERSCORE + + READ + + UNDERSCORE + + 'capacity') as 'aws.dynamodb.provisioned_read_capacity'; + +/** + * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = (AWS + + DOT + + DYNAMODB_DOT + + PROVISIONED + + UNDERSCORE + + WRITE + + UNDERSCORE + + 'capacity') as 'aws.dynamodb.provisioned_write_capacity'; + +/** + * The value of the `ConsistentRead` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = (AWS + + DOT + + DYNAMODB_DOT + + 'consistent_read') as 'aws.dynamodb.consistent_read'; + +/** + * The value of the `ProjectionExpression` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_PROJECTION = (AWS + + DOT + + DYNAMODB_DOT + + 'projection') as 'aws.dynamodb.projection'; + +/** + * The value of the `Limit` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_LIMIT = (AWS + + DOT + + DYNAMODB_DOT + + 'limit') as 'aws.dynamodb.limit'; + +/** + * The value of the `AttributesToGet` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = (AWS + + DOT + + DYNAMODB_DOT + + 'attributes_to_get') as 'aws.dynamodb.attributes_to_get'; + +/** + * The value of the `IndexName` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_INDEX_NAME = (AWS + + DOT + + DYNAMODB_DOT + + INDEX + + UNDERSCORE + + NAME) as 'aws.dynamodb.index_name'; + +/** + * The value of the `Select` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_SELECT = (AWS + + DOT + + DYNAMODB_DOT + + 'select') as 'aws.dynamodb.select'; + +/** + * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. + */ +export const SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = (AWS + + DOT + + DYNAMODB_DOT + + GLOBAL + + UNDERSCORE + + SECONDARY + + UNDERSCORE + + INDEX + + 'es') as 'aws.dynamodb.global_secondary_indexes'; + +/** + * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. + */ +export const SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = (AWS + + DOT + + DYNAMODB_DOT + + LOCAL + + UNDERSCORE + + SECONDARY + + UNDERSCORE + + INDEX + + 'es') as 'aws.dynamodb.local_secondary_indexes'; + +/** + * The value of the `ExclusiveStartTableName` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = (AWS + + DOT + + DYNAMODB_DOT + + 'exclusive_start_table') as 'aws.dynamodb.exclusive_start_table'; + +/** + * The the number of items in the `TableNames` response parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = (AWS + + DOT + + DYNAMODB_DOT + + 'table_count') as 'aws.dynamodb.table_count'; + +/** + * The value of the `ScanIndexForward` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = (AWS + + DOT + + DYNAMODB_DOT + + 'scan_forward') as 'aws.dynamodb.scan_forward'; + +/** + * The value of the `Segment` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_SEGMENT = (AWS + + DOT + + DYNAMODB_DOT + + 'segment') as 'aws.dynamodb.segment'; + +/** + * The value of the `TotalSegments` request parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = (AWS + + DOT + + DYNAMODB_DOT + + 'total_segments') as 'aws.dynamodb.total_segments'; + +/** + * The value of the `Count` response parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_COUNT = (AWS + + DOT + + DYNAMODB_DOT + + 'count') as 'aws.dynamodb.count'; + +/** + * The value of the `ScannedCount` response parameter. + */ +export const SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = (AWS + + DOT + + DYNAMODB_DOT + + 'scanned_count') as 'aws.dynamodb.scanned_count'; + +/** + * The JSON-serialized value of each item in the `AttributeDefinitions` request field. + */ +export const SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = (AWS + + DOT + + DYNAMODB_DOT + + 'attribute_definitions') as 'aws.dynamodb.attribute_definitions'; + +/** + * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. + */ +export const SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = (AWS + + DOT + + DYNAMODB_DOT + + GLOBAL + + UNDERSCORE + + SECONDARY + + UNDERSCORE + + INDEX + + UNDERSCORE + + 'updates') as 'aws.dynamodb.global_secondary_index_updates'; + +/** + * A string identifying the messaging system. + */ +export const SEMATTRS_MESSAGING_SYSTEM = (MESSAGING_DOT + + 'system') as 'messaging.system'; + +/** + * The message destination name. This might be equal to the span name but is required nevertheless. + */ +export const SEMATTRS_MESSAGING_DESTINATION = (MESSAGING_DOT + + 'destination') as 'messaging.destination'; + +/** + * The kind of message destination. + */ +export const SEMATTRS_MESSAGING_DESTINATION_KIND = (MESSAGING_DOT + + 'destination_kind') as 'messaging.destination_kind'; + +/** + * A boolean that is true if the message destination is temporary. + */ +export const SEMATTRS_MESSAGING_TEMP_DESTINATION = (MESSAGING_DOT + + 'temp_destination') as 'messaging.temp_destination'; + +/** + * The name of the transport protocol. + */ +export const SEMATTRS_MESSAGING_PROTOCOL = (MESSAGING_DOT + + PROTOCOL) as 'messaging.protocol'; + +/** + * The version of the transport protocol. + */ +export const SEMATTRS_MESSAGING_PROTOCOL_VERSION = (MESSAGING_DOT + + PROTOCOL + + UNDERSCORE + + VERSION) as 'messaging.protocol_version'; + +/** + * Connection string. + */ +export const SEMATTRS_MESSAGING_URL = (MESSAGING_DOT + + 'url') as 'messaging.url'; + +/** + * A value used by the messaging system as an identifier for the message, represented as a string. + */ +export const SEMATTRS_MESSAGING_MESSAGE_ID = (MESSAGING_DOT + + MESSAGE + + UNDERSCORE + + ID) as 'messaging.message_id'; + +/** + * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". + */ +export const SEMATTRS_MESSAGING_CONVERSATION_ID = (MESSAGING_DOT + + 'conversation_id') as 'messaging.conversation_id'; + +/** + * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. + */ +export const SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = (MESSAGING_DOT + + MESSAGE + + UNDERSCORE + + 'payload_size_bytes') as 'messaging.message_payload_size_bytes'; + +/** + * The compressed size of the message payload in bytes. + */ +export const SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = + (MESSAGING_DOT + + MESSAGE + + UNDERSCORE + + 'payload_compressed_size_bytes') as 'messaging.message_payload_compressed_size_bytes'; + +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +export const SEMATTRS_MESSAGING_OPERATION = (MESSAGING_DOT + + 'operation') as 'messaging.operation'; + +/** + * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. + */ +export const SEMATTRS_MESSAGING_CONSUMER_ID = (MESSAGING_DOT + + 'consumer_id') as 'messaging.consumer_id'; + +/** + * RabbitMQ message routing key. + */ +export const SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = (MESSAGING_DOT + + 'rabbitmq.routing_key') as 'messaging.rabbitmq.routing_key'; + +/** + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. + * + * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. + */ +export const SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = (MESSAGING_DOT + + KAFKA_DOT + + MESSAGE + + UNDERSCORE + + 'key') as 'messaging.kafka.message_key'; + +/** + * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. + */ +export const SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = (MESSAGING_DOT + + KAFKA_DOT + + 'consumer_group') as 'messaging.kafka.consumer_group'; + +/** + * Client Id for the Consumer or Producer that is handling the message. + */ +export const SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = (MESSAGING_DOT + + KAFKA_DOT + + 'client_id') as 'messaging.kafka.client_id'; + +/** + * Partition the message is sent to. + */ +export const SEMATTRS_MESSAGING_KAFKA_PARTITION = (MESSAGING_DOT + + KAFKA_DOT + + 'partition') as 'messaging.kafka.partition'; + +/** + * A boolean that is true if the message is a tombstone. + */ +export const SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = (MESSAGING_DOT + + KAFKA_DOT + + 'tombstone') as 'messaging.kafka.tombstone'; + +/** + * A string identifying the remoting system. + */ +export const SEMATTRS_RPC_SYSTEM = (RPC_DOT + 'system') as 'rpc.system'; + +/** + * The full (logical) name of the service being called, including its package name, if applicable. + * + * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). + */ +export const SEMATTRS_RPC_SERVICE = (RPC_DOT + 'service') as 'rpc.service'; + +/** + * The name of the (logical) method being called, must be equal to the $method part in the span name. + * + * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). + */ +export const SEMATTRS_RPC_METHOD = (RPC_DOT + 'method') as 'rpc.method'; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const SEMATTRS_RPC_GRPC_STATUS_CODE = (RPC_DOT + + 'grpc.status_code') as 'rpc.grpc.status_code'; + +/** + * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. + */ +export const SEMATTRS_RPC_JSONRPC_VERSION = (RPC_DOT + + JSONRPC_DOT + + VERSION) as 'rpc.jsonrpc.version'; + +/** + * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. + */ +export const SEMATTRS_RPC_JSONRPC_REQUEST_ID = (RPC_DOT + + JSONRPC_DOT + + REQUEST + + UNDERSCORE + + ID) as 'rpc.jsonrpc.request_id'; + +/** + * `error.code` property of response if it is an error response. + */ +export const SEMATTRS_RPC_JSONRPC_ERROR_CODE = (RPC_DOT + + JSONRPC_DOT + + 'error_code') as 'rpc.jsonrpc.error_code'; + +/** + * `error.message` property of response if it is an error response. + */ +export const SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = (RPC_DOT + + JSONRPC_DOT + + 'error_message') as 'rpc.jsonrpc.error_message'; + +/** + * Whether this is a received or sent message. + */ +export const SEMATTRS_MESSAGE_TYPE = (MESSAGE + DOT + TYPE) as 'message.type'; + +/** + * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. + * + * Note: This way we guarantee that the values will be consistent between different implementations. + */ +export const SEMATTRS_MESSAGE_ID = (MESSAGE + DOT + ID) as 'message.id'; + +/** + * Compressed size of the message in bytes. + */ +export const SEMATTRS_MESSAGE_COMPRESSED_SIZE = (MESSAGE + + DOT + + COMPRESSED + + UNDERSCORE + + 'size') as 'message.compressed_size'; + +/** + * Uncompressed size of the message in bytes. + */ +export const SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = (MESSAGE + + DOT + + UN + + COMPRESSED + + UNDERSCORE + + 'size') as 'message.uncompressed_size'; + +/** + * Definition of available values for SemanticAttributes + * This type is used for backward compatibility, you should use the individual exported + * constants SemanticAttributes_XXXXX rather than the exported constant map. As any single reference + * to a constant map value will result in all strings being included into your bundle. + * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification. + */ +export type SemanticAttributes = { /** * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). * * Note: This may be different from `faas.id` if an alias is involved. */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', + AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn'; /** * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. */ - DB_SYSTEM: 'db.system', + DB_SYSTEM: 'db.system'; /** * The connection string used to connect to the database. It is recommended to remove embedded credentials. */ - DB_CONNECTION_STRING: 'db.connection_string', + DB_CONNECTION_STRING: 'db.connection_string'; /** * Username for accessing the database. */ - DB_USER: 'db.user', + DB_USER: 'db.user'; /** * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', + DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname'; /** * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). * * Note: In some SQL databases, the database name to be used is called "schema name". */ - DB_NAME: 'db.name', + DB_NAME: 'db.name'; /** * The database statement being executed. * * Note: The value may be sanitized to exclude sensitive information. */ - DB_STATEMENT: 'db.statement', + DB_STATEMENT: 'db.statement'; /** * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. * * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. */ - DB_OPERATION: 'db.operation', + DB_OPERATION: 'db.operation'; /** * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. * * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', + DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name'; /** * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', + DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace'; /** * The fetch size used for paging, i.e. how many rows will be returned at once. */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', + DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size'; /** * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', + DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level'; /** * The name of the primary table that the operation is acting upon, including the schema name (if applicable). * * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', + DB_CASSANDRA_TABLE: 'db.cassandra.table'; /** * Whether or not the query is idempotent. */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', + DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence'; /** * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: - 'db.cassandra.speculative_execution_count', + DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count'; /** * The ID of the coordinating node for a query. */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', + DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id'; /** * The data center of the coordinating node for a query. */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', + DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc'; /** * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', + DB_HBASE_NAMESPACE: 'db.hbase.namespace'; /** * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', + DB_REDIS_DATABASE_INDEX: 'db.redis.database_index'; /** * The collection being accessed within the database stated in `db.name`. */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', + DB_MONGODB_COLLECTION: 'db.mongodb.collection'; /** * The name of the primary table that the operation is acting upon, including the schema name (if applicable). * * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. */ - DB_SQL_TABLE: 'db.sql.table', + DB_SQL_TABLE: 'db.sql.table'; /** * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. */ - EXCEPTION_TYPE: 'exception.type', + EXCEPTION_TYPE: 'exception.type'; /** * The exception message. */ - EXCEPTION_MESSAGE: 'exception.message', + EXCEPTION_MESSAGE: 'exception.message'; /** * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', + EXCEPTION_STACKTRACE: 'exception.stacktrace'; /** * 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. @@ -171,268 +1227,266 @@ 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. */ - EXCEPTION_ESCAPED: 'exception.escaped', + EXCEPTION_ESCAPED: 'exception.escaped'; /** * Type of the trigger on which the function is executed. */ - FAAS_TRIGGER: 'faas.trigger', + FAAS_TRIGGER: 'faas.trigger'; /** * The execution ID of the current function execution. */ - FAAS_EXECUTION: 'faas.execution', + FAAS_EXECUTION: 'faas.execution'; /** * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', + FAAS_DOCUMENT_COLLECTION: 'faas.document.collection'; /** * Describes the type of the operation that was performed on the data. */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', + FAAS_DOCUMENT_OPERATION: 'faas.document.operation'; /** * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). */ - FAAS_DOCUMENT_TIME: 'faas.document.time', + FAAS_DOCUMENT_TIME: 'faas.document.time'; /** * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. */ - FAAS_DOCUMENT_NAME: 'faas.document.name', + FAAS_DOCUMENT_NAME: 'faas.document.name'; /** * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). */ - FAAS_TIME: 'faas.time', + FAAS_TIME: 'faas.time'; /** * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). */ - FAAS_CRON: 'faas.cron', + FAAS_CRON: 'faas.cron'; /** * A boolean that is true if the serverless function is executed for the first time (aka cold-start). */ - FAAS_COLDSTART: 'faas.coldstart', + FAAS_COLDSTART: 'faas.coldstart'; /** * The name of the invoked function. * * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. */ - FAAS_INVOKED_NAME: 'faas.invoked_name', + FAAS_INVOKED_NAME: 'faas.invoked_name'; /** * The cloud provider of the invoked function. * * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', + FAAS_INVOKED_PROVIDER: 'faas.invoked_provider'; /** * The cloud region of the invoked function. * * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. */ - FAAS_INVOKED_REGION: 'faas.invoked_region', + FAAS_INVOKED_REGION: 'faas.invoked_region'; /** * Transport protocol used. See note below. */ - NET_TRANSPORT: 'net.transport', + NET_TRANSPORT: 'net.transport'; /** * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). */ - NET_PEER_IP: 'net.peer.ip', + NET_PEER_IP: 'net.peer.ip'; /** * Remote port number. */ - NET_PEER_PORT: 'net.peer.port', + NET_PEER_PORT: 'net.peer.port'; /** * Remote hostname or similar, see note below. */ - NET_PEER_NAME: 'net.peer.name', + NET_PEER_NAME: 'net.peer.name'; /** * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. */ - NET_HOST_IP: 'net.host.ip', + NET_HOST_IP: 'net.host.ip'; /** * Like `net.peer.port` but for the host port. */ - NET_HOST_PORT: 'net.host.port', + NET_HOST_PORT: 'net.host.port'; /** * Local hostname or similar, see note below. */ - NET_HOST_NAME: 'net.host.name', + NET_HOST_NAME: 'net.host.name'; /** * The internet connection type currently being used by the host. */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', + NET_HOST_CONNECTION_TYPE: 'net.host.connection.type'; /** * 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. */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', + NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype'; /** * The name of the mobile carrier. */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', + NET_HOST_CARRIER_NAME: 'net.host.carrier.name'; /** * The mobile carrier country code. */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', + NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc'; /** * The mobile carrier network code. */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', + NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc'; /** * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', + NET_HOST_CARRIER_ICC: 'net.host.carrier.icc'; /** * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. */ - PEER_SERVICE: 'peer.service', + PEER_SERVICE: 'peer.service'; /** * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. */ - ENDUSER_ID: 'enduser.id', + ENDUSER_ID: 'enduser.id'; /** * Actual/assumed role the client is making the request under extracted from token or application security context. */ - ENDUSER_ROLE: 'enduser.role', + ENDUSER_ROLE: 'enduser.role'; /** * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). */ - ENDUSER_SCOPE: 'enduser.scope', + ENDUSER_SCOPE: 'enduser.scope'; /** * Current "managed" thread ID (as opposed to OS thread ID). */ - THREAD_ID: 'thread.id', + THREAD_ID: 'thread.id'; /** * Current thread name. */ - THREAD_NAME: 'thread.name', + THREAD_NAME: 'thread.name'; /** * The method or function name, or equivalent (usually rightmost part of the code unit's name). */ - CODE_FUNCTION: 'code.function', + CODE_FUNCTION: 'code.function'; /** * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. */ - CODE_NAMESPACE: 'code.namespace', + CODE_NAMESPACE: 'code.namespace'; /** * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). */ - CODE_FILEPATH: 'code.filepath', + CODE_FILEPATH: 'code.filepath'; /** * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. */ - CODE_LINENO: 'code.lineno', + CODE_LINENO: 'code.lineno'; /** * HTTP request method. */ - HTTP_METHOD: 'http.method', + HTTP_METHOD: 'http.method'; /** * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. * * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. */ - HTTP_URL: 'http.url', + HTTP_URL: 'http.url'; /** * The full request target as passed in a HTTP request line or equivalent. */ - HTTP_TARGET: 'http.target', + HTTP_TARGET: 'http.target'; /** * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. * * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. */ - HTTP_HOST: 'http.host', + HTTP_HOST: 'http.host'; /** * The URI scheme identifying the used protocol. */ - HTTP_SCHEME: 'http.scheme', + HTTP_SCHEME: 'http.scheme'; /** * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). */ - HTTP_STATUS_CODE: 'http.status_code', + HTTP_STATUS_CODE: 'http.status_code'; /** * Kind of HTTP protocol used. * * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. */ - HTTP_FLAVOR: 'http.flavor', + HTTP_FLAVOR: 'http.flavor'; /** * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. */ - HTTP_USER_AGENT: 'http.user_agent', + HTTP_USER_AGENT: 'http.user_agent'; /** * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', + HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length'; /** * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: - 'http.request_content_length_uncompressed', + HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed'; /** * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', + HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length'; /** * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: - 'http.response_content_length_uncompressed', + HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed'; /** * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). * * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. */ - HTTP_SERVER_NAME: 'http.server_name', + HTTP_SERVER_NAME: 'http.server_name'; /** * The matched route (path template). */ - HTTP_ROUTE: 'http.route', + HTTP_ROUTE: 'http.route'; /** * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). @@ -449,610 +1503,1782 @@ comes from a proxy, reverse proxy, or the actual client. Setting one is at least somewhat confident that the address is not that of the closest proxy. */ - HTTP_CLIENT_IP: 'http.client_ip', + HTTP_CLIENT_IP: 'http.client_ip'; /** * The keys in the `RequestItems` object field. */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', + AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names'; /** * The JSON-serialized value of each item in the `ConsumedCapacity` response field. */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', + AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity'; /** * The JSON-serialized value of the `ItemCollectionMetrics` response field. */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', + AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics'; /** * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: - 'aws.dynamodb.provisioned_read_capacity', + AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity'; /** * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: - 'aws.dynamodb.provisioned_write_capacity', + AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity'; /** * The value of the `ConsistentRead` request parameter. */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', + AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read'; /** * The value of the `ProjectionExpression` request parameter. */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', + AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection'; /** * The value of the `Limit` request parameter. */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', + AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit'; /** * The value of the `AttributesToGet` request parameter. */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', + AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get'; /** * The value of the `IndexName` request parameter. */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', + AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name'; /** * The value of the `Select` request parameter. */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', + AWS_DYNAMODB_SELECT: 'aws.dynamodb.select'; /** * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: - 'aws.dynamodb.global_secondary_indexes', + AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes'; /** * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', + AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes'; /** * The value of the `ExclusiveStartTableName` request parameter. */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', + AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table'; /** * The the number of items in the `TableNames` response parameter. */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', + AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count'; /** * The value of the `ScanIndexForward` request parameter. */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', + AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward'; /** * The value of the `Segment` request parameter. */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', + AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment'; /** * The value of the `TotalSegments` request parameter. */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', + AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments'; /** * The value of the `Count` response parameter. */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', + AWS_DYNAMODB_COUNT: 'aws.dynamodb.count'; /** * The value of the `ScannedCount` response parameter. */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', + AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count'; /** * The JSON-serialized value of each item in the `AttributeDefinitions` request field. */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', + AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions'; /** * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: - 'aws.dynamodb.global_secondary_index_updates', + AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates'; /** * A string identifying the messaging system. */ - MESSAGING_SYSTEM: 'messaging.system', + MESSAGING_SYSTEM: 'messaging.system'; /** * The message destination name. This might be equal to the span name but is required nevertheless. */ - MESSAGING_DESTINATION: 'messaging.destination', + MESSAGING_DESTINATION: 'messaging.destination'; /** * The kind of message destination. */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', + MESSAGING_DESTINATION_KIND: 'messaging.destination_kind'; /** * A boolean that is true if the message destination is temporary. */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', + MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination'; /** * The name of the transport protocol. */ - MESSAGING_PROTOCOL: 'messaging.protocol', + MESSAGING_PROTOCOL: 'messaging.protocol'; /** * The version of the transport protocol. */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', + MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version'; /** * Connection string. */ - MESSAGING_URL: 'messaging.url', + MESSAGING_URL: 'messaging.url'; /** * A value used by the messaging system as an identifier for the message, represented as a string. */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', + MESSAGING_MESSAGE_ID: 'messaging.message_id'; /** * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', + MESSAGING_CONVERSATION_ID: 'messaging.conversation_id'; /** * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', + MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes'; /** * The compressed size of the message payload in bytes. */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: - 'messaging.message_payload_compressed_size_bytes', + MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes'; /** * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. */ - MESSAGING_OPERATION: 'messaging.operation', + MESSAGING_OPERATION: 'messaging.operation'; /** * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', + MESSAGING_CONSUMER_ID: 'messaging.consumer_id'; /** * RabbitMQ message routing key. */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', + MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key'; /** * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. * * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', + MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key'; /** * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', + MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group'; /** * Client Id for the Consumer or Producer that is handling the message. */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', + MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id'; /** * Partition the message is sent to. */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', + MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition'; /** * A boolean that is true if the message is a tombstone. */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', + MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone'; /** * A string identifying the remoting system. */ - RPC_SYSTEM: 'rpc.system', + RPC_SYSTEM: 'rpc.system'; /** * The full (logical) name of the service being called, including its package name, if applicable. * * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). */ - RPC_SERVICE: 'rpc.service', + RPC_SERVICE: 'rpc.service'; /** * The name of the (logical) method being called, must be equal to the $method part in the span name. * * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). */ - RPC_METHOD: 'rpc.method', + RPC_METHOD: 'rpc.method'; /** * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', + RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code'; /** * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', + RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version'; /** * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', + RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id'; /** * `error.code` property of response if it is an error response. */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', + RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code'; /** * `error.message` property of response if it is an error response. */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', + RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message'; /** * Whether this is a received or sent message. */ - MESSAGE_TYPE: 'message.type', + MESSAGE_TYPE: 'message.type'; /** * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. * * Note: This way we guarantee that the values will be consistent between different implementations. */ - MESSAGE_ID: 'message.id', + MESSAGE_ID: 'message.id'; /** * Compressed size of the message in bytes. */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', + MESSAGE_COMPRESSED_SIZE: 'message.compressed_size'; /** * Uncompressed size of the message in bytes. */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', + MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size'; }; -export const DbSystemValues = { +/** + * Create exported Value Map for SemanticAttributes values + * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification + */ +export const SemanticAttributes: SemanticAttributes = + createConstMap([ + SEMATTRS_AWS_LAMBDA_INVOKED_ARN, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_USER, + SEMATTRS_DB_JDBC_DRIVER_CLASSNAME, + SEMATTRS_DB_NAME, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_MSSQL_INSTANCE_NAME, + SEMATTRS_DB_CASSANDRA_KEYSPACE, + SEMATTRS_DB_CASSANDRA_PAGE_SIZE, + SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL, + SEMATTRS_DB_CASSANDRA_TABLE, + SEMATTRS_DB_CASSANDRA_IDEMPOTENCE, + SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, + SEMATTRS_DB_CASSANDRA_COORDINATOR_ID, + SEMATTRS_DB_CASSANDRA_COORDINATOR_DC, + SEMATTRS_DB_HBASE_NAMESPACE, + SEMATTRS_DB_REDIS_DATABASE_INDEX, + SEMATTRS_DB_MONGODB_COLLECTION, + SEMATTRS_DB_SQL_TABLE, + SEMATTRS_EXCEPTION_TYPE, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_EXCEPTION_STACKTRACE, + SEMATTRS_EXCEPTION_ESCAPED, + SEMATTRS_FAAS_TRIGGER, + SEMATTRS_FAAS_EXECUTION, + SEMATTRS_FAAS_DOCUMENT_COLLECTION, + SEMATTRS_FAAS_DOCUMENT_OPERATION, + SEMATTRS_FAAS_DOCUMENT_TIME, + SEMATTRS_FAAS_DOCUMENT_NAME, + SEMATTRS_FAAS_TIME, + SEMATTRS_FAAS_CRON, + SEMATTRS_FAAS_COLDSTART, + SEMATTRS_FAAS_INVOKED_NAME, + SEMATTRS_FAAS_INVOKED_PROVIDER, + SEMATTRS_FAAS_INVOKED_REGION, + SEMATTRS_NET_TRANSPORT, + SEMATTRS_NET_PEER_IP, + SEMATTRS_NET_PEER_PORT, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_HOST_IP, + SEMATTRS_NET_HOST_PORT, + SEMATTRS_NET_HOST_NAME, + SEMATTRS_NET_HOST_CONNECTION_TYPE, + SEMATTRS_NET_HOST_CONNECTION_SUBTYPE, + SEMATTRS_NET_HOST_CARRIER_NAME, + SEMATTRS_NET_HOST_CARRIER_MCC, + SEMATTRS_NET_HOST_CARRIER_MNC, + SEMATTRS_NET_HOST_CARRIER_ICC, + SEMATTRS_PEER_SERVICE, + SEMATTRS_ENDUSER_ID, + SEMATTRS_ENDUSER_ROLE, + SEMATTRS_ENDUSER_SCOPE, + SEMATTRS_THREAD_ID, + SEMATTRS_THREAD_NAME, + SEMATTRS_CODE_FUNCTION, + SEMATTRS_CODE_NAMESPACE, + SEMATTRS_CODE_FILEPATH, + SEMATTRS_CODE_LINENO, + SEMATTRS_HTTP_METHOD, + SEMATTRS_HTTP_URL, + SEMATTRS_HTTP_TARGET, + SEMATTRS_HTTP_HOST, + SEMATTRS_HTTP_SCHEME, + SEMATTRS_HTTP_STATUS_CODE, + SEMATTRS_HTTP_FLAVOR, + SEMATTRS_HTTP_USER_AGENT, + SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH, + SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, + SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH, + SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, + SEMATTRS_HTTP_SERVER_NAME, + SEMATTRS_HTTP_ROUTE, + SEMATTRS_HTTP_CLIENT_IP, + SEMATTRS_AWS_DYNAMODB_TABLE_NAMES, + SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY, + SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, + SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ, + SEMATTRS_AWS_DYNAMODB_PROJECTION, + SEMATTRS_AWS_DYNAMODB_LIMIT, + SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET, + SEMATTRS_AWS_DYNAMODB_INDEX_NAME, + SEMATTRS_AWS_DYNAMODB_SELECT, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE, + SEMATTRS_AWS_DYNAMODB_TABLE_COUNT, + SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD, + SEMATTRS_AWS_DYNAMODB_SEGMENT, + SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS, + SEMATTRS_AWS_DYNAMODB_COUNT, + SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT, + SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_TEMP_DESTINATION, + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_URL, + SEMATTRS_MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_CONVERSATION_ID, + SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES, + SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES, + SEMATTRS_MESSAGING_OPERATION, + SEMATTRS_MESSAGING_CONSUMER_ID, + SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY, + SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY, + SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP, + SEMATTRS_MESSAGING_KAFKA_CLIENT_ID, + SEMATTRS_MESSAGING_KAFKA_PARTITION, + SEMATTRS_MESSAGING_KAFKA_TOMBSTONE, + SEMATTRS_RPC_SYSTEM, + SEMATTRS_RPC_SERVICE, + SEMATTRS_RPC_METHOD, + SEMATTRS_RPC_GRPC_STATUS_CODE, + SEMATTRS_RPC_JSONRPC_VERSION, + SEMATTRS_RPC_JSONRPC_REQUEST_ID, + SEMATTRS_RPC_JSONRPC_ERROR_CODE, + SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE, + SEMATTRS_MESSAGE_TYPE, + SEMATTRS_MESSAGE_ID, + SEMATTRS_MESSAGE_COMPRESSED_SIZE, + SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE, + ]); + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for DbSystemValues enum definition + * + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_OTHER_SQL = 'other_sql'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MSSQL = 'mssql'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MYSQL = 'mysql'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_ORACLE = 'oracle'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_DB2 = 'db2'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_POSTGRESQL = 'postgresql'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_REDSHIFT = 'redshift'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_HIVE = 'hive'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_HSQLDB = 'hsqldb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_PROGRESS = 'progress'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MAXDB = 'maxdb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_HANADB = 'hanadb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_INGRES = 'ingres'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_FIRSTSQL = 'firstsql'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_EDB = 'edb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_CACHE = 'cache'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_ADABAS = 'adabas'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_FIREBIRD = 'firebird'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_DERBY = 'derby'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_FILEMAKER = 'filemaker'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_INFORMIX = 'informix'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_INSTANTDB = 'instantdb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_INTERBASE = 'interbase'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MARIADB = 'mariadb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_NETEZZA = 'netezza'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_PERVASIVE = 'pervasive'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_POINTBASE = 'pointbase'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_SQLITE = 'sqlite'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_SYBASE = 'sybase'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_TERADATA = 'teradata'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_VERTICA = 'vertica'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_H2 = 'h2'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_COLDFUSION = 'coldfusion'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_CASSANDRA = 'cassandra'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_HBASE = 'hbase'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MONGODB = 'mongodb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_REDIS = 'redis'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_COUCHBASE = 'couchbase'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_COUCHDB = 'couchdb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_COSMOSDB = 'cosmosdb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_DYNAMODB = 'dynamodb'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_NEO4J = 'neo4j'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_GEODE = 'geode'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_MEMCACHED = 'memcached'; + +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +export const DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb'; + +/** + * Identifies the Values for DbSystemValues enum definition + * + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification. + */ +export type DbSystemValues = { /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', + OTHER_SQL: 'other_sql'; /** Microsoft SQL Server. */ - MSSQL: 'mssql', + MSSQL: 'mssql'; /** MySQL. */ - MYSQL: 'mysql', + MYSQL: 'mysql'; /** Oracle Database. */ - ORACLE: 'oracle', + ORACLE: 'oracle'; /** IBM Db2. */ - DB2: 'db2', + DB2: 'db2'; /** PostgreSQL. */ - POSTGRESQL: 'postgresql', + POSTGRESQL: 'postgresql'; /** Amazon Redshift. */ - REDSHIFT: 'redshift', + REDSHIFT: 'redshift'; /** Apache Hive. */ - HIVE: 'hive', + HIVE: 'hive'; /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', + CLOUDSCAPE: 'cloudscape'; /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', + HSQLDB: 'hsqldb'; /** Progress Database. */ - PROGRESS: 'progress', + PROGRESS: 'progress'; /** SAP MaxDB. */ - MAXDB: 'maxdb', + MAXDB: 'maxdb'; /** SAP HANA. */ - HANADB: 'hanadb', + HANADB: 'hanadb'; /** Ingres. */ - INGRES: 'ingres', + INGRES: 'ingres'; /** FirstSQL. */ - FIRSTSQL: 'firstsql', + FIRSTSQL: 'firstsql'; /** EnterpriseDB. */ - EDB: 'edb', + EDB: 'edb'; /** InterSystems Caché. */ - CACHE: 'cache', + CACHE: 'cache'; /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', + ADABAS: 'adabas'; /** Firebird. */ - FIREBIRD: 'firebird', + FIREBIRD: 'firebird'; /** Apache Derby. */ - DERBY: 'derby', + DERBY: 'derby'; /** FileMaker. */ - FILEMAKER: 'filemaker', + FILEMAKER: 'filemaker'; /** Informix. */ - INFORMIX: 'informix', + INFORMIX: 'informix'; /** InstantDB. */ - INSTANTDB: 'instantdb', + INSTANTDB: 'instantdb'; /** InterBase. */ - INTERBASE: 'interbase', + INTERBASE: 'interbase'; /** MariaDB. */ - MARIADB: 'mariadb', + MARIADB: 'mariadb'; /** Netezza. */ - NETEZZA: 'netezza', + NETEZZA: 'netezza'; /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', + PERVASIVE: 'pervasive'; /** PointBase. */ - POINTBASE: 'pointbase', + POINTBASE: 'pointbase'; /** SQLite. */ - SQLITE: 'sqlite', + SQLITE: 'sqlite'; /** Sybase. */ - SYBASE: 'sybase', + SYBASE: 'sybase'; /** Teradata. */ - TERADATA: 'teradata', + TERADATA: 'teradata'; /** Vertica. */ - VERTICA: 'vertica', + VERTICA: 'vertica'; /** H2. */ - H2: 'h2', + H2: 'h2'; /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', + COLDFUSION: 'coldfusion'; /** Apache Cassandra. */ - CASSANDRA: 'cassandra', + CASSANDRA: 'cassandra'; /** Apache HBase. */ - HBASE: 'hbase', + HBASE: 'hbase'; /** MongoDB. */ - MONGODB: 'mongodb', + MONGODB: 'mongodb'; /** Redis. */ - REDIS: 'redis', + REDIS: 'redis'; /** Couchbase. */ - COUCHBASE: 'couchbase', + COUCHBASE: 'couchbase'; /** CouchDB. */ - COUCHDB: 'couchdb', + COUCHDB: 'couchdb'; /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', + COSMOSDB: 'cosmosdb'; /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', + DYNAMODB: 'dynamodb'; /** Neo4j. */ - NEO4J: 'neo4j', + NEO4J: 'neo4j'; /** Apache Geode. */ - GEODE: 'geode', + GEODE: 'geode'; /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', + ELASTICSEARCH: 'elasticsearch'; /** Memcached. */ - MEMCACHED: 'memcached', + MEMCACHED: 'memcached'; /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -} as const; -export type DbSystemValues = - (typeof DbSystemValues)[keyof typeof DbSystemValues]; + COCKROACHDB: 'cockroachdb'; +}; + +/** + * The constant map of values for DbSystemValues. + * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification. + */ +export const DbSystemValues: DbSystemValues = { + OTHER_SQL: DBSYSTEMVALUES_OTHER_SQL, + MSSQL: DBSYSTEMVALUES_MSSQL, + MYSQL: DBSYSTEMVALUES_MYSQL, + ORACLE: DBSYSTEMVALUES_ORACLE, + DB2: DBSYSTEMVALUES_DB2, + POSTGRESQL: DBSYSTEMVALUES_POSTGRESQL, + REDSHIFT: DBSYSTEMVALUES_REDSHIFT, + HIVE: DBSYSTEMVALUES_HIVE, + CLOUDSCAPE: DBSYSTEMVALUES_CLOUDSCAPE, + HSQLDB: DBSYSTEMVALUES_HSQLDB, + PROGRESS: DBSYSTEMVALUES_PROGRESS, + MAXDB: DBSYSTEMVALUES_MAXDB, + HANADB: DBSYSTEMVALUES_HANADB, + INGRES: DBSYSTEMVALUES_INGRES, + FIRSTSQL: DBSYSTEMVALUES_FIRSTSQL, + EDB: DBSYSTEMVALUES_EDB, + CACHE: DBSYSTEMVALUES_CACHE, + ADABAS: DBSYSTEMVALUES_ADABAS, + FIREBIRD: DBSYSTEMVALUES_FIREBIRD, + DERBY: DBSYSTEMVALUES_DERBY, + FILEMAKER: DBSYSTEMVALUES_FILEMAKER, + INFORMIX: DBSYSTEMVALUES_INFORMIX, + INSTANTDB: DBSYSTEMVALUES_INSTANTDB, + INTERBASE: DBSYSTEMVALUES_INTERBASE, + MARIADB: DBSYSTEMVALUES_MARIADB, + NETEZZA: DBSYSTEMVALUES_NETEZZA, + PERVASIVE: DBSYSTEMVALUES_PERVASIVE, + POINTBASE: DBSYSTEMVALUES_POINTBASE, + SQLITE: DBSYSTEMVALUES_SQLITE, + SYBASE: DBSYSTEMVALUES_SYBASE, + TERADATA: DBSYSTEMVALUES_TERADATA, + VERTICA: DBSYSTEMVALUES_VERTICA, + H2: DBSYSTEMVALUES_H2, + COLDFUSION: DBSYSTEMVALUES_COLDFUSION, + CASSANDRA: DBSYSTEMVALUES_CASSANDRA, + HBASE: DBSYSTEMVALUES_HBASE, + MONGODB: DBSYSTEMVALUES_MONGODB, + REDIS: DBSYSTEMVALUES_REDIS, + COUCHBASE: DBSYSTEMVALUES_COUCHBASE, + COUCHDB: DBSYSTEMVALUES_COUCHDB, + COSMOSDB: DBSYSTEMVALUES_COSMOSDB, + DYNAMODB: DBSYSTEMVALUES_DYNAMODB, + NEO4J: DBSYSTEMVALUES_NEO4J, + GEODE: DBSYSTEMVALUES_GEODE, + ELASTICSEARCH: DBSYSTEMVALUES_ELASTICSEARCH, + MEMCACHED: DBSYSTEMVALUES_MEMCACHED, + COCKROACHDB: DBSYSTEMVALUES_COCKROACHDB, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for DbCassandraConsistencyLevelValues enum definition + * + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = (LOCAL + + UNDERSCORE + + 'quorum') as 'local_quorum'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = (LOCAL + + UNDERSCORE + + 'one') as 'local_one'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial'; + +/** + * 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). + */ +export const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = (LOCAL + + UNDERSCORE + + 'serial') as 'local_serial'; -export const DbCassandraConsistencyLevelValues = { +/** + * Identifies the Values for DbCassandraConsistencyLevelValues enum definition + * + * 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 Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification. + */ +export type DbCassandraConsistencyLevelValues = { /** all. */ - ALL: 'all', + ALL: 'all'; /** each_quorum. */ - EACH_QUORUM: 'each_quorum', + EACH_QUORUM: 'each_quorum'; /** quorum. */ - QUORUM: 'quorum', + QUORUM: 'quorum'; /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', + LOCAL_QUORUM: 'local_quorum'; /** one. */ - ONE: 'one', + ONE: 'one'; /** two. */ - TWO: 'two', + TWO: 'two'; /** three. */ - THREE: 'three', + THREE: 'three'; /** local_one. */ - LOCAL_ONE: 'local_one', + LOCAL_ONE: 'local_one'; /** any. */ - ANY: 'any', + ANY: 'any'; /** serial. */ - SERIAL: 'serial', + SERIAL: 'serial'; /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -} as const; -export type DbCassandraConsistencyLevelValues = - (typeof DbCassandraConsistencyLevelValues)[keyof typeof DbCassandraConsistencyLevelValues]; + LOCAL_SERIAL: 'local_serial'; +}; + +/** + * The constant map of values for DbCassandraConsistencyLevelValues. + * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification. + */ +export const DbCassandraConsistencyLevelValues: DbCassandraConsistencyLevelValues = + { + ALL: DBCASSANDRACONSISTENCYLEVELVALUES_ALL, + EACH_QUORUM: DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM, + QUORUM: DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM, + LOCAL_QUORUM: DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM, + ONE: DBCASSANDRACONSISTENCYLEVELVALUES_ONE, + TWO: DBCASSANDRACONSISTENCYLEVELVALUES_TWO, + THREE: DBCASSANDRACONSISTENCYLEVELVALUES_THREE, + LOCAL_ONE: DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE, + ANY: DBCASSANDRACONSISTENCYLEVELVALUES_ANY, + SERIAL: DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL, + LOCAL_SERIAL: DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL, + }; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasTriggerValues enum definition + * + * Type of the trigger on which the function is executed. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Type of the trigger on which the function is executed. + */ +export const FAASTRIGGERVALUES_DATASOURCE = 'datasource'; + +/** + * Type of the trigger on which the function is executed. + */ +export const FAASTRIGGERVALUES_HTTP = 'http'; + +/** + * Type of the trigger on which the function is executed. + */ +export const FAASTRIGGERVALUES_PUBSUB = 'pubsub'; + +/** + * Type of the trigger on which the function is executed. + */ +export const FAASTRIGGERVALUES_TIMER = 'timer'; + +/** + * Type of the trigger on which the function is executed. + */ +export const FAASTRIGGERVALUES_OTHER = 'other'; -export const FaasTriggerValues = { +/** + * Identifies the Values for FaasTriggerValues enum definition + * + * Type of the trigger on which the function is executed. + * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification. + */ +export type FaasTriggerValues = { /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', + DATASOURCE: 'datasource'; /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', + HTTP: 'http'; /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', + PUBSUB: 'pubsub'; /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', + TIMER: 'timer'; /** If none of the others apply. */ - OTHER: 'other', -} as const; -export type FaasTriggerValues = - (typeof FaasTriggerValues)[keyof typeof FaasTriggerValues]; + OTHER: 'other'; +}; + +/** + * The constant map of values for FaasTriggerValues. + * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification. + */ +export const FaasTriggerValues: FaasTriggerValues = { + DATASOURCE: FAASTRIGGERVALUES_DATASOURCE, + HTTP: FAASTRIGGERVALUES_HTTP, + PUBSUB: FAASTRIGGERVALUES_PUBSUB, + TIMER: FAASTRIGGERVALUES_TIMER, + OTHER: FAASTRIGGERVALUES_OTHER, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasDocumentOperationValues enum definition + * + * Describes the type of the operation that was performed on the data. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Describes the type of the operation that was performed on the data. + */ +export const FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert'; + +/** + * Describes the type of the operation that was performed on the data. + */ +export const FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit'; + +/** + * Describes the type of the operation that was performed on the data. + */ +export const FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete'; -export const FaasDocumentOperationValues = { +/** + * Identifies the Values for FaasDocumentOperationValues enum definition + * + * Describes the type of the operation that was performed on the data. + * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification. + */ +export type FaasDocumentOperationValues = { /** When a new object is created. */ - INSERT: 'insert', + INSERT: 'insert'; /** When an object is modified. */ - EDIT: 'edit', + EDIT: 'edit'; /** When an object is deleted. */ - DELETE: 'delete', -} as const; -export type FaasDocumentOperationValues = - (typeof FaasDocumentOperationValues)[keyof typeof FaasDocumentOperationValues]; + DELETE: 'delete'; +}; + +/** + * The constant map of values for FaasDocumentOperationValues. + * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification. + */ +export const FaasDocumentOperationValues: FaasDocumentOperationValues = { + INSERT: FAASDOCUMENTOPERATIONVALUES_INSERT, + EDIT: FAASDOCUMENTOPERATIONVALUES_EDIT, + DELETE: FAASDOCUMENTOPERATIONVALUES_DELETE, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasInvokedProviderValues enum definition + * + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +export const FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; + +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +export const FAASINVOKEDPROVIDERVALUES_AWS = AWS as 'aws'; + +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +export const FAASINVOKEDPROVIDERVALUES_AZURE = AZURE as 'azure'; + +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +export const FAASINVOKEDPROVIDERVALUES_GCP = 'gcp'; -export const FaasInvokedProviderValues = { +/** + * Identifies the Values for FaasInvokedProviderValues enum definition + * + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification. + */ +export type FaasInvokedProviderValues = { /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', + ALIBABA_CLOUD: 'alibaba_cloud'; /** Amazon Web Services. */ - AWS: 'aws', + AWS: 'aws'; /** Microsoft Azure. */ - AZURE: 'azure', + AZURE: 'azure'; /** Google Cloud Platform. */ - GCP: 'gcp', -} as const; -export type FaasInvokedProviderValues = - (typeof FaasInvokedProviderValues)[keyof typeof FaasInvokedProviderValues]; + GCP: 'gcp'; +}; + +/** + * The constant map of values for FaasInvokedProviderValues. + * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification. + */ +export const FaasInvokedProviderValues: FaasInvokedProviderValues = { + ALIBABA_CLOUD: FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD, + AWS: FAASINVOKEDPROVIDERVALUES_AWS, + AZURE: FAASINVOKEDPROVIDERVALUES_AZURE, + GCP: FAASINVOKEDPROVIDERVALUES_GCP, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetTransportValues enum definition + * + * Transport protocol used. See note below. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_IP_TCP = 'ip_tcp'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_IP_UDP = 'ip_udp'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_IP = 'ip'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_UNIX = (UN + 'ix') as 'unix'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_PIPE = 'pipe'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_INPROC = 'inproc'; + +/** + * Transport protocol used. See note below. + */ +export const NETTRANSPORTVALUES_OTHER = 'other'; -export const NetTransportValues = { +/** + * Identifies the Values for NetTransportValues enum definition + * + * Transport protocol used. See note below. + * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification. + */ +export type NetTransportValues = { /** ip_tcp. */ - IP_TCP: 'ip_tcp', + IP_TCP: 'ip_tcp'; /** ip_udp. */ - IP_UDP: 'ip_udp', + IP_UDP: 'ip_udp'; /** Another IP-based protocol. */ - IP: 'ip', + IP: 'ip'; /** Unix Domain socket. See below. */ - UNIX: 'unix', + UNIX: 'unix'; /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', + PIPE: 'pipe'; /** In-process communication. */ - INPROC: 'inproc', + INPROC: 'inproc'; /** Something else (non IP-based). */ - OTHER: 'other', -} as const; -export type NetTransportValues = - (typeof NetTransportValues)[keyof typeof NetTransportValues]; + OTHER: 'other'; +}; + +/** + * The constant map of values for NetTransportValues. + * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification. + */ +export const NetTransportValues: NetTransportValues = { + IP_TCP: NETTRANSPORTVALUES_IP_TCP, + IP_UDP: NETTRANSPORTVALUES_IP_UDP, + IP: NETTRANSPORTVALUES_IP, + UNIX: NETTRANSPORTVALUES_UNIX, + PIPE: NETTRANSPORTVALUES_PIPE, + INPROC: NETTRANSPORTVALUES_INPROC, + OTHER: NETTRANSPORTVALUES_OTHER, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetHostConnectionTypeValues enum definition + * + * The internet connection type currently being used by the host. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The internet connection type currently being used by the host. + */ +export const NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi'; + +/** + * The internet connection type currently being used by the host. + */ +export const NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired'; + +/** + * The internet connection type currently being used by the host. + */ +export const NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell'; + +/** + * The internet connection type currently being used by the host. + */ +export const NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = (UN + + 'available') as 'unavailable'; + +/** + * The internet connection type currently being used by the host. + */ +export const NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = (UN + 'known') as 'unknown'; -export const NetHostConnectionTypeValues = { +/** + * Identifies the Values for NetHostConnectionTypeValues enum definition + * + * The internet connection type currently being used by the host. + * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification. + */ +export type NetHostConnectionTypeValues = { /** wifi. */ - WIFI: 'wifi', + WIFI: 'wifi'; /** wired. */ - WIRED: 'wired', + WIRED: 'wired'; /** cell. */ - CELL: 'cell', + CELL: 'cell'; /** unavailable. */ - UNAVAILABLE: 'unavailable', + UNAVAILABLE: 'unavailable'; /** unknown. */ - UNKNOWN: 'unknown', -} as const; -export type NetHostConnectionTypeValues = - (typeof NetHostConnectionTypeValues)[keyof typeof NetHostConnectionTypeValues]; + UNKNOWN: 'unknown'; +}; + +/** + * The constant map of values for NetHostConnectionTypeValues. + * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification. + */ +export const NetHostConnectionTypeValues: NetHostConnectionTypeValues = { + WIFI: NETHOSTCONNECTIONTYPEVALUES_WIFI, + WIRED: NETHOSTCONNECTIONTYPEVALUES_WIRED, + CELL: NETHOSTCONNECTIONTYPEVALUES_CELL, + UNAVAILABLE: NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE, + UNKNOWN: NETHOSTCONNECTIONTYPEVALUES_UNKNOWN, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetHostConnectionSubtypeValues enum definition + * + * 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. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = (ID + 'en') as 'iden'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa'; + +/** + * 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. + */ +export const NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca'; -export const NetHostConnectionSubtypeValues = { +/** + * Identifies the Values for NetHostConnectionSubtypeValues enum definition + * + * 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. + * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification. + */ +export type NetHostConnectionSubtypeValues = { /** GPRS. */ - GPRS: 'gprs', + GPRS: 'gprs'; /** EDGE. */ - EDGE: 'edge', + EDGE: 'edge'; /** UMTS. */ - UMTS: 'umts', + UMTS: 'umts'; /** CDMA. */ - CDMA: 'cdma', + CDMA: 'cdma'; /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', + EVDO_0: 'evdo_0'; /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', + EVDO_A: 'evdo_a'; /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', + CDMA2000_1XRTT: 'cdma2000_1xrtt'; /** HSDPA. */ - HSDPA: 'hsdpa', + HSDPA: 'hsdpa'; /** HSUPA. */ - HSUPA: 'hsupa', + HSUPA: 'hsupa'; /** HSPA. */ - HSPA: 'hspa', + HSPA: 'hspa'; /** IDEN. */ - IDEN: 'iden', + IDEN: 'iden'; /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', + EVDO_B: 'evdo_b'; /** LTE. */ - LTE: 'lte', + LTE: 'lte'; /** EHRPD. */ - EHRPD: 'ehrpd', + EHRPD: 'ehrpd'; /** HSPAP. */ - HSPAP: 'hspap', + HSPAP: 'hspap'; /** GSM. */ - GSM: 'gsm', + GSM: 'gsm'; /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', + TD_SCDMA: 'td_scdma'; /** IWLAN. */ - IWLAN: 'iwlan', + IWLAN: 'iwlan'; /** 5G NR (New Radio). */ - NR: 'nr', + NR: 'nr'; /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', + NRNSA: 'nrnsa'; /** LTE CA. */ - LTE_CA: 'lte_ca', -} as const; -export type NetHostConnectionSubtypeValues = - (typeof NetHostConnectionSubtypeValues)[keyof typeof NetHostConnectionSubtypeValues]; + LTE_CA: 'lte_ca'; +}; + +/** + * The constant map of values for NetHostConnectionSubtypeValues. + * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification. + */ +export const NetHostConnectionSubtypeValues: NetHostConnectionSubtypeValues = { + GPRS: NETHOSTCONNECTIONSUBTYPEVALUES_GPRS, + EDGE: NETHOSTCONNECTIONSUBTYPEVALUES_EDGE, + UMTS: NETHOSTCONNECTIONSUBTYPEVALUES_UMTS, + CDMA: NETHOSTCONNECTIONSUBTYPEVALUES_CDMA, + EVDO_0: NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0, + EVDO_A: NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A, + CDMA2000_1XRTT: NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT, + HSDPA: NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA, + HSUPA: NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA, + HSPA: NETHOSTCONNECTIONSUBTYPEVALUES_HSPA, + IDEN: NETHOSTCONNECTIONSUBTYPEVALUES_IDEN, + EVDO_B: NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B, + LTE: NETHOSTCONNECTIONSUBTYPEVALUES_LTE, + EHRPD: NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD, + HSPAP: NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP, + GSM: NETHOSTCONNECTIONSUBTYPEVALUES_GSM, + TD_SCDMA: NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA, + IWLAN: NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN, + NR: NETHOSTCONNECTIONSUBTYPEVALUES_NR, + NRNSA: NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA, + LTE_CA: NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for HttpFlavorValues enum definition + * + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const HTTPFLAVORVALUES_HTTP_1_0 = '1.0'; + +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const HTTPFLAVORVALUES_HTTP_1_1 = '1.1'; + +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const HTTPFLAVORVALUES_HTTP_2_0 = '2.0'; + +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const HTTPFLAVORVALUES_SPDY = 'SPDY'; -export const HttpFlavorValues = { +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +export const HTTPFLAVORVALUES_QUIC = 'QUIC'; + +/** + * Identifies the Values for HttpFlavorValues enum definition + * + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification. + */ +export type HttpFlavorValues = { /** HTTP 1.0. */ - HTTP_1_0: '1.0', + HTTP_1_0: '1.0'; /** HTTP 1.1. */ - HTTP_1_1: '1.1', + HTTP_1_1: '1.1'; /** HTTP 2. */ - HTTP_2_0: '2.0', + HTTP_2_0: '2.0'; /** SPDY protocol. */ - SPDY: 'SPDY', + SPDY: 'SPDY'; /** QUIC protocol. */ - QUIC: 'QUIC', -} as const; -export type HttpFlavorValues = - (typeof HttpFlavorValues)[keyof typeof HttpFlavorValues]; + QUIC: 'QUIC'; +}; + +/** + * The constant map of values for HttpFlavorValues. + * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification. + */ +export const HttpFlavorValues: HttpFlavorValues = { + HTTP_1_0: HTTPFLAVORVALUES_HTTP_1_0, + HTTP_1_1: HTTPFLAVORVALUES_HTTP_1_1, + HTTP_2_0: HTTPFLAVORVALUES_HTTP_2_0, + SPDY: HTTPFLAVORVALUES_SPDY, + QUIC: HTTPFLAVORVALUES_QUIC, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessagingDestinationKindValues enum definition + * + * The kind of message destination. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The kind of message destination. + */ +export const MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue'; + +/** + * The kind of message destination. + */ +export const MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic'; -export const MessagingDestinationKindValues = { +/** + * Identifies the Values for MessagingDestinationKindValues enum definition + * + * The kind of message destination. + * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification. + */ +export type MessagingDestinationKindValues = { /** A message sent to a queue. */ - QUEUE: 'queue', + QUEUE: 'queue'; /** A message sent to a topic. */ - TOPIC: 'topic', -} as const; -export type MessagingDestinationKindValues = - (typeof MessagingDestinationKindValues)[keyof typeof MessagingDestinationKindValues]; + TOPIC: 'topic'; +}; + +/** + * The constant map of values for MessagingDestinationKindValues. + * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification. + */ +export const MessagingDestinationKindValues: MessagingDestinationKindValues = { + QUEUE: MESSAGINGDESTINATIONKINDVALUES_QUEUE, + TOPIC: MESSAGINGDESTINATIONKINDVALUES_TOPIC, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessagingOperationValues enum definition + * + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + * ---------------------------------------------------------------------------------------------------------- */ -export const MessagingOperationValues = { +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +export const MESSAGINGOPERATIONVALUES_RECEIVE = 'receive'; + +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +export const MESSAGINGOPERATIONVALUES_PROCESS = 'process'; + +/** + * Identifies the Values for MessagingOperationValues enum definition + * + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification. + */ +export type MessagingOperationValues = { /** receive. */ - RECEIVE: 'receive', + RECEIVE: 'receive'; /** process. */ - PROCESS: 'process', -} as const; -export type MessagingOperationValues = - (typeof MessagingOperationValues)[keyof typeof MessagingOperationValues]; + PROCESS: 'process'; +}; + +/** + * The constant map of values for MessagingOperationValues. + * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification. + */ +export const MessagingOperationValues: MessagingOperationValues = { + RECEIVE: MESSAGINGOPERATIONVALUES_RECEIVE, + PROCESS: MESSAGINGOPERATIONVALUES_PROCESS, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for RpcGrpcStatusCodeValues enum definition + * + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_OK = 0; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_CANCELLED = 1; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9; -export const RpcGrpcStatusCodeValues = { +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_ABORTED = 10; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_INTERNAL = 13; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15; + +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +export const RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16; + +/** + * Identifies the Values for RpcGrpcStatusCodeValues enum definition + * + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification. + */ +export type RpcGrpcStatusCodeValues = { /** OK. */ - OK: 0, + OK: 0; /** CANCELLED. */ - CANCELLED: 1, + CANCELLED: 1; /** UNKNOWN. */ - UNKNOWN: 2, + UNKNOWN: 2; /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, + INVALID_ARGUMENT: 3; /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, + DEADLINE_EXCEEDED: 4; /** NOT_FOUND. */ - NOT_FOUND: 5, + NOT_FOUND: 5; /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, + ALREADY_EXISTS: 6; /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, + PERMISSION_DENIED: 7; /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, + RESOURCE_EXHAUSTED: 8; /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, + FAILED_PRECONDITION: 9; /** ABORTED. */ - ABORTED: 10, + ABORTED: 10; /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, + OUT_OF_RANGE: 11; /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, + UNIMPLEMENTED: 12; /** INTERNAL. */ - INTERNAL: 13, + INTERNAL: 13; /** UNAVAILABLE. */ - UNAVAILABLE: 14, + UNAVAILABLE: 14; /** DATA_LOSS. */ - DATA_LOSS: 15, + DATA_LOSS: 15; /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -} as const; -export type RpcGrpcStatusCodeValues = - (typeof RpcGrpcStatusCodeValues)[keyof typeof RpcGrpcStatusCodeValues]; + UNAUTHENTICATED: 16; +}; + +/** + * The constant map of values for RpcGrpcStatusCodeValues. + * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification. + */ +export const RpcGrpcStatusCodeValues: RpcGrpcStatusCodeValues = { + OK: RPCGRPCSTATUSCODEVALUES_OK, + CANCELLED: RPCGRPCSTATUSCODEVALUES_CANCELLED, + UNKNOWN: RPCGRPCSTATUSCODEVALUES_UNKNOWN, + INVALID_ARGUMENT: RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT, + DEADLINE_EXCEEDED: RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED, + NOT_FOUND: RPCGRPCSTATUSCODEVALUES_NOT_FOUND, + ALREADY_EXISTS: RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS, + PERMISSION_DENIED: RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED, + RESOURCE_EXHAUSTED: RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED, + FAILED_PRECONDITION: RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION, + ABORTED: RPCGRPCSTATUSCODEVALUES_ABORTED, + OUT_OF_RANGE: RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE, + UNIMPLEMENTED: RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED, + INTERNAL: RPCGRPCSTATUSCODEVALUES_INTERNAL, + UNAVAILABLE: RPCGRPCSTATUSCODEVALUES_UNAVAILABLE, + DATA_LOSS: RPCGRPCSTATUSCODEVALUES_DATA_LOSS, + UNAUTHENTICATED: RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED, +}; + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessageTypeValues enum definition + * + * Whether this is a received or sent message. + * ---------------------------------------------------------------------------------------------------------- */ + +/** + * Whether this is a received or sent message. + */ +export const MESSAGETYPEVALUES_SENT = 'SENT'; -export const MessageTypeValues = { +/** + * Whether this is a received or sent message. + */ +export const MESSAGETYPEVALUES_RECEIVED = 'RECEIVED'; + +/** + * Identifies the Values for MessageTypeValues enum definition + * + * Whether this is a received or sent message. + * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification. + */ +export type MessageTypeValues = { /** sent. */ - SENT: 'SENT', + SENT: 'SENT'; /** received. */ - RECEIVED: 'RECEIVED', -} as const; -export type MessageTypeValues = - (typeof MessageTypeValues)[keyof typeof MessageTypeValues]; + RECEIVED: 'RECEIVED'; +}; + +/** + * The constant map of values for MessageTypeValues. + * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification. + */ +export const MessageTypeValues: MessageTypeValues = { + SENT: MESSAGETYPEVALUES_SENT, + RECEIVED: MESSAGETYPEVALUES_RECEIVED, +}; diff --git a/scripts/semconv/generate.sh b/scripts/semconv/generate.sh index dbd99464eac..84d49e91c9a 100755 --- a/scripts/semconv/generate.sh +++ b/scripts/semconv/generate.sh @@ -5,7 +5,11 @@ ROOT_DIR="${SCRIPT_DIR}/../../" # freeze the spec version to make SpanAttributess generation reproducible SPEC_VERSION=v1.7.0 -GENERATOR_VERSION=0.7.0 +GENERATOR_VERSION=0.8.0 + +# When running on windows and your are getting references to ";C" (like Telemetry;C) +# then this is an issue with the bash shell, so first run the following in your shell: +# export MSYS_NO_PATHCONV=1 cd ${SCRIPT_DIR} @@ -28,7 +32,8 @@ docker run --rm \ code \ --template /templates/SemanticAttributes.ts.j2 \ --output /output/SemanticAttributes.ts \ - -Dclass=SemanticAttributes + -Dclass=SemanticAttributes \ + -Dcls_prefix=SEMATTRS docker run --rm \ -v ${SCRIPT_DIR}/opentelemetry-specification/semantic_conventions/resource:/source \ @@ -39,7 +44,8 @@ docker run --rm \ code \ --template /templates/SemanticAttributes.ts.j2 \ --output /output/SemanticResourceAttributes.ts \ - -Dclass=SemanticResourceAttributes + -Dclass=SemanticResourceAttributes \ + -Dcls_prefix=SEMRESATTRS # Run the automatic linting fixing task to ensure it will pass eslint cd "$ROOT_DIR" diff --git a/scripts/semconv/templates/SemanticAttributes.ts.j2 b/scripts/semconv/templates/SemanticAttributes.ts.j2 index eb144b93b26..65bb183b969 100644 --- a/scripts/semconv/templates/SemanticAttributes.ts.j2 +++ b/scripts/semconv/templates/SemanticAttributes.ts.j2 @@ -13,7 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +{#- Coding the constants in the template instead of passing via cmd line as the maximum length got exceeded #} +{%- set strings = namespace(dotConstants="", constants="") %} +{%- if class == "SemanticAttributes" %} +{%- set strings.dotConstants= "db,carrier,cassandra,code,coordinator,document,dynamodb,enduser,exception,faas,http,jsonrpc,kafka,lambda,messaging,mongodb,mssql,net,peer,rpc,thread" %} +{%- set strings.constants= "aws,azure,content,collection,compressed,connection,global,host,id,index,instance,invoked,length,local,message,name,port,protocol,provisioned,read,request,response,secondary,space,type,un,version,write" %} +{%- else %} +{%- set strings.dotConstants= "account,cloud,container,cluster,deployment,device,ecs,eks,executable,faas,group,k8s,log,image,model,node,os,process,runtime,sdk,service,set,stream,task,telemetry,webengine" %} +{%- set strings.constants= "arn,aws,azure,command,cron,daemon,description,host,id,instance,job,name,replica,space,stateful,type,uid,version" %} +{% endif %} +{%- set dotConstants = strings.dotConstants.split(",")|sort(reverse=true, attribute=len) %} +{%- set constants = strings.constants.split(",")|sort(reverse=true, attribute=len) %} +import { createConstMap } from '../internal/utils'; +import { DOT, UNDERSCORE, {% for val in dotConstants %}{{val|upper}}_DOT, {% endfor %}{% for val in constants %}{{val|upper}}, {% endfor %} } from '../internal/constants'; {%- macro print_value(type, value) -%} {{ "'" if type == "string"}}{{value}}{{ "'" if type == "string"}} @@ -24,9 +37,74 @@ {%- macro lowerFirst(text) -%} {{ text[0]|lower}}{{text[1:] }} {%- endmacro %} +{%- macro format_value(type, value, depth = 0, orgValue = value) -%} + {%- if type == "string" %} + {%- set ns = namespace(done=false) %} + {%- for val in dotConstants %} + {%- if value.startswith(val ~ ".") %} + {{val|upper}}_DOT + {{ format_value(type, value[((val|length)+1):], depth + 1, orgValue) }} + {%- set ns.done = true %} + {%- endif %} + {%- endfor %} + {%- if not ns.done %} + {%- for val in constants %} + {%- if value == val %} + {{val|upper}} as '{{orgValue}}' + {%- set ns.done = true %} + {%- elif value.startswith(val) %} + {{val|upper}} + {{ format_value(type, value[(val|length):], depth + 1, orgValue) }} + {%- set ns.done = true %} + {%- endif %} + {%- endfor %} + {%- endif %} + {%- if not ns.done %} + {%- if value.startswith("_") %} + UNDERSCORE + {{ format_value(type, value[1:], depth + 1, orgValue) }} + {%- set ns.done = true %} + {%- elif value.startswith(".") %} + DOT + {{ format_value(type, value[1:], depth + 1, orgValue) }} + {%- set ns.done = true %} + {%- endif %} + {%- endif %} + {%- if not ns.done %} + '{{value}}'{% if depth > 0 %} as '{{orgValue}}'{% endif %} + {%- endif %} + {%- else %}{{value}}{%- endif %} +{%- endmacro %} +//---------------------------------------------------------------------------------------------------------- // DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/{{template}} -export const {{class}} = { +//---------------------------------------------------------------------------------------------------------- + +//---------------------------------------------------------------------------------------------------------- +// Constant values for {{class}} +//---------------------------------------------------------------------------------------------------------- + +{%- for attribute in attributes if attribute.is_local and not attribute.ref %} + +/** +* {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} + {%- if attribute.note %} +* +* Note: {% filter escape %}{{attribute.note | to_doc_brief}}.{% endfilter %} + {%- endif %} + {%- if attribute.deprecated %} +* +* @deprecated {{attribute.deprecated | to_doc_brief}}. + {%- endif %} +*/ +export const {{cls_prefix}}_{{attribute.fqn | to_const_name}} = {{ format_value ("string", attribute.fqn) }}; + +{%- endfor %} + +/** + * Definition of available values for {{class}} + * This type is used for backward compatibility, you should use the individual exported + * constants {{class}}_XXXXX rather than the exported constant map. As any single reference + * to a constant map value will result in all strings being included into your bundle. + * @deprecated Use the {{cls_prefix}}_XXXXX constants rather than the {{class}}.XXXXX for bundle minification. + */ +export type {{class}} = { {%- for attribute in attributes if attribute.is_local and not attribute.ref %} /** @@ -42,21 +120,87 @@ export const {{class}} = { */ {{attribute.fqn | to_const_name}}: '{{attribute.fqn}}', {%- endfor %} -} +}; + +/** + * Create exported Value Map for {{class}} values + * @deprecated Use the {{cls_prefix}}_XXXXX constants rather than the {{class}}.XXXXX for bundle minification + */ +export const {{class}}:{{class}} = createConstMap<{{class}}>([ + {%- for attribute in attributes if attribute.is_local and not attribute.ref %} + {{cls_prefix}}_{{attribute.fqn | to_const_name}}, + {%- endfor %} +]); {%- for attribute in attributes if attribute.is_local and not attribute.ref %} {%- if attribute.is_enum %} {%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %} {%- set type = attribute.attr_type.enum_type %} -{% if attribute.attr_type.members is defined and attribute.attr_type.members|length > 0 %} -export const {{class_name}} = { +{%- if attribute.attr_type.members is defined and attribute.attr_type.members|length > 0 %} + +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for {{class_name}} enum definition + * + * {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} + {%- if attribute.note %} + * + * Note: {% filter escape %}{{attribute.note | to_doc_brief}}.{% endfilter %} + {%- endif %} + {%- if attribute.deprecated %} + * + * @deprecated {{attribute.deprecated | to_doc_brief}}. + {%- endif %} + * ---------------------------------------------------------------------------------------------------------- */ + +{%- for member in attribute.attr_type.members if attribute.is_local and not attribute.ref %} + +/** + * {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} + {%- if attribute.note %} + * + * Note: {% filter escape %}{{attribute.note | to_doc_brief}}.{% endfilter %} + {%- endif %} + {%- if attribute.deprecated %} + * + * @deprecated {{attribute.deprecated | to_doc_brief}}. + {%- endif %} + */ +export const {{class_name|upper}}_{{ member.member_id | to_const_name }} = {{ format_value(type, member.value) }}; + +{%- endfor %} + +/** + * Identifies the Values for {{class_name}} enum definition + * + * {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} + {%- if attribute.note %} + * + * Note: {% filter escape %}{{attribute.note | to_doc_brief}}.{% endfilter %} + {%- endif %} + {%- if attribute.deprecated %} + * + * @deprecated {{attribute.deprecated | to_doc_brief}}. Use the {{class_name | upper}}_XXXXX constants rather than the {{class_name}}.XXXXX for bundle minification. + {%- else %} + * @deprecated Use the {{class_name | upper}}_XXXXX constants rather than the {{class_name}}.XXXXX for bundle minification. + {%- endif %} + */ +export type {{class_name}} = { {%- for member in attribute.attr_type.members if attribute.is_local and not attribute.ref %} /** {% filter escape %}{{member.brief | to_doc_brief}}.{% endfilter %} */ {{ member.member_id | to_const_name }}: {{ print_value(type, member.value) }}, {%- endfor %} -} as const -export type {{class_name}} = typeof {{class_name}}[keyof typeof {{class_name}}] +} + +/** + * The constant map of values for {{class_name}}. + * @deprecated Use the {{class_name | upper}}_XXXXX constants rather than the {{class_name}}.XXXXX for bundle minification. + */ +export const {{class_name}}:{{class_name}} = { + {%- for member in attribute.attr_type.members if attribute.is_local and not attribute.ref %} + {{ member.member_id | to_const_name }}: {{class_name|upper}}_{{ member.member_id | to_const_name }}, + {%- endfor %} + }; {% endif %} {% endif %}