From 6266b16b0f847badba27956f5275fd0754aa0eb1 Mon Sep 17 00:00:00 2001 From: John Watson Date: Mon, 14 Feb 2022 18:38:26 -0800 Subject: [PATCH] Update the semantic convention constants to v1.9.0 (#4174) --- buildscripts/semantic-convention/generate.sh | 2 +- .../attributes/ResourceAttributes.java | 15 ++++++++++++- .../trace/attributes/SemanticAttributes.java | 22 ++++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh index 809f564fbe..aeed653fef 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.8.0 +SEMCONV_VERSION=1.9.0 SPEC_VERSION=v$SEMCONV_VERSION SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION GENERATOR_VERSION=0.7.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 562e18ca95..67ae90e04d 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 @@ -16,7 +16,7 @@ import java.util.List; // buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 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.8.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.9.0"; /** Name of the cloud provider. */ public static final AttributeKey CLOUD_PROVIDER = stringKey("cloud.provider"); @@ -223,6 +223,19 @@ public final class ResourceAttributes { */ public static final AttributeKey DEVICE_MODEL_NAME = stringKey("device.model.name"); + /** + * The name of the device manufacturer + * + *

Notes: + * + *

    + *
  • The Android OS provides this field via Build. + * iOS apps SHOULD hardcode the value {@code Apple}. + *
+ */ + public static final AttributeKey DEVICE_MANUFACTURER = stringKey("device.manufacturer"); + /** * The name of the single function that this runtime instance executes. * 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 13764bf3fe..8102157588 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 @@ -18,7 +18,7 @@ import java.util.List; // buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 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.8.0"; + public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.9.0"; /** * The full invoked ARN as provided on the {@code Context} passed to the function ({@code @@ -34,6 +34,17 @@ public final class SemanticAttributes { public static final AttributeKey AWS_LAMBDA_INVOKED_ARN = stringKey("aws.lambda.invoked_arn"); + /** + * Parent-child Reference type + * + *

Notes: + * + *

    + *
  • The causal relationship between a child Span and a parent Span. + *
+ */ + public static final AttributeKey OPENTRACING_REF_TYPE = stringKey("opentracing.ref_type"); + /** * An identifier for the database management system (DBMS) product being used. See below for a * list of well-known identifiers. @@ -868,6 +879,15 @@ public final class SemanticAttributes { longKey("message.uncompressed_size"); // Enum definitions + public static final class OpentracingRefTypeValues { + /** The parent Span depends on the child Span in some capacity. */ + public static final String CHILD_OF = "child_of"; + /** The parent Span does not depend in any way on the result of the child Span. */ + public static final String FOLLOWS_FROM = "follows_from"; + + private OpentracingRefTypeValues() {} + } + public static final class DbSystemValues { /** Some other SQL database. Fallback only. See notes. */ public static final String OTHER_SQL = "other_sql";