From a65594cb63f4c6f2ad90135fe0d6b7b39df54f61 Mon Sep 17 00:00:00 2001 From: John Watson Date: Thu, 8 Dec 2022 20:58:53 -0800 Subject: [PATCH] update generated semantic convention classes to v1.16.0 --- buildscripts/semantic-convention/generate.sh | 2 +- .../attributes/ResourceAttributes.java | 20 +++++++++- .../trace/attributes/SemanticAttributes.java | 39 ++++++++++++++++--- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh index f94645157d8..a9718384152 100755 --- a/buildscripts/semantic-convention/generate.sh +++ b/buildscripts/semantic-convention/generate.sh @@ -4,7 +4,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="${SCRIPT_DIR}/../../" # freeze the spec & generator tools versions to make SemanticAttributes generation reproducible -SEMCONV_VERSION=1.15.0 +SEMCONV_VERSION=1.16.0 SPEC_VERSION=v$SEMCONV_VERSION SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION GENERATOR_VERSION=0.14.0 diff --git a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java index 651af884035..147b12f0c35 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java @@ -18,7 +18,7 @@ @SuppressWarnings("unused") public final class ResourceAttributes { /** The URL of the OpenTelemetry schema for these keys and values. */ - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.16.0"; /** * Array of brand name and version separated by a space @@ -404,7 +404,11 @@ public final class ResourceAttributes { */ public static final AttributeKey FAAS_MAX_MEMORY = longKey("faas.max_memory"); - /** Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. */ + /** + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For + * non-containerized Linux systems, the {@code machine-id} located in {@code /etc/machine-id} or + * {@code /var/lib/dbus/machine-id} may be used. + */ public static final AttributeKey HOST_ID = stringKey("host.id"); /** @@ -672,6 +676,8 @@ public static final class CloudProviderValues { public static final String AZURE = "azure"; /** Google Cloud Platform. */ public static final String GCP = "gcp"; + /** IBM Cloud. */ + public static final String IBM_CLOUD = "ibm_cloud"; /** Tencent Cloud. */ public static final String TENCENT_CLOUD = "tencent_cloud"; @@ -683,6 +689,8 @@ public static final class CloudPlatformValues { public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs"; /** Alibaba Cloud Function Compute. */ public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc"; + /** Red Hat OpenShift on Alibaba Cloud. */ + public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift"; /** AWS Elastic Compute Cloud. */ public static final String AWS_EC2 = "aws_ec2"; /** AWS Elastic Container Service. */ @@ -695,6 +703,8 @@ public static final class CloudPlatformValues { public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk"; /** AWS App Runner. */ public static final String AWS_APP_RUNNER = "aws_app_runner"; + /** Red Hat OpenShift on AWS (ROSA). */ + public static final String AWS_OPENSHIFT = "aws_openshift"; /** Azure Virtual Machines. */ public static final String AZURE_VM = "azure_vm"; /** Azure Container Instances. */ @@ -705,6 +715,8 @@ public static final class CloudPlatformValues { public static final String AZURE_FUNCTIONS = "azure_functions"; /** Azure App Service. */ public static final String AZURE_APP_SERVICE = "azure_app_service"; + /** Azure Red Hat OpenShift. */ + public static final String AZURE_OPENSHIFT = "azure_openshift"; /** Google Cloud Compute Engine (GCE). */ public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine"; /** Google Cloud Run. */ @@ -715,6 +727,10 @@ public static final class CloudPlatformValues { public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions"; /** Google Cloud App Engine (GAE). */ public static final String GCP_APP_ENGINE = "gcp_app_engine"; + /** Red Hat OpenShift on Google Cloud. */ + public static final String GOOGLE_CLOUD_OPENSHIFT = "google_cloud_openshift"; + /** Red Hat OpenShift on IBM Cloud. */ + public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift"; /** Tencent Cloud Cloud Virtual Machine (CVM). */ public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm"; /** Tencent Cloud Elastic Kubernetes Service (EKS). */ diff --git a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java index c74f98bd9fa..0f6af600ad1 100644 --- a/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java +++ b/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java @@ -19,7 +19,7 @@ @SuppressWarnings("unused") public final class SemanticAttributes { /** The URL of the OpenTelemetry schema for these keys and values. */ - public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.16.0"; /** * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of @@ -40,15 +40,13 @@ public final class SemanticAttributes { public static final AttributeKey EVENT_NAME = stringKey("event.name"); /** - * The domain identifies the context in which an event happened. An event name is unique only - * within a domain. + * The domain identifies the business context for the events. * *

Notes: * *

    - *
  • An {@code event.name} is supposed to be unique only in the context of an {@code - * event.domain}, so this allows for two events in different domains to have same {@code - * event.name}, yet be unrelated events. + *
  • Events across different domains may have same {@code event.name}, yet be unrelated + * events. *
*/ public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); @@ -398,6 +396,31 @@ public final class SemanticAttributes { */ public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region"); + /** The unique identifier of the feature flag. */ + public static final AttributeKey FEATURE_FLAG_KEY = stringKey("feature_flag.key"); + + /** The name of the service provider that performs the flag evaluation. */ + public static final AttributeKey FEATURE_FLAG_PROVIDER_NAME = + stringKey("feature_flag.provider_name"); + + /** + * SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of + * the value can be used. + * + *

Notes: + * + *

    + *
  • A semantic identifier, commonly referred to as a variant, provides a means for referring + * to a value without including the value itself. This can provide additional context for + * understanding the meaning behind a value. For example, the variant {@code red} maybe be + * used for the value {@code #c05543}. + *
  • A stringified version of the value can be used in situations where a semantic identifier + * is unavailable. String representation of the value should be determined by the + * implementer. + *
+ */ + public static final AttributeKey FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant"); + /** Transport protocol used. See note below. */ public static final AttributeKey NET_TRANSPORT = stringKey("net.transport"); @@ -867,6 +890,10 @@ public final class SemanticAttributes { public static final AttributeKey MESSAGING_KAFKA_PARTITION = longKey("messaging.kafka.partition"); + /** The offset of a record in the corresponding Kafka partition. */ + public static final AttributeKey MESSAGING_KAFKA_MESSAGE_OFFSET = + longKey("messaging.kafka.message.offset"); + /** A boolean that is true if the message is a tombstone. */ public static final AttributeKey MESSAGING_KAFKA_TOMBSTONE = booleanKey("messaging.kafka.tombstone");