Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semconv codegen should produce different constant names if attribute is renamed _ -> `` #3927

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@

from enum import Enum

AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions"
AWS_DYNAMODB_ATTRIBUTEDEFINITIONS = "aws.dynamodb.attribute_definitions"
"""
The JSON-serialized value of each item in the `AttributeDefinitions` request field.
"""

AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get"
AWS_DYNAMODB_ATTRIBUTESTOGET = "aws.dynamodb.attributes_to_get"
"""
The value of the `AttributesToGet` request parameter.
"""

AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read"
AWS_DYNAMODB_CONSISTENTREAD = "aws.dynamodb.consistent_read"
"""
The value of the `ConsistentRead` request parameter.
"""

AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity"
AWS_DYNAMODB_CONSUMEDCAPACITY = "aws.dynamodb.consumed_capacity"
"""
The JSON-serialized value of each item in the `ConsumedCapacity` response field.
"""
Expand All @@ -40,29 +40,29 @@
The value of the `Count` response parameter.
"""

AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table"
AWS_DYNAMODB_EXCLUSIVESTARTTABLE = "aws.dynamodb.exclusive_start_table"
"""
The value of the `ExclusiveStartTableName` request parameter.
"""

AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = (
AWS_DYNAMODB_GLOBALSECONDARYINDEXUPDATES = (
"aws.dynamodb.global_secondary_index_updates"
)
"""
The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field.
"""

AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes"
AWS_DYNAMODB_GLOBALSECONDARYINDEXES = "aws.dynamodb.global_secondary_indexes"
"""
The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.
"""

AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name"
AWS_DYNAMODB_INDEXNAME = "aws.dynamodb.index_name"
"""
The value of the `IndexName` request parameter.
"""

AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics"
AWS_DYNAMODB_ITEMCOLLECTIONMETRICS = "aws.dynamodb.item_collection_metrics"
"""
The JSON-serialized value of the `ItemCollectionMetrics` response field.
"""
Expand All @@ -72,7 +72,7 @@
The value of the `Limit` request parameter.
"""

AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes"
AWS_DYNAMODB_LOCALSECONDARYINDEXES = "aws.dynamodb.local_secondary_indexes"
"""
The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.
"""
Expand All @@ -82,26 +82,24 @@
The value of the `ProjectionExpression` request parameter.
"""

AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = (
"aws.dynamodb.provisioned_read_capacity"
)
AWS_DYNAMODB_PROVISIONEDREADCAPACITY = "aws.dynamodb.provisioned_read_capacity"
"""
The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
"""

AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = (
AWS_DYNAMODB_PROVISIONEDWRITECAPACITY = (
"aws.dynamodb.provisioned_write_capacity"
)
"""
The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.
"""

AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward"
AWS_DYNAMODB_SCANFORWARD = "aws.dynamodb.scan_forward"
"""
The value of the `ScanIndexForward` request parameter.
"""

AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count"
AWS_DYNAMODB_SCANNEDCOUNT = "aws.dynamodb.scanned_count"
"""
The value of the `ScannedCount` response parameter.
"""
Expand All @@ -116,17 +114,17 @@
The value of the `Select` request parameter.
"""

AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count"
AWS_DYNAMODB_TABLECOUNT = "aws.dynamodb.table_count"
"""
The number of items in the `TableNames` response parameter.
"""

AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names"
AWS_DYNAMODB_TABLENAMES = "aws.dynamodb.table_names"
"""
The keys in the `RequestItems` object field.
"""

AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments"
AWS_DYNAMODB_TOTALSEGMENTS = "aws.dynamodb.total_segments"
"""
The value of the `TotalSegments` request parameter.
"""
Expand Down Expand Up @@ -171,7 +169,7 @@
The ARN of an EKS cluster.
"""

AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn"
AWS_LAMBDA_INVOKEDARN = "aws.lambda.invoked_arn"
"""
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 `cloud.resource_id` if an alias is involved.
Expand Down Expand Up @@ -200,7 +198,7 @@
The name(s) of the AWS log stream(s) an application is writing to.
"""

AWS_REQUEST_ID = "aws.request_id"
AWS_REQUESTID = "aws.request_id"
"""
The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
"""
Expand All @@ -212,7 +210,7 @@
This applies to almost all S3 operations except `list-buckets`.
"""

