chore: 添加虚拟环境到仓库
- 添加 backend_service/venv 虚拟环境 - 包含所有Python依赖包 - 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
CLIENT_ADDRESS: Final = "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: Final = "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.
|
||||
"""
|
||||
@@ -0,0 +1,55 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
CODE_COLUMN_NUMBER: Final = "code.column.number"
|
||||
"""
|
||||
The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.
|
||||
"""
|
||||
|
||||
CODE_FILE_PATH: Final = "code.file.path"
|
||||
"""
|
||||
The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.
|
||||
"""
|
||||
|
||||
CODE_FUNCTION_NAME: Final = "code.function.name"
|
||||
"""
|
||||
The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.
|
||||
Note: Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.
|
||||
The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in
|
||||
`code.stacktrace` without information on arguments.
|
||||
|
||||
Examples:
|
||||
|
||||
* Java method: `com.example.MyHttpService.serveRequest`
|
||||
* Java anonymous class method: `com.mycompany.Main$1.myMethod`
|
||||
* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
|
||||
* PHP function: `GuzzleHttp\\Client::transfer`
|
||||
* Go function: `github.com/my/repo/pkg.foo.func5`
|
||||
* Elixir: `OpenTelemetry.Ctx.new`
|
||||
* Erlang: `opentelemetry_ctx:new`
|
||||
* Rust: `playground::my_module::my_cool_func`
|
||||
* C function: `fopen`.
|
||||
"""
|
||||
|
||||
CODE_LINE_NUMBER: Final = "code.line.number"
|
||||
"""
|
||||
The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.
|
||||
"""
|
||||
|
||||
CODE_STACKTRACE: Final = "code.stacktrace"
|
||||
"""
|
||||
A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity.
|
||||
"""
|
||||
@@ -0,0 +1,119 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
DB_COLLECTION_NAME: Final = "db.collection.name"
|
||||
"""
|
||||
The name of a collection (table, container) within the database.
|
||||
Note: It is RECOMMENDED to capture the value as provided by the application
|
||||
without attempting to do any case normalization.
|
||||
|
||||
The collection name SHOULD NOT be extracted from `db.query.text`,
|
||||
when the database system supports query text with multiple collections
|
||||
in non-batch operations.
|
||||
|
||||
For batch operations, if the individual operations are known to have the same
|
||||
collection name then that collection name SHOULD be used.
|
||||
"""
|
||||
|
||||
DB_NAMESPACE: Final = "db.namespace"
|
||||
"""
|
||||
The name of the database, fully qualified within the server address and port.
|
||||
Note: If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.
|
||||
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
|
||||
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
|
||||
"""
|
||||
|
||||
DB_OPERATION_BATCH_SIZE: Final = "db.operation.batch.size"
|
||||
"""
|
||||
The number of queries included in a batch operation.
|
||||
Note: Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
|
||||
"""
|
||||
|
||||
DB_OPERATION_NAME: Final = "db.operation.name"
|
||||
"""
|
||||
The name of the operation or command being executed.
|
||||
Note: It is RECOMMENDED to capture the value as provided by the application
|
||||
without attempting to do any case normalization.
|
||||
|
||||
The operation name SHOULD NOT be extracted from `db.query.text`,
|
||||
when the database system supports query text with multiple operations
|
||||
in non-batch operations.
|
||||
|
||||
If spaces can occur in the operation name, multiple consecutive spaces
|
||||
SHOULD be normalized to a single space.
|
||||
|
||||
For batch operations, if the individual operations are known to have the same operation name
|
||||
then that operation name SHOULD be used prepended by `BATCH `,
|
||||
otherwise `db.operation.name` SHOULD be `BATCH` or some other database
|
||||
system specific term if more applicable.
|
||||
"""
|
||||
|
||||
DB_QUERY_SUMMARY: Final = "db.query.summary"
|
||||
"""
|
||||
Low cardinality summary of a database query.
|
||||
Note: The query summary describes a class of database queries and is useful
|
||||
as a grouping key, especially when analyzing telemetry for database
|
||||
calls involving complex queries.
|
||||
|
||||
Summary may be available to the instrumentation through
|
||||
instrumentation hooks or other means. If it is not available, instrumentations
|
||||
that support query parsing SHOULD generate a summary following
|
||||
[Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query)
|
||||
section.
|
||||
"""
|
||||
|
||||
DB_QUERY_TEXT: Final = "db.query.text"
|
||||
"""
|
||||
The database query being executed.
|
||||
Note: For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
|
||||
For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
|
||||
Parameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
|
||||
"""
|
||||
|
||||
DB_RESPONSE_STATUS_CODE: Final = "db.response.status_code"
|
||||
"""
|
||||
Database response status code.
|
||||
Note: The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
|
||||
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
|
||||
"""
|
||||
|
||||
DB_STORED_PROCEDURE_NAME: Final = "db.stored_procedure.name"
|
||||
"""
|
||||
The name of a stored procedure within the database.
|
||||
Note: It is RECOMMENDED to capture the value as provided by the application
|
||||
without attempting to do any case normalization.
|
||||
|
||||
For batch operations, if the individual operations are known to have the same
|
||||
stored procedure name then that stored procedure name SHOULD be used.
|
||||
"""
|
||||
|
||||
DB_SYSTEM_NAME: Final = "db.system.name"
|
||||
"""
|
||||
The database management system (DBMS) product as identified by the client instrumentation.
|
||||
Note: The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge.
|
||||
"""
|
||||
|
||||
|
||||
class DbSystemNameValues(Enum):
|
||||
MARIADB = "mariadb"
|
||||
"""[MariaDB](https://mariadb.org/)."""
|
||||
MICROSOFT_SQL_SERVER = "microsoft.sql_server"
|
||||
"""[Microsoft SQL Server](https://www.microsoft.com/sql-server)."""
|
||||
MYSQL = "mysql"
|
||||
"""[MySQL](https://www.mysql.com/)."""
|
||||
POSTGRESQL = "postgresql"
|
||||
"""[PostgreSQL](https://www.postgresql.org/)."""
|
||||
@@ -0,0 +1,45 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
ERROR_TYPE: Final = "error.type"
|
||||
"""
|
||||
Describes a class of error the operation ended with.
|
||||
Note: The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
|
||||
|
||||
When `error.type` is set to a type (e.g., an exception type), its
|
||||
canonical class name identifying the type within the artifact SHOULD be used.
|
||||
|
||||
Instrumentations SHOULD document the list of errors they report.
|
||||
|
||||
The cardinality of `error.type` within one instrumentation library SHOULD be low.
|
||||
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
||||
should be prepared for `error.type` to have high cardinality at query time when no
|
||||
additional filters are applied.
|
||||
|
||||
If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.
|
||||
|
||||
If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
|
||||
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."""
|
||||
@@ -0,0 +1,35 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
EXCEPTION_ESCAPED: Final = "exception.escaped"
|
||||
"""
|
||||
Deprecated: It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.
|
||||
"""
|
||||
|
||||
EXCEPTION_MESSAGE: Final = "exception.message"
|
||||
"""
|
||||
The exception message.
|
||||
"""
|
||||
|
||||
EXCEPTION_STACKTRACE: Final = "exception.stacktrace"
|
||||
"""
|
||||
A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.
|
||||
"""
|
||||
|
||||
EXCEPTION_TYPE: Final = "exception.type"
|
||||
"""
|
||||
The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.
|
||||
"""
|
||||
@@ -0,0 +1,122 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
HTTP_REQUEST_HEADER_TEMPLATE: Final = "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.
|
||||
|
||||
Examples:
|
||||
|
||||
- A header `Content-Type: application/json` SHOULD be recorded as the `http.request.header.content-type`
|
||||
attribute with value `["application/json"]`.
|
||||
- A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` SHOULD be recorded as the `http.request.header.x-forwarded-for`
|
||||
attribute with value `["1.2.3.4", "1.2.3.5"]` or `["1.2.3.4, 1.2.3.5"]` depending on the HTTP library.
|
||||
"""
|
||||
|
||||
HTTP_REQUEST_METHOD: Final = "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).
|
||||
|
||||
If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.
|
||||
|
||||
If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override
|
||||
the list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named
|
||||
OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods
|
||||
(this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).
|
||||
|
||||
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: Final = "http.request.method_original"
|
||||
"""
|
||||
Original HTTP method sent by the client in the request line.
|
||||
"""
|
||||
|
||||
HTTP_REQUEST_RESEND_COUNT: Final = "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: Final = "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.
|
||||
|
||||
Examples:
|
||||
|
||||
- A header `Content-Type: application/json` header SHOULD be recorded as the `http.request.response.content-type`
|
||||
attribute with value `["application/json"]`.
|
||||
- A header `My-custom-header: abc, def` header SHOULD be recorded as the `http.response.header.my-custom-header`
|
||||
attribute with value `["abc", "def"]` or `["abc, def"]` depending on the HTTP library.
|
||||
"""
|
||||
|
||||
HTTP_RESPONSE_STATUS_CODE: Final = "http.response.status_code"
|
||||
"""
|
||||
[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
|
||||
"""
|
||||
|
||||
HTTP_ROUTE: Final = "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."""
|
||||
DELETE = "DELETE"
|
||||
"""DELETE method."""
|
||||
GET = "GET"
|
||||
"""GET method."""
|
||||
HEAD = "HEAD"
|
||||
"""HEAD method."""
|
||||
OPTIONS = "OPTIONS"
|
||||
"""OPTIONS method."""
|
||||
PATCH = "PATCH"
|
||||
"""PATCH method."""
|
||||
POST = "POST"
|
||||
"""POST method."""
|
||||
PUT = "PUT"
|
||||
"""PUT method."""
|
||||
TRACE = "TRACE"
|
||||
"""TRACE method."""
|
||||
OTHER = "_OTHER"
|
||||
"""Any HTTP method that the instrumentation has no prior knowledge of."""
|
||||
@@ -0,0 +1,84 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
NETWORK_LOCAL_ADDRESS: Final = "network.local.address"
|
||||
"""
|
||||
Local address of the network connection - IP address or Unix domain socket name.
|
||||
"""
|
||||
|
||||
NETWORK_LOCAL_PORT: Final = "network.local.port"
|
||||
"""
|
||||
Local port number of the network connection.
|
||||
"""
|
||||
|
||||
NETWORK_PEER_ADDRESS: Final = "network.peer.address"
|
||||
"""
|
||||
Peer address of the network connection - IP address or Unix domain socket name.
|
||||
"""
|
||||
|
||||
NETWORK_PEER_PORT: Final = "network.peer.port"
|
||||
"""
|
||||
Peer port number of the network connection.
|
||||
"""
|
||||
|
||||
NETWORK_PROTOCOL_NAME: Final = "network.protocol.name"
|
||||
"""
|
||||
[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.
|
||||
Note: The value SHOULD be normalized to lowercase.
|
||||
"""
|
||||
|
||||
NETWORK_PROTOCOL_VERSION: Final = "network.protocol.version"
|
||||
"""
|
||||
The actual version of the protocol used for network communication.
|
||||
Note: If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.
|
||||
"""
|
||||
|
||||
NETWORK_TRANSPORT: Final = "network.transport"
|
||||
"""
|
||||
[OSI transport layer](https://wikipedia.org/wiki/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: Final = "network.type"
|
||||
"""
|
||||
[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.
|
||||
Note: The value SHOULD be normalized to lowercase.
|
||||
"""
|
||||
|
||||
|
||||
class NetworkTransportValues(Enum):
|
||||
TCP = "tcp"
|
||||
"""TCP."""
|
||||
UDP = "udp"
|
||||
"""UDP."""
|
||||
PIPE = "pipe"
|
||||
"""Named or anonymous pipe."""
|
||||
UNIX = "unix"
|
||||
"""Unix domain socket."""
|
||||
QUIC = "quic"
|
||||
"""QUIC."""
|
||||
|
||||
|
||||
class NetworkTypeValues(Enum):
|
||||
IPV4 = "ipv4"
|
||||
"""IPv4."""
|
||||
IPV6 = "ipv6"
|
||||
"""IPv6."""
|
||||
@@ -0,0 +1,43 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
OTEL_SCOPE_NAME: Final = "otel.scope.name"
|
||||
"""
|
||||
The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).
|
||||
"""
|
||||
|
||||
OTEL_SCOPE_VERSION: Final = "otel.scope.version"
|
||||
"""
|
||||
The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
|
||||
"""
|
||||
|
||||
OTEL_STATUS_CODE: Final = "otel.status_code"
|
||||
"""
|
||||
Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.
|
||||
"""
|
||||
|
||||
OTEL_STATUS_DESCRIPTION: Final = "otel.status_description"
|
||||
"""
|
||||
Description of the Status if it has a value, otherwise not set.
|
||||
"""
|
||||
|
||||
|
||||
class OtelStatusCodeValues(Enum):
|
||||
OK = "OK"
|
||||
"""The operation has been validated by an Application developer or Operator to have completed successfully."""
|
||||
ERROR = "ERROR"
|
||||
"""The operation contains an error."""
|
||||
@@ -0,0 +1,27 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
SERVER_ADDRESS: Final = "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: Final = "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.
|
||||
"""
|
||||
@@ -0,0 +1,26 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
SERVICE_NAME: Final = "service.name"
|
||||
"""
|
||||
Logical name of the service.
|
||||
Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
|
||||
"""
|
||||
|
||||
SERVICE_VERSION: Final = "service.version"
|
||||
"""
|
||||
The version string of the service API or implementation. The format is not defined by these conventions.
|
||||
"""
|
||||
@@ -0,0 +1,64 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
|
||||
TELEMETRY_SDK_LANGUAGE: Final = "telemetry.sdk.language"
|
||||
"""
|
||||
The language of the telemetry SDK.
|
||||
"""
|
||||
|
||||
TELEMETRY_SDK_NAME: Final = "telemetry.sdk.name"
|
||||
"""
|
||||
The name of the telemetry SDK as defined above.
|
||||
Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
|
||||
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
|
||||
`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
|
||||
or another suitable identifier depending on the language.
|
||||
The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
|
||||
All custom identifiers SHOULD be stable across different versions of an implementation.
|
||||
"""
|
||||
|
||||
TELEMETRY_SDK_VERSION: Final = "telemetry.sdk.version"
|
||||
"""
|
||||
The version string of the telemetry SDK.
|
||||
"""
|
||||
|
||||
|
||||
class TelemetrySdkLanguageValues(Enum):
|
||||
CPP = "cpp"
|
||||
"""cpp."""
|
||||
DOTNET = "dotnet"
|
||||
"""dotnet."""
|
||||
ERLANG = "erlang"
|
||||
"""erlang."""
|
||||
GO = "go"
|
||||
"""go."""
|
||||
JAVA = "java"
|
||||
"""java."""
|
||||
NODEJS = "nodejs"
|
||||
"""nodejs."""
|
||||
PHP = "php"
|
||||
"""php."""
|
||||
PYTHON = "python"
|
||||
"""python."""
|
||||
RUBY = "ruby"
|
||||
"""ruby."""
|
||||
RUST = "rust"
|
||||
"""rust."""
|
||||
SWIFT = "swift"
|
||||
"""swift."""
|
||||
WEBJS = "webjs"
|
||||
"""webjs."""
|
||||
@@ -0,0 +1,78 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
URL_FRAGMENT: Final = "url.fragment"
|
||||
"""
|
||||
The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component.
|
||||
"""
|
||||
|
||||
URL_FULL: Final = "url.full"
|
||||
"""
|
||||
Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986).
|
||||
Note: For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment
|
||||
is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless.
|
||||
|
||||
`url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`.
|
||||
In such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`.
|
||||
|
||||
`url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed).
|
||||
|
||||
Sensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it.
|
||||
|
||||

