Skip to content

Commit

Permalink
Update the semantic convention constants to v1.9.0 (#4174)
Browse files Browse the repository at this point in the history
  • Loading branch information
John Watson committed Feb 15, 2022
1 parent f7c52e1 commit 6266b16
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion buildscripts/semantic-convention/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// 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<String> CLOUD_PROVIDER = stringKey("cloud.provider");
Expand Down Expand Up @@ -223,6 +223,19 @@ public final class ResourceAttributes {
*/
public static final AttributeKey<String> DEVICE_MODEL_NAME = stringKey("device.model.name");

/**
* The name of the device manufacturer
*
* <p>Notes:
*
* <ul>
* <li>The Android OS provides this field via <a
* href="https://developer.android.com/reference/android/os/Build#MANUFACTURER">Build</a>.
* iOS apps SHOULD hardcode the value {@code Apple}.
* </ul>
*/
public static final AttributeKey<String> DEVICE_MANUFACTURER = stringKey("device.manufacturer");

/**
* The name of the single function that this runtime instance executes.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// 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
Expand All @@ -34,6 +34,17 @@ public final class SemanticAttributes {
public static final AttributeKey<String> AWS_LAMBDA_INVOKED_ARN =
stringKey("aws.lambda.invoked_arn");

/**
* Parent-child Reference type
*
* <p>Notes:
*
* <ul>
* <li>The causal relationship between a child Span and a parent Span.
* </ul>
*/
public static final AttributeKey<String> 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.
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 6266b16

Please sign in to comment.