Skip to content

Commit ea50096

Browse files
authored
update generated semantic convention classes to v1.16.0 (#5033)
1 parent 4633cfe commit ea50096

File tree

3 files changed

+52
-9
lines changed

3 files changed

+52
-9
lines changed

buildscripts/semantic-convention/generate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
ROOT_DIR="${SCRIPT_DIR}/../../"
55

66
# freeze the spec & generator tools versions to make SemanticAttributes generation reproducible
7-
SEMCONV_VERSION=1.15.0
7+
SEMCONV_VERSION=1.16.0
88
SPEC_VERSION=v$SEMCONV_VERSION
99
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
1010
GENERATOR_VERSION=0.14.0

semconv/src/main/java/io/opentelemetry/semconv/resource/attributes/ResourceAttributes.java

+18-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@SuppressWarnings("unused")
1919
public final class ResourceAttributes {
2020
/** The URL of the OpenTelemetry schema for these keys and values. */
21-
public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0";
21+
public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.16.0";
2222

2323
/**
2424
* Array of brand name and version separated by a space
@@ -404,7 +404,11 @@ public final class ResourceAttributes {
404404
*/
405405
public static final AttributeKey<Long> FAAS_MAX_MEMORY = longKey("faas.max_memory");
406406

407-
/** Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. */
407+
/**
408+
* Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For
409+
* non-containerized Linux systems, the {@code machine-id} located in {@code /etc/machine-id} or
410+
* {@code /var/lib/dbus/machine-id} may be used.
411+
*/
408412
public static final AttributeKey<String> HOST_ID = stringKey("host.id");
409413

410414
/**
@@ -672,6 +676,8 @@ public static final class CloudProviderValues {
672676
public static final String AZURE = "azure";
673677
/** Google Cloud Platform. */
674678
public static final String GCP = "gcp";
679+
/** IBM Cloud. */
680+
public static final String IBM_CLOUD = "ibm_cloud";
675681
/** Tencent Cloud. */
676682
public static final String TENCENT_CLOUD = "tencent_cloud";
677683

@@ -683,6 +689,8 @@ public static final class CloudPlatformValues {
683689
public static final String ALIBABA_CLOUD_ECS = "alibaba_cloud_ecs";
684690
/** Alibaba Cloud Function Compute. */
685691
public static final String ALIBABA_CLOUD_FC = "alibaba_cloud_fc";
692+
/** Red Hat OpenShift on Alibaba Cloud. */
693+
public static final String ALIBABA_CLOUD_OPENSHIFT = "alibaba_cloud_openshift";
686694
/** AWS Elastic Compute Cloud. */
687695
public static final String AWS_EC2 = "aws_ec2";
688696
/** AWS Elastic Container Service. */
@@ -695,6 +703,8 @@ public static final class CloudPlatformValues {
695703
public static final String AWS_ELASTIC_BEANSTALK = "aws_elastic_beanstalk";
696704
/** AWS App Runner. */
697705
public static final String AWS_APP_RUNNER = "aws_app_runner";
706+
/** Red Hat OpenShift on AWS (ROSA). */
707+
public static final String AWS_OPENSHIFT = "aws_openshift";
698708
/** Azure Virtual Machines. */
699709
public static final String AZURE_VM = "azure_vm";
700710
/** Azure Container Instances. */
@@ -705,6 +715,8 @@ public static final class CloudPlatformValues {
705715
public static final String AZURE_FUNCTIONS = "azure_functions";
706716
/** Azure App Service. */
707717
public static final String AZURE_APP_SERVICE = "azure_app_service";
718+
/** Azure Red Hat OpenShift. */
719+
public static final String AZURE_OPENSHIFT = "azure_openshift";
708720
/** Google Cloud Compute Engine (GCE). */
709721
public static final String GCP_COMPUTE_ENGINE = "gcp_compute_engine";
710722
/** Google Cloud Run. */
@@ -715,6 +727,10 @@ public static final class CloudPlatformValues {
715727
public static final String GCP_CLOUD_FUNCTIONS = "gcp_cloud_functions";
716728
/** Google Cloud App Engine (GAE). */
717729
public static final String GCP_APP_ENGINE = "gcp_app_engine";
730+
/** Red Hat OpenShift on Google Cloud. */
731+
public static final String GOOGLE_CLOUD_OPENSHIFT = "google_cloud_openshift";
732+
/** Red Hat OpenShift on IBM Cloud. */
733+
public static final String IBM_CLOUD_OPENSHIFT = "ibm_cloud_openshift";
718734
/** Tencent Cloud Cloud Virtual Machine (CVM). */
719735
public static final String TENCENT_CLOUD_CVM = "tencent_cloud_cvm";
720736
/** Tencent Cloud Elastic Kubernetes Service (EKS). */

semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/SemanticAttributes.java

+33-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@SuppressWarnings("unused")
2020
public final class SemanticAttributes {
2121
/** The URL of the OpenTelemetry schema for these keys and values. */
22-
public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.15.0";
22+
public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.16.0";
2323

2424
/**
2525
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
@@ -40,15 +40,13 @@ public final class SemanticAttributes {
4040
public static final AttributeKey<String> EVENT_NAME = stringKey("event.name");
4141

4242
/**
43-
* The domain identifies the context in which an event happened. An event name is unique only
44-
* within a domain.
43+
* The domain identifies the business context for the events.
4544
*
4645
* <p>Notes:
4746
*
4847
* <ul>
49-
* <li>An {@code event.name} is supposed to be unique only in the context of an {@code
50-
* event.domain}, so this allows for two events in different domains to have same {@code
51-
* event.name}, yet be unrelated events.
48+
* <li>Events across different domains may have same {@code event.name}, yet be unrelated
49+
* events.
5250
* </ul>
5351
*/
5452
public static final AttributeKey<String> EVENT_DOMAIN = stringKey("event.domain");
@@ -398,6 +396,31 @@ public final class SemanticAttributes {
398396
*/
399397
public static final AttributeKey<String> FAAS_INVOKED_REGION = stringKey("faas.invoked_region");
400398

399+
/** The unique identifier of the feature flag. */
400+
public static final AttributeKey<String> FEATURE_FLAG_KEY = stringKey("feature_flag.key");
401+
402+
/** The name of the service provider that performs the flag evaluation. */
403+
public static final AttributeKey<String> FEATURE_FLAG_PROVIDER_NAME =
404+
stringKey("feature_flag.provider_name");
405+
406+
/**
407+
* SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of
408+
* the value can be used.
409+
*
410+
* <p>Notes:
411+
*
412+
* <ul>
413+
* <li>A semantic identifier, commonly referred to as a variant, provides a means for referring
414+
* to a value without including the value itself. This can provide additional context for
415+
* understanding the meaning behind a value. For example, the variant {@code red} maybe be
416+
* used for the value {@code #c05543}.
417+
* <li>A stringified version of the value can be used in situations where a semantic identifier
418+
* is unavailable. String representation of the value should be determined by the
419+
* implementer.
420+
* </ul>
421+
*/
422+
public static final AttributeKey<String> FEATURE_FLAG_VARIANT = stringKey("feature_flag.variant");
423+
401424
/** Transport protocol used. See note below. */
402425
public static final AttributeKey<String> NET_TRANSPORT = stringKey("net.transport");
403426

@@ -867,6 +890,10 @@ public final class SemanticAttributes {
867890
public static final AttributeKey<Long> MESSAGING_KAFKA_PARTITION =
868891
longKey("messaging.kafka.partition");
869892

893+
/** The offset of a record in the corresponding Kafka partition. */
894+
public static final AttributeKey<Long> MESSAGING_KAFKA_MESSAGE_OFFSET =
895+
longKey("messaging.kafka.message.offset");
896+
870897
/** A boolean that is true if the message is a tombstone. */
871898
public static final AttributeKey<Boolean> MESSAGING_KAFKA_TOMBSTONE =
872899
booleanKey("messaging.kafka.tombstone");

0 commit comments

Comments
 (0)