diff --git a/buildscripts/semantic-convention/generate.sh b/buildscripts/semantic-convention/generate.sh index 0f722a7823c..f94645157d8 100755 --- a/buildscripts/semantic-convention/generate.sh +++ b/buildscripts/semantic-convention/generate.sh @@ -26,7 +26,7 @@ docker run --rm \ -v ${SCRIPT_DIR}/templates:/templates \ -v ${ROOT_DIR}/semconv/src/main/java/io/opentelemetry/semconv/trace/attributes/:/output \ otel/semconvgen:$GENERATOR_VERSION \ - --exclude resource/* \ + --exclude resource/** \ -f /source code \ --template /templates/SemanticAttributes.java.j2 \ --output /output/SemanticAttributes.java \ diff --git a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 index e1d4529e5b8..d7a7c99e66e 100644 --- a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 +++ b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 @@ -71,12 +71,12 @@ public final class {{class}} { *

Notes:

{%- endif %} - {%- if attribute.deprecated %} + {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} * - * @deprecated {{attribute.deprecated | to_doc_brief}}. + * @deprecated {{attribute.brief | to_doc_brief}}. {%- endif %} */ - {%- if attribute.deprecated %} + {%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %} @Deprecated {%- endif %} public static final AttributeKey<{{upFirst(to_java_return_type(attribute.attr_type | string))}}> {{attribute.fqn | to_const_name}} = {{to_java_key_type(attribute.attr_type | string)}}("{{attribute.fqn}}"); @@ -178,6 +178,13 @@ public final class {{class}} { @Deprecated public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); + /** + * The ordinal number of request re-sending attempt. + * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link SemanticAttributes#HTTP_RESEND_COUNT} instead. + */ + @Deprecated + public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); + {% endif %} private {{class}}() {} 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 bfcdad31992..c74f98bd9fa 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 @@ -53,101 +53,26 @@ public final class SemanticAttributes { */ public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain"); - /** - * The Amazon Resource Name (ARN) of an ECS - * container instance. - */ - public static final AttributeKey AWS_ECS_CONTAINER_ARN = - stringKey("aws.ecs.container.arn"); - - /** - * The ARN of an ECS - * cluster. - */ - public static final AttributeKey AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn"); - - /** - * The launch - * type for an ECS task. - */ - public static final AttributeKey AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype"); - - /** - * The ARN of an ECS - * task definition. - */ - public static final AttributeKey AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn"); - - /** The task definition family this task definition is a member of. */ - public static final AttributeKey AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family"); - - /** The revision for this task definition. */ - public static final AttributeKey AWS_ECS_TASK_REVISION = - stringKey("aws.ecs.task.revision"); - - /** The ARN of an EKS cluster. */ - public static final AttributeKey AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn"); + /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - *

Notes: - * - *

    - *
  • Multiple log groups must be supported for cases like multi-container applications, where - * a single application has sidecar containers, and each write to their own log group. - *
- */ - public static final AttributeKey> AWS_LOG_GROUP_NAMES = - stringArrayKey("aws.log.group.names"); + /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ + public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - *

Notes: + * Deprecated, use the {@code otel.scope.name} attribute. * - *

+ * @deprecated Deprecated, use the `otel.scope.name` attribute. */ - public static final AttributeKey> AWS_LOG_GROUP_ARNS = - stringArrayKey("aws.log.group.arns"); - - /** The name(s) of the AWS log stream(s) an application is writing to. */ - public static final AttributeKey> AWS_LOG_STREAM_NAMES = - stringArrayKey("aws.log.stream.names"); + @Deprecated + public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); /** - * The ARN(s) of the AWS log stream(s). - * - *

Notes: + * Deprecated, use the {@code otel.scope.version} attribute. * - *

+ * @deprecated Deprecated, use the `otel.scope.version` attribute. */ - public static final AttributeKey> AWS_LOG_STREAM_ARNS = - stringArrayKey("aws.log.stream.arns"); - - /** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_NAME = stringKey("otel.scope.name"); - - /** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */ - public static final AttributeKey OTEL_SCOPE_VERSION = stringKey("otel.scope.version"); - - /** Deprecated, use the {@code otel.scope.name} attribute. */ - public static final AttributeKey OTEL_LIBRARY_NAME = stringKey("otel.library.name"); - - /** Deprecated, use the {@code otel.scope.version} attribute. */ + @Deprecated public static final AttributeKey OTEL_LIBRARY_VERSION = stringKey("otel.library.version"); /** @@ -1113,15 +1038,6 @@ public static final class EventDomainValues { private EventDomainValues() {} } - public static final class AwsEcsLaunchtypeValues { - /** ec2. */ - public static final String EC2 = "ec2"; - /** fargate. */ - public static final String FARGATE = "fargate"; - - private AwsEcsLaunchtypeValues() {} - } - public static final class OpentracingRefTypeValues { /** The parent Span depends on the child Span in some capacity. */ public static final String CHILD_OF = "child_of"; @@ -1609,5 +1525,13 @@ private MessageTypeValues() {} */ @Deprecated public static final AttributeKey NET_HOST_IP = stringKey("net.host.ip"); + /** + * The ordinal number of request re-sending attempt. + * + * @deprecated This item has been removed as of 1.15.0 of the semantic conventions. Use {@link + * SemanticAttributes#HTTP_RESEND_COUNT} instead. + */ + @Deprecated public static final AttributeKey HTTP_RETRY_COUNT = longKey("http.retry_count"); + private SemanticAttributes() {} }