AWS_S3_COPY_SOURCE = "aws.s3.copy_source"
AWS_S3_COPYSOURCE = "aws.s3.copy_source"
"""
The source object (in the form `bucket`/`key`) for the copy operation.
Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter
Expand Down Expand Up @@ -252,7 +250,7 @@
- [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).
"""

AWS_S3_PART_NUMBER = "aws.s3.part_number"
AWS_S3_PARTNUMBER = "aws.s3.part_number"
"""
The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.
Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
Expand All @@ -261,7 +259,7 @@
[upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
"""

AWS_S3_UPLOAD_ID = "aws.s3.upload_id"
AWS_S3_UPLOADID = "aws.s3.upload_id"
"""
Upload ID that identifies the multipart upload.
Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
The cloud account ID the resource is assigned to.
"""

CLOUD_AVAILABILITY_ZONE = "cloud.availability_zone"
CLOUD_AVAILABILITYZONE = "cloud.availability_zone"
"""
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.
Expand All @@ -43,7 +43,7 @@
Note: 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/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091).
"""

CLOUD_RESOURCE_ID = "cloud.resource_id"
CLOUD_RESOURCEID = "cloud.resource_id"
"""
Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP).
Note: On some cloud providers, it may not be possible to determine the full ID at startup,
Expand All @@ -67,66 +67,66 @@


class CloudPlatformValues(Enum):
ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"
ALIBABACLOUDECS = "alibaba_cloud_ecs"
"""Alibaba Cloud Elastic Compute Service."""
ALIBABA_CLOUD_FC = "alibaba_cloud_fc"
ALIBABACLOUDFC = "alibaba_cloud_fc"
"""Alibaba Cloud Function Compute."""
ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"
ALIBABACLOUDOPENSHIFT = "alibaba_cloud_openshift"
"""Red Hat OpenShift on Alibaba Cloud."""
AWS_EC2 = "aws_ec2"
AWSEC2 = "aws_ec2"
"""AWS Elastic Compute Cloud."""
AWS_ECS = "aws_ecs"
AWSECS = "aws_ecs"
"""AWS Elastic Container Service."""
AWS_EKS = "aws_eks"
AWSEKS = "aws_eks"
"""AWS Elastic Kubernetes Service."""
AWS_LAMBDA = "aws_lambda"
AWSLAMBDA = "aws_lambda"
"""AWS Lambda."""
AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"
AWSELASTICBEANSTALK = "aws_elastic_beanstalk"
"""AWS Elastic Beanstalk."""
AWS_APP_RUNNER = "aws_app_runner"
AWSAPPRUNNER = "aws_app_runner"
"""AWS App Runner."""
AWS_OPENSHIFT = "aws_openshift"
AWSOPENSHIFT = "aws_openshift"
"""Red Hat OpenShift on AWS (ROSA)."""
AZURE_VM = "azure_vm"
AZUREVM = "azure_vm"
"""Azure Virtual Machines."""
AZURE_CONTAINER_APPS = "azure_container_apps"
AZURECONTAINERAPPS = "azure_container_apps"
"""Azure Container Apps."""
AZURE_CONTAINER_INSTANCES = "azure_container_instances"
AZURECONTAINERINSTANCES = "azure_container_instances"
"""Azure Container Instances."""
AZURE_AKS = "azure_aks"
AZUREAKS = "azure_aks"
"""Azure Kubernetes Service."""
AZURE_FUNCTIONS = "azure_functions"
AZUREFUNCTIONS = "azure_functions"
"""Azure Functions."""
AZURE_APP_SERVICE = "azure_app_service"
AZUREAPPSERVICE = "azure_app_service"
"""Azure App Service."""
AZURE_OPENSHIFT = "azure_openshift"
AZUREOPENSHIFT = "azure_openshift"
"""Azure Red Hat OpenShift."""
GCP_BARE_METAL_SOLUTION = "gcp_bare_metal_solution"
GCPBAREMETALSOLUTION = "gcp_bare_metal_solution"
"""Google Bare Metal Solution (BMS)."""
GCP_COMPUTE_ENGINE = "gcp_compute_engine"
GCPCOMPUTEENGINE = "gcp_compute_engine"
"""Google Cloud Compute Engine (GCE)."""
GCP_CLOUD_RUN = "gcp_cloud_run"
GCPCLOUDRUN = "gcp_cloud_run"
"""Google Cloud Run."""
GCP_KUBERNETES_ENGINE = "gcp_kubernetes_engine"
GCPKUBERNETESENGINE = "gcp_kubernetes_engine"
"""Google Cloud Kubernetes Engine (GKE)."""
GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"
GCPCLOUDFUNCTIONS = "gcp_cloud_functions"
"""Google Cloud Functions (GCF)."""
GCP_APP_ENGINE = "gcp_app_engine"
GCPAPPENGINE = "gcp_app_engine"
"""Google Cloud App Engine (GAE)."""
GCP_OPENSHIFT = "gcp_openshift"
GCPOPENSHIFT = "gcp_openshift"
"""Red Hat OpenShift on Google Cloud."""
IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"
IBMCLOUDOPENSHIFT = "ibm_cloud_openshift"
"""Red Hat OpenShift on IBM Cloud."""
TENCENT_CLOUD_CVM = "tencent_cloud_cvm"
TENCENTCLOUDCVM = "tencent_cloud_cvm"
"""Tencent Cloud Cloud Virtual Machine (CVM)."""
TENCENT_CLOUD_EKS = "tencent_cloud_eks"
TENCENTCLOUDEKS = "tencent_cloud_eks"
"""Tencent Cloud Elastic Kubernetes Service (EKS)."""
TENCENT_CLOUD_SCF = "tencent_cloud_scf"
TENCENTCLOUDSCF = "tencent_cloud_scf"
"""Tencent Cloud Serverless Cloud Function (SCF)."""


class CloudProviderValues(Enum):
ALIBABA_CLOUD = "alibaba_cloud"
ALIBABACLOUD = "alibaba_cloud"
"""Alibaba Cloud."""
AWS = "aws"
"""Amazon Web Services."""
Expand All @@ -136,7 +136,7 @@ class CloudProviderValues(Enum):
"""Google Cloud Platform."""
HEROKU = "heroku"
"""Heroku Platform as a Service."""
IBM_CLOUD = "ibm_cloud"
IBMCLOUD = "ibm_cloud"
"""IBM Cloud."""
TENCENT_CLOUD = "tencent_cloud"
TENCENTCLOUD = "tencent_cloud"
"""Tencent Cloud."""
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
# limitations under the License.


CLOUDEVENTS_EVENT_ID = "cloudevents.event_id"
CLOUDEVENTS_EVENTID = "cloudevents.event_id"
"""
The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.
"""

CLOUDEVENTS_EVENT_SOURCE = "cloudevents.event_source"
CLOUDEVENTS_EVENTSOURCE = "cloudevents.event_source"
"""
The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.
"""

CLOUDEVENTS_EVENT_SPEC_VERSION = "cloudevents.event_spec_version"
CLOUDEVENTS_EVENTSPECVERSION = "cloudevents.event_spec_version"
"""
The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.
"""

CLOUDEVENTS_EVENT_SUBJECT = "cloudevents.event_subject"
CLOUDEVENTS_EVENTSUBJECT = "cloudevents.event_subject"
"""
The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).
"""

CLOUDEVENTS_EVENT_TYPE = "cloudevents.event_type"
CLOUDEVENTS_EVENTTYPE = "cloudevents.event_type"
"""
The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
Note: If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.
"""

CONTAINER_COMMAND_ARGS = "container.command_args"
CONTAINER_COMMANDARGS = "container.command_args"
"""
All the command arguments (including the command/executable itself) run by the container. [2].
"""

CONTAINER_COMMAND_LINE = "container.command_line"
CONTAINER_COMMANDLINE = "container.command_line"
"""
The full command run by the container as a single string representing the full command. [2].
"""
Expand Down Expand Up @@ -54,7 +54,7 @@
Name of the image the container was built on.
"""

CONTAINER_IMAGE_REPO_DIGESTS = "container.image.repo_digests"
CONTAINER_IMAGE_REPODIGESTS = "container.image.repo_digests"
"""
Repo digests of the container image as provided by the container runtime.
Note: [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.
Expand Down
Loading
Loading