Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildscripts/semantic-convention/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ 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.12.0
SEMCONV_VERSION=1.13.0
SPEC_VERSION=v$SEMCONV_VERSION
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
GENERATOR_VERSION=0.8.0
GENERATOR_VERSION=0.14.0

cd ${SCRIPT_DIR}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ public final class {{class}} {
/** {% filter escape %}{{member.brief | to_doc_brief}}.{% endfilter %} */
public static final {{ type }} {{ member.member_id | to_const_name }} = {{ print_value(type, member.value) }};
{%- endfor %}

{%- if class_name == "NetTransportValues" %}
/** @deprecated This item has been removed as of 1.13.0 of the semantic conventions. */
@Deprecated
public static final String IP = "ip";
/** @deprecated This item has been removed as of 1.13.0 of the semantic conventions. */
@Deprecated
public static final String UNIX = "unix";
{%- endif %}

private {{ class_name }}() {}
}

Expand Down Expand Up @@ -124,6 +134,49 @@ public final class {{class}} {
@Deprecated
public static final AttributeKey<String> DB_HBASE_NAMESPACE = stringKey("db.hbase.namespace");

/**
* The size of the uncompressed request payload body after transport decoding. Not set if
* transport encoding not used.
*
* @deprecated this item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_REQUEST_CONTENT_LENGTH} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's several more of those:

  • HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED
  • HTTP_HOST
  • NET_PEER_IP
  • NET_PEER_PORT
  • NET_HOST_IP

Can you add these as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is our general practice to retain deleted attributes with @Deprecated for a single release cycle, indefinitely, some other schedule?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question -- I think a single release cycle is fine, it lets whoever's using the lib replace those deprecated usages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, although NET_PEER_PORT is still here. updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED is still missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops. missed request vs. response. added.

longKey("http.request_content_length_uncompressed");

/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use {@link SemanticAttributes#HTTP_RESPONSE_CONTENT_LENGTH} instead.
*/
@Deprecated
public static final AttributeKey<Long> HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED =
longKey("http.response_content_length_uncompressed");

/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use
* {@link SemanticAttributes#NET_HOST_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_SERVER_NAME = stringKey("http.server_name");

/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions. Please use
* {@link SemanticAttributes#NET_HOST_NAME} instead.
*/
@Deprecated
public static final AttributeKey<String> HTTP_HOST = stringKey("http.host");

/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> NET_PEER_IP = stringKey("net.peer.ip");

/**
* @deprecated This item has been removed as of 1.13.0 of the semantic conventions.
*/
@Deprecated
public static final AttributeKey<String> NET_HOST_IP = stringKey("net.host.ip");

{% endif %}

private {{class}}() {}
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.12.0";
public static final String SCHEMA_URL = "https://opentelemetry.io/schemas/1.13.0";

/**
* Array of brand name and version separated by a space
Expand Down Expand Up @@ -493,6 +493,9 @@ public final class ResourceAttributes {
/** Process identifier (PID). */
public static final AttributeKey<Long> PROCESS_PID = longKey("process.pid");

/** Parent Process identifier (PID). */
public static final AttributeKey<Long> PROCESS_PARENT_PID = longKey("process.parent_pid");

/**
* The name of the process executable. On Linux based systems, can be set to the {@code Name} in
* {@code proc/[pid]/status}. On Windows, can be set to the base name of {@code
Expand Down
Loading