Skip to content

Commit

Permalink
Add deprecation warnings where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Jul 19, 2023
1 parent 48e2c7b commit dc4da4a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,15 @@ All custom identifiers SHOULD be stable across different versions of an implemen

/**
* Deprecated, use the `otel.scope.name` attribute.
*
* @deprecated Deprecated, use the `otel.scope.name` attribute
*/
OTEL_LIBRARY_NAME: 'otel.library.name',

/**
* Deprecated, use the `otel.scope.version` attribute.
*
* @deprecated Deprecated, use the `otel.scope.version` attribute
*/
OTEL_LIBRARY_VERSION: 'otel.library.version',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,101 +42,141 @@ export const SemanticAttributes = {

/**
* Deprecated, use `http.request.method` instead.
*
* @deprecated Deprecated, use `http.request.method` instead
*/
HTTP_METHOD: 'http.method',

/**
* Deprecated, use `http.response.status_code` instead.
*
* @deprecated Deprecated, use `http.response.status_code` instead
*/
HTTP_STATUS_CODE: 'http.status_code',

/**
* Deprecated, use `url.scheme` instead.
*
* @deprecated Deprecated, use `url.scheme` instead
*/
HTTP_SCHEME: 'http.scheme',

/**
* Deprecated, use `url.full` instead.
*
* @deprecated Deprecated, use `url.full` instead
*/
HTTP_URL: 'http.url',

/**
* Deprecated, use `url.path` and `url.query` instead.
*
* @deprecated Deprecated, use `url.path` and `url.query` instead
*/
HTTP_TARGET: 'http.target',

/**
* Deprecated, use `http.request.body.size` instead.
*
* @deprecated Deprecated, use `http.request.body.size` instead
*/
HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',

/**
* Deprecated, use `http.response.body.size` instead.
*
* @deprecated Deprecated, use `http.response.body.size` instead
*/
HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',

/**
* Deprecated, use `server.socket.domain` on client spans.
*
* @deprecated Deprecated, use `server.socket.domain` on client spans
*/
NET_SOCK_PEER_NAME: 'net.sock.peer.name',

/**
* Deprecated, use `server.socket.address` on client spans and `client.socket.address` on server spans.
*
* @deprecated Deprecated, use `server.socket.address` on client spans and `client.socket.address` on server spans
*/
NET_SOCK_PEER_ADDR: 'net.sock.peer.addr',

/**
* Deprecated, use `server.socket.port` on client spans and `client.socket.port` on server spans.
*
* @deprecated Deprecated, use `server.socket.port` on client spans and `client.socket.port` on server spans
*/
NET_SOCK_PEER_PORT: 'net.sock.peer.port',

/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @deprecated Deprecated, use `server.address` on client spans and `client.address` on server spans
*/
NET_PEER_NAME: 'net.peer.name',

/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @deprecated Deprecated, use `server.port` on client spans and `client.port` on server spans
*/
NET_PEER_PORT: 'net.peer.port',

/**
* Deprecated, use `server.address`.
*
* @deprecated Deprecated, use `server.address`
*/
NET_HOST_NAME: 'net.host.name',

/**
* Deprecated, use `server.port`.
*
* @deprecated Deprecated, use `server.port`
*/
NET_HOST_PORT: 'net.host.port',

/**
* Deprecated, use `server.socket.address`.
*
* @deprecated Deprecated, use `server.socket.address`
*/
NET_SOCK_HOST_ADDR: 'net.sock.host.addr',

/**
* Deprecated, use `server.socket.port`.
*
* @deprecated Deprecated, use `server.socket.port`
*/
NET_SOCK_HOST_PORT: 'net.sock.host.port',

/**
* Deprecated, use `network.transport`.
*
* @deprecated Deprecated, use `network.transport`
*/
NET_TRANSPORT: 'net.transport',

/**
* Deprecated, use `network.protocol.name`.
*
* @deprecated Deprecated, use `network.protocol.name`
*/
NET_PROTOCOL_NAME: 'net.protocol.name',

/**
* Deprecated, use `network.protocol.version`.
*
* @deprecated Deprecated, use `network.protocol.version`
*/
NET_PROTOCOL_VERSION: 'net.protocol.version',

/**
* Deprecated, use `network.transport` and `network.type`.
*
* @deprecated Deprecated, use `network.transport` and `network.type`
*/
NET_SOCK_FAMILY: 'net.sock.family',

Expand Down
4 changes: 4 additions & 0 deletions scripts/semconv/templates/SemanticAttributes.ts.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const {{class}} = {
*
* @deprecated {{attribute.deprecated | to_doc_brief}}.
{%- endif %}
{%- if (attribute.stability | string()) == "StabilityLevel.DEPRECATED" %}
*
* @deprecated {{attribute.brief | to_doc_brief}}
{%- endif %}
*/
{{attribute.fqn | to_const_name}}: '{{attribute.fqn}}',
{%- endfor %}
Expand Down

0 comments on commit dc4da4a

Please sign in to comment.