Skip to content

Commit

Permalink
remove more resources, include deprecated tags and attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwatson committed Nov 12, 2022
1 parent e5e3cc6 commit 72c1b76
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 99 deletions.
2 changes: 1 addition & 1 deletion buildscripts/semantic-convention/generate.sh
Expand Up @@ -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 \
Expand Down
Expand Up @@ -71,12 +71,12 @@ public final class {{class}} {
* <p>Notes:
<ul> {{attribute.note | render_markdown(code="{{@code {0}}}", paragraph="<li>{0}</li>", list="{0}")}} </ul>
{%- 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}}");
Expand Down Expand Up @@ -178,6 +178,13 @@ public final class {{class}} {
@Deprecated
public static final AttributeKey<String> 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<Long> HTTP_RETRY_COUNT = longKey("http.retry_count");

{% endif %}

private {{class}}() {}
Expand Down
Expand Up @@ -53,101 +53,26 @@ public final class SemanticAttributes {
*/
public static final AttributeKey<String> EVENT_DOMAIN = stringKey("event.domain");

/**
* The Amazon Resource Name (ARN) of an <a
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html">ECS
* container instance</a>.
*/
public static final AttributeKey<String> AWS_ECS_CONTAINER_ARN =
stringKey("aws.ecs.container.arn");

/**
* The ARN of an <a
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html">ECS
* cluster</a>.
*/
public static final AttributeKey<String> AWS_ECS_CLUSTER_ARN = stringKey("aws.ecs.cluster.arn");

/**
* The <a
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">launch
* type</a> for an ECS task.
*/
public static final AttributeKey<String> AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype");

/**
* The ARN of an <a
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html">ECS
* task definition</a>.
*/
public static final AttributeKey<String> AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn");

/** The task definition family this task definition is a member of. */
public static final AttributeKey<String> AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family");

/** The revision for this task definition. */
public static final AttributeKey<String> AWS_ECS_TASK_REVISION =
stringKey("aws.ecs.task.revision");

/** The ARN of an EKS cluster. */
public static final AttributeKey<String> AWS_EKS_CLUSTER_ARN = stringKey("aws.eks.cluster.arn");
/** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */
public static final AttributeKey<String> OTEL_SCOPE_NAME = stringKey("otel.scope.name");

/**
* The name(s) of the AWS log group(s) an application is writing to.
*
* <p>Notes:
*
* <ul>
* <li>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.
* </ul>
*/
public static final AttributeKey<List<String>> AWS_LOG_GROUP_NAMES =
stringArrayKey("aws.log.group.names");
/** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */
public static final AttributeKey<String> OTEL_SCOPE_VERSION = stringKey("otel.scope.version");

/**
* The Amazon Resource Name(s) (ARN) of the AWS log group(s).
*
* <p>Notes:
* Deprecated, use the {@code otel.scope.name} attribute.
*
* <ul>
* <li>See the <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format">log
* group ARN format documentation</a>.
* </ul>
* @deprecated Deprecated, use the `otel.scope.name` attribute.
*/
public static final AttributeKey<List<String>> 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<List<String>> AWS_LOG_STREAM_NAMES =
stringArrayKey("aws.log.stream.names");
@Deprecated
public static final AttributeKey<String> OTEL_LIBRARY_NAME = stringKey("otel.library.name");

/**
* The ARN(s) of the AWS log stream(s).
*
* <p>Notes:
* Deprecated, use the {@code otel.scope.version} attribute.
*
* <ul>
* <li>See the <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format">log
* stream ARN format documentation</a>. One log group can contain several log streams, so
* these ARNs necessarily identify both a log group and a log stream.
* </ul>
* @deprecated Deprecated, use the `otel.scope.version` attribute.
*/
public static final AttributeKey<List<String>> AWS_LOG_STREAM_ARNS =
stringArrayKey("aws.log.stream.arns");

/** The name of the instrumentation scope - ({@code InstrumentationScope.Name} in OTLP). */
public static final AttributeKey<String> OTEL_SCOPE_NAME = stringKey("otel.scope.name");

/** The version of the instrumentation scope - ({@code InstrumentationScope.Version} in OTLP). */
public static final AttributeKey<String> OTEL_SCOPE_VERSION = stringKey("otel.scope.version");

/** Deprecated, use the {@code otel.scope.name} attribute. */
public static final AttributeKey<String> OTEL_LIBRARY_NAME = stringKey("otel.library.name");

/** Deprecated, use the {@code otel.scope.version} attribute. */
@Deprecated
public static final AttributeKey<String> OTEL_LIBRARY_VERSION = stringKey("otel.library.version");

/**
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -1609,5 +1525,13 @@ private MessageTypeValues() {}
*/
@Deprecated public static final AttributeKey<String> 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<Long> HTTP_RETRY_COUNT = longKey("http.retry_count");

private SemanticAttributes() {}
}

0 comments on commit 72c1b76

Please sign in to comment.