Skip to content

Commit

Permalink
update codegen version
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Feb 17, 2024
1 parent 9176ade commit 70d5ffd
Show file tree
Hide file tree
Showing 53 changed files with 2,116 additions and 2,590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@

# pylint: disable=too-many-lines

from enum import Enum

class ClientAttributes:
CLIENT_ADDRESS = "client.address"
"""
Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Note: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
"""


CLIENT_ADDRESS = "client.address"

"""
Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Note: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.
"""


CLIENT_PORT = "client.port"

"""
Client port number.
Note: When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
"""
CLIENT_PORT = "client.port"
"""
Client port number.
Note: When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.
"""

Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

from enum import Enum

class ErrorAttributes:


ERROR_TYPE = "error.type"

"""
Describes a class of error the operation ended with.
Note: The `error.type` SHOULD be predictable and SHOULD have low cardinality.

ERROR_TYPE = "error.type"
"""
Describes a class of error the operation ended with.
Note: The `error.type` SHOULD be predictable and SHOULD have low cardinality.
Instrumentations SHOULD document the list of errors they report.
The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand All @@ -38,7 +35,9 @@ class ErrorAttributes:
it's RECOMMENDED to:
* Use a domain-specific attribute
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
"""
"""


class ErrorTypeValues(Enum):
OTHER = "_OTHER"
"""A fallback error value to be used when the instrumentation doesn't define a custom value."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,21 @@

from enum import Enum

class HttpAttributes:


HTTP_REQUEST_HEADER_TEMPLATE = "http.request.header"

"""
HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.

HTTP_REQUEST_HEADER_TEMPLATE = "http.request.header"

"""
HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
The `User-Agent` header is already captured in the `user_agent.original` attribute. Users MAY explicitly configure instrumentations to capture them even though it is not recommended.
The attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.
"""


HTTP_REQUEST_METHOD = "http.request.method"

"""
HTTP request method.
Note: HTTP request method value SHOULD be "known" to the instrumentation.
"""


HTTP_REQUEST_METHOD = "http.request.method"
"""
HTTP request method.
Note: HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
Expand All @@ -48,48 +45,46 @@ class HttpAttributes:
HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.
Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.
Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.
"""


HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original"

"""
Original HTTP method sent by the client in the request line.
"""


HTTP_REQUEST_RESEND_COUNT = "http.request.resend_count"

"""
The ordinal number of request resending attempt (for any reason, including redirects).
Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).
"""


HTTP_RESPONSE_HEADER_TEMPLATE = "http.response.header"

"""
HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
"""


HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original"
"""
Original HTTP method sent by the client in the request line.
"""


HTTP_REQUEST_RESEND_COUNT = "http.request.resend_count"
"""
The ordinal number of request resending attempt (for any reason, including redirects).
Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).
"""


HTTP_RESPONSE_HEADER_TEMPLATE = "http.response.header"

"""
HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
Note: Instrumentations SHOULD require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.
Users MAY explicitly configure instrumentations to capture them even though it is not recommended.
The attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.
"""


HTTP_RESPONSE_STATUS_CODE = "http.response.status_code"

"""
[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
"""


HTTP_ROUTE = "http.route"

"""
The matched route, that is, the path template in the format used by the respective server framework.
Note: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
"""


HTTP_RESPONSE_STATUS_CODE = "http.response.status_code"
"""
[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
"""


HTTP_ROUTE = "http.route"
"""
The matched route, that is, the path template in the format used by the respective server framework.
Note: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.
"""
"""


class HttpRequestMethodValues(Enum):
CONNECT = "CONNECT"
"""CONNECT method."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,71 +17,63 @@

from enum import Enum

class NetworkAttributes:


NETWORK_LOCAL_ADDRESS = "network.local.address"

"""
Local address of the network connection - IP address or Unix domain socket name.
"""


NETWORK_LOCAL_PORT = "network.local.port"

"""
Local port number of the network connection.
"""


NETWORK_PEER_ADDRESS = "network.peer.address"

"""
Peer address of the network connection - IP address or Unix domain socket name.
"""


NETWORK_PEER_PORT = "network.peer.port"

"""
Peer port number of the network connection.
"""


NETWORK_PROTOCOL_NAME = "network.protocol.name"

"""
[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent.
Note: The value SHOULD be normalized to lowercase.
"""


NETWORK_PROTOCOL_VERSION = "network.protocol.version"

"""
Version of the protocol specified in `network.protocol.name`.
Note: `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
"""


NETWORK_TRANSPORT = "network.transport"

"""
[OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).
Note: The value SHOULD be normalized to lowercase.

NETWORK_LOCAL_ADDRESS = "network.local.address"
"""
Local address of the network connection - IP address or Unix domain socket name.
"""


NETWORK_LOCAL_PORT = "network.local.port"
"""
Local port number of the network connection.
"""


NETWORK_PEER_ADDRESS = "network.peer.address"
"""
Peer address of the network connection - IP address or Unix domain socket name.
"""


NETWORK_PEER_PORT = "network.peer.port"
"""
Peer port number of the network connection.
"""


NETWORK_PROTOCOL_NAME = "network.protocol.name"
"""
[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent.
Note: The value SHOULD be normalized to lowercase.
"""


NETWORK_PROTOCOL_VERSION = "network.protocol.version"
"""
Version of the protocol specified in `network.protocol.name`.
Note: `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
"""


NETWORK_TRANSPORT = "network.transport"
"""
[OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).
Note: The value SHOULD be normalized to lowercase.
Consider always setting the transport when setting a port number, since
a port number is ambiguous without knowing the transport. For example
different processes could be listening on TCP port 12345 and UDP port 12345.
"""


NETWORK_TYPE = "network.type"

"""
[OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
Note: The value SHOULD be normalized to lowercase.
"""
"""


NETWORK_TYPE = "network.type"
"""
[OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
Note: The value SHOULD be normalized to lowercase.
"""


class NetworkTransportValues(Enum):
TCP = "tcp"
"""TCP."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,17 @@

# pylint: disable=too-many-lines

from enum import Enum

class ServerAttributes:
SERVER_ADDRESS = "server.address"
"""
Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
"""


SERVER_ADDRESS = "server.address"

"""
Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
"""


SERVER_PORT = "server.port"

"""
Server port number.
Note: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
"""
SERVER_PORT = "server.port"
"""
Server port number.
Note: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.
"""

Loading

0 comments on commit 70d5ffd

Please sign in to comment.