|
||||
Query string values for the following keys SHOULD be redacted by default and replaced by the
|
||||
value `REDACTED`:
|
||||
|
||||
* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
|
||||
* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
|
||||
* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)
|
||||
* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)
|
||||
|
||||
This list is subject to change over time.
|
||||
|
||||
When a query string value is redacted, the query string key SHOULD still be preserved, e.g.
|
||||
`https://www.example.com/path?color=blue&sig=REDACTED`.
|
||||
"""
|
||||
|
||||
URL_PATH: Final = "url.path"
|
||||
"""
|
||||
The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component.
|
||||
Note: Sensitive content provided in `url.path` SHOULD be scrubbed when instrumentations can identify it.
|
||||
"""
|
||||
|
||||
URL_QUERY: Final = "url.query"
|
||||
"""
|
||||
The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component.
|
||||
Note: Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it.
|
||||
|
||||

|
||||
Query string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`:
|
||||
|
||||
* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
|
||||
* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
|
||||
* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)
|
||||
* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)
|
||||
|
||||
This list is subject to change over time.
|
||||
|
||||
When a query string value is redacted, the query string key SHOULD still be preserved, e.g.
|
||||
`q=OpenTelemetry&sig=REDACTED`.
|
||||
"""
|
||||
|
||||
URL_SCHEME: Final = "url.scheme"
|
||||
"""
|
||||
The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.
|
||||
"""
|
||||
@@ -0,0 +1,20 @@
|
||||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Final
|
||||
|
||||
USER_AGENT_ORIGINAL: Final = "user_agent.original"
|
||||
"""
|
||||
Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.
|
||||
"""
|
||||
Reference in New Issue
Block a user