Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
__init__.py2208 linesDownload Raw Back to trace
1# Copyright The OpenTelemetry Authors2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7#     http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14 15# pylint: disable=too-many-lines16 17from enum import Enum18 19from typing_extensions import deprecated20 21 22@deprecated(23    "Use attributes defined in the :py:const:`opentelemetry.semconv.attributes` and :py:const:`opentelemetry.semconv._incubating.attributes` modules instead. Deprecated since version 1.25.0.",24)25class SpanAttributes:26    SCHEMA_URL = "https://opentelemetry.io/schemas/1.21.0"27    """28    The URL of the OpenTelemetry schema for these keys and values.29    """30    CLIENT_ADDRESS = "client.address"31    """32    Client address - unix domain socket name, IPv4 or IPv6 address.33    Note: When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent client address behind any intermediaries (e.g. proxies) if it's available.34    """35 36    CLIENT_PORT = "client.port"37    """38    Client port number.39    Note: When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent client port behind any intermediaries (e.g. proxies) if it's available.40    """41 42    CLIENT_SOCKET_ADDRESS = "client.socket.address"43    """44    Immediate client peer address - unix domain socket name, IPv4 or IPv6 address.45    """46 47    CLIENT_SOCKET_PORT = "client.socket.port"48    """49    Immediate client peer port number.50    """51 52    HTTP_METHOD = "http.method"53    """54    Deprecated, use `http.request.method` instead.55    """56 57    HTTP_STATUS_CODE = "http.status_code"58    """59    Deprecated, use `http.response.status_code` instead.60    """61 62    HTTP_SCHEME = "http.scheme"63    """64    Deprecated, use `url.scheme` instead.65    """66 67    HTTP_URL = "http.url"68    """69    Deprecated, use `url.full` instead.70    """71 72    HTTP_TARGET = "http.target"73    """74    Deprecated, use `url.path` and `url.query` instead.75    """76 77    HTTP_REQUEST_CONTENT_LENGTH = "http.request_content_length"78    """79    Deprecated, use `http.request.body.size` instead.80    """81 82    HTTP_RESPONSE_CONTENT_LENGTH = "http.response_content_length"83    """84    Deprecated, use `http.response.body.size` instead.85    """86 87    NET_SOCK_PEER_NAME = "net.sock.peer.name"88    """89    Deprecated, use `server.socket.domain` on client spans.90    """91 92    NET_SOCK_PEER_ADDR = "net.sock.peer.addr"93    """94    Deprecated, use `server.socket.address` on client spans and `client.socket.address` on server spans.95    """96 97    NET_SOCK_PEER_PORT = "net.sock.peer.port"98    """99    Deprecated, use `server.socket.port` on client spans and `client.socket.port` on server spans.100    """101 102    NET_PEER_NAME = "net.peer.name"103    """104    Deprecated, use `server.address` on client spans and `client.address` on server spans.105    """106 107    NET_PEER_PORT = "net.peer.port"108    """109    Deprecated, use `server.port` on client spans and `client.port` on server spans.110    """111 112    NET_HOST_NAME = "net.host.name"113    """114    Deprecated, use `server.address`.115    """116 117    NET_HOST_PORT = "net.host.port"118    """119    Deprecated, use `server.port`.120    """121 122    NET_SOCK_HOST_ADDR = "net.sock.host.addr"123    """124    Deprecated, use `server.socket.address`.125    """126 127    NET_SOCK_HOST_PORT = "net.sock.host.port"128    """129    Deprecated, use `server.socket.port`.130    """131 132    NET_TRANSPORT = "net.transport"133    """134    Deprecated, use `network.transport`.135    """136 137    NET_PROTOCOL_NAME = "net.protocol.name"138    """139    Deprecated, use `network.protocol.name`.140    """141 142    NET_PROTOCOL_VERSION = "net.protocol.version"143    """144    Deprecated, use `network.protocol.version`.145    """146 147    NET_SOCK_FAMILY = "net.sock.family"148    """149    Deprecated, use `network.transport` and `network.type`.150    """151 152    DESTINATION_DOMAIN = "destination.domain"153    """154    The domain name of the destination system.155    Note: This value may be a host name, a fully qualified domain name, or another host naming format.156    """157 158    DESTINATION_ADDRESS = "destination.address"159    """160    Peer address, for example IP address or UNIX socket name.161    """162 163    DESTINATION_PORT = "destination.port"164    """165    Peer port number.166    """167 168    EXCEPTION_TYPE = "exception.type"169    """170    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.171    """172 173    EXCEPTION_MESSAGE = "exception.message"174    """175    The exception message.176    """177 178    EXCEPTION_STACKTRACE = "exception.stacktrace"179    """180    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.181    """182 183    HTTP_REQUEST_METHOD = "http.request.method"184    """185    HTTP request method.186    Note: HTTP request method value SHOULD be "known" to the instrumentation.187    By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)188    and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).189 190    If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER` and, except if reporting a metric, MUST191    set the exact method received in the request line as value of the `http.request.method_original` attribute.192 193    If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override194    the list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named195    OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods196    (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).197 198    HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.199    Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.200    Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.201    """202 203    HTTP_RESPONSE_STATUS_CODE = "http.response.status_code"204    """205    [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).206    """207 208    NETWORK_PROTOCOL_NAME = "network.protocol.name"209    """210    [OSI Application Layer](https://osi-model.com/application-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase.211    """212 213    NETWORK_PROTOCOL_VERSION = "network.protocol.version"214    """215    Version of the application layer protocol used. See note below.216    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 used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.217    """218 219    SERVER_ADDRESS = "server.address"220    """221    Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.222    Note: Determined by using the first of the following that applies223 224    - Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)225      if it's sent in absolute-form226    - Host identifier of the `Host` header227 228    SHOULD NOT be set if capturing it would require an extra DNS lookup.229    """230 231    SERVER_PORT = "server.port"232    """233    Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.234    Note: When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `server.port` MUST match URI port identifier, otherwise it MUST match `Host` header port identifier.235    """236 237    HTTP_ROUTE = "http.route"238    """239    The matched route (path template in the format used by the respective server framework). See note below.240    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.241    SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.242    """243 244    URL_SCHEME = "url.scheme"245    """246    The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.247    """248 249    EVENT_NAME = "event.name"250    """251    The name identifies the event.252    """253 254    EVENT_DOMAIN = "event.domain"255    """256    The domain identifies the business context for the events.257    Note: Events across different domains may have same `event.name`, yet be258    unrelated events.259    """260 261    LOG_RECORD_UID = "log.record.uid"262    """263    A unique identifier for the Log Record.264    Note: If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records MUST have different values.265    The id MAY be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed.266    """267 268    FEATURE_FLAG_KEY = "feature_flag.key"269    """270    The unique identifier of the feature flag.271    """272 273    FEATURE_FLAG_PROVIDER_NAME = "feature_flag.provider_name"274    """275    The name of the service provider that performs the flag evaluation.276    """277 278    FEATURE_FLAG_VARIANT = "feature_flag.variant"279    """280    SHOULD be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used.281    Note: A semantic identifier, commonly referred to as a variant, provides a means282    for referring to a value without including the value itself. This can283    provide additional context for understanding the meaning behind a value.284    For example, the variant `red` maybe be used for the value `#c05543`.285 286    A stringified version of the value can be used in situations where a287    semantic identifier is unavailable. String representation of the value288    should be determined by the implementer.289    """290 291    LOG_IOSTREAM = "log.iostream"292    """293    The stream associated with the log. See below for a list of well-known values.294    """295 296    LOG_FILE_NAME = "log.file.name"297    """298    The basename of the file.299    """300 301    LOG_FILE_PATH = "log.file.path"302    """303    The full path to the file.304    """305 306    LOG_FILE_NAME_RESOLVED = "log.file.name_resolved"307    """308    The basename of the file, with symlinks resolved.309    """310 311    LOG_FILE_PATH_RESOLVED = "log.file.path_resolved"312    """313    The full path to the file, with symlinks resolved.314    """315 316    SERVER_SOCKET_ADDRESS = "server.socket.address"317    """318    Physical server IP address or Unix socket address. If set from the client, should simply use the socket's peer address, and not attempt to find any actual server IP (i.e., if set from client, this may represent some proxy server instead of the logical server).319    """320 321    POOL = "pool"322    """323    Name of the buffer pool.324    Note: Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).325    """326 327    TYPE = "type"328    """329    The type of memory.330    """331 332    SERVER_SOCKET_DOMAIN = "server.socket.domain"333    """334    The domain name of an immediate peer.335    Note: Typically observed from the client side, and represents a proxy or other intermediary domain name.336    """337 338    SERVER_SOCKET_PORT = "server.socket.port"339    """340    Physical server port.341    """342 343    SOURCE_DOMAIN = "source.domain"344    """345    The domain name of the source system.346    Note: This value may be a host name, a fully qualified domain name, or another host naming format.347    """348 349    SOURCE_ADDRESS = "source.address"350    """351    Source address, for example IP address or Unix socket name.352    """353 354    SOURCE_PORT = "source.port"355    """356    Source port number.357    """358 359    AWS_LAMBDA_INVOKED_ARN = "aws.lambda.invoked_arn"360    """361    The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).362    Note: This may be different from `cloud.resource_id` if an alias is involved.363    """364 365    CLOUDEVENTS_EVENT_ID = "cloudevents.event_id"366    """367    The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.368    """369 370    CLOUDEVENTS_EVENT_SOURCE = "cloudevents.event_source"371    """372    The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.373    """374 375    CLOUDEVENTS_EVENT_SPEC_VERSION = "cloudevents.event_spec_version"376    """377    The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.378    """379 380    CLOUDEVENTS_EVENT_TYPE = "cloudevents.event_type"381    """382    The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.383    """384 385    CLOUDEVENTS_EVENT_SUBJECT = "cloudevents.event_subject"386    """387    The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).388    """389 390    OPENTRACING_REF_TYPE = "opentracing.ref_type"391    """392    Parent-child Reference type.393    Note: The causal relationship between a child Span and a parent Span.394    """395 396    DB_SYSTEM = "db.system"397    """398    An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.399    """400 401    DB_CONNECTION_STRING = "db.connection_string"402    """403    The connection string used to connect to the database. It is recommended to remove embedded credentials.404    """405 406    DB_USER = "db.user"407    """408    Username for accessing the database.409    """410 411    DB_JDBC_DRIVER_CLASSNAME = "db.jdbc.driver_classname"412    """413    The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.414    """415 416    DB_NAME = "db.name"417    """418    This attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).419    Note: In some SQL databases, the database name to be used is called "schema name". In case there are multiple layers that could be considered for database name (e.g. Oracle instance name and schema name), the database name to be used is the more specific layer (e.g. Oracle schema name).420    """421 422    DB_STATEMENT = "db.statement"423    """424    The database statement being executed.425    """426 427    DB_OPERATION = "db.operation"428    """429    The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.430    Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.431    """432 433    NETWORK_TRANSPORT = "network.transport"434    """435    [OSI Transport Layer](https://osi-model.com/transport-layer/) or [Inter-process Communication method](https://en.wikipedia.org/wiki/Inter-process_communication). The value SHOULD be normalized to lowercase.436    """437 438    NETWORK_TYPE = "network.type"439    """440    [OSI Network Layer](https://osi-model.com/network-layer/) or non-OSI equivalent. The value SHOULD be normalized to lowercase.441    """442 443    DB_MSSQL_INSTANCE_NAME = "db.mssql.instance_name"444    """445    The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.446    Note: If setting a `db.mssql.instance_name`, `server.port` is no longer required (but still recommended if non-standard).447    """448 449    DB_CASSANDRA_PAGE_SIZE = "db.cassandra.page_size"450    """451    The fetch size used for paging, i.e. how many rows will be returned at once.452    """453 454    DB_CASSANDRA_CONSISTENCY_LEVEL = "db.cassandra.consistency_level"455    """456    The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).457    """458 459    DB_CASSANDRA_TABLE = "db.cassandra.table"460    """461    The name of the primary table that the operation is acting upon, including the keyspace name (if applicable).462    Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.463    """464 465    DB_CASSANDRA_IDEMPOTENCE = "db.cassandra.idempotence"466    """467    Whether or not the query is idempotent.468    """469 470    DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = (471        "db.cassandra.speculative_execution_count"472    )473    """474    The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.475    """476 477    DB_CASSANDRA_COORDINATOR_ID = "db.cassandra.coordinator.id"478    """479    The ID of the coordinating node for a query.480    """481 482    DB_CASSANDRA_COORDINATOR_DC = "db.cassandra.coordinator.dc"483    """484    The data center of the coordinating node for a query.485    """486 487    DB_REDIS_DATABASE_INDEX = "db.redis.database_index"488    """489    The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.490    """491 492    DB_MONGODB_COLLECTION = "db.mongodb.collection"493    """494    The collection being accessed within the database stated in `db.name`.495    """496 497    URL_FULL = "url.full"498    """499    Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986).500    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.501    `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/`.502    `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes.503    """504 505    DB_SQL_TABLE = "db.sql.table"506    """507    The name of the primary table that the operation is acting upon, including the database name (if applicable).508    Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.509    """510 511    DB_COSMOSDB_CLIENT_ID = "db.cosmosdb.client_id"512    """513    Unique Cosmos client instance id.514    """515 516    DB_COSMOSDB_OPERATION_TYPE = "db.cosmosdb.operation_type"517    """518    CosmosDB Operation Type.519    """520 521    USER_AGENT_ORIGINAL = "user_agent.original"522    """523    Full user-agent string is generated by Cosmos DB SDK.524    Note: The user-agent value is generated by SDK which is a combination of<br> `sdk_version` : Current version of SDK. e.g. 'cosmos-netstandard-sdk/3.23.0'<br> `direct_pkg_version` : Direct package version used by Cosmos DB SDK. e.g. '3.23.1'<br> `number_of_client_instances` : Number of cosmos client instances created by the application. e.g. '1'<br> `type_of_machine_architecture` : Machine architecture. e.g. 'X64'<br> `operating_system` : Operating System. e.g. 'Linux 5.4.0-1098-azure 104 18'<br> `runtime_framework` : Runtime Framework. e.g. '.NET Core 3.1.32'<br> `failover_information` : Generated key to determine if region failover enabled.525       Format Reg-{D (Disabled discovery)}-S(application region)|L(List of preferred regions)|N(None, user did not configure it).526       Default value is "NS".527    """528 529    DB_COSMOSDB_CONNECTION_MODE = "db.cosmosdb.connection_mode"530    """531    Cosmos client connection mode.532    """533 534    DB_COSMOSDB_CONTAINER = "db.cosmosdb.container"535    """536    Cosmos DB container name.537    """538 539    DB_COSMOSDB_REQUEST_CONTENT_LENGTH = "db.cosmosdb.request_content_length"540    """541    Request payload size in bytes.542    """543 544    DB_COSMOSDB_STATUS_CODE = "db.cosmosdb.status_code"545    """546    Cosmos DB status code.547    """548 549    DB_COSMOSDB_SUB_STATUS_CODE = "db.cosmosdb.sub_status_code"550    """551    Cosmos DB sub status code.552    """553 554    DB_COSMOSDB_REQUEST_CHARGE = "db.cosmosdb.request_charge"555    """556    RU consumed for that operation.557    """558 559    OTEL_STATUS_CODE = "otel.status_code"560    """561    Name of the code, either "OK" or "ERROR". MUST NOT be set if the status code is UNSET.562    """563 564    OTEL_STATUS_DESCRIPTION = "otel.status_description"565    """566    Description of the Status if it has a value, otherwise not set.567    """568 569    FAAS_TRIGGER = "faas.trigger"570    """571    Type of the trigger which caused this function invocation.572    Note: For the server/consumer span on the incoming side,573    `faas.trigger` MUST be set.574 575    Clients invoking FaaS instances usually cannot set `faas.trigger`,576    since they would typically need to look in the payload to determine577    the event type. If clients set it, it should be the same as the578    trigger that corresponding incoming would have (i.e., this has579    nothing to do with the underlying transport used to make the API580    call to invoke the lambda, which is often HTTP).581    """582 583    FAAS_INVOCATION_ID = "faas.invocation_id"584    """585    The invocation ID of the current function invocation.586    """587 588    CLOUD_RESOURCE_ID = "cloud.resource_id"589    """590    Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP).591    Note: On some cloud providers, it may not be possible to determine the full ID at startup,592    so it may be necessary to set `cloud.resource_id` as a span attribute instead.593 594    The exact value to use for `cloud.resource_id` depends on the cloud provider.595    The following well-known definitions MUST be used if you set this attribute and they apply:596 597    * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).598      Take care not to use the "invoked ARN" directly but replace any599      [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)600      with the resolved function version, as the same runtime instance may be invokable with601      multiple different aliases.602    * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)603    * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) of the invoked function,604      *not* the function app, having the form605      `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.606      This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share607      a TracerProvider.608    """609 610    FAAS_DOCUMENT_COLLECTION = "faas.document.collection"611    """612    The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.613    """614 615    FAAS_DOCUMENT_OPERATION = "faas.document.operation"616    """617    Describes the type of the operation that was performed on the data.618    """619 620    FAAS_DOCUMENT_TIME = "faas.document.time"621    """622    A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).623    """624 625    FAAS_DOCUMENT_NAME = "faas.document.name"626    """627    The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.628    """629 630    URL_PATH = "url.path"631    """632    The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component.633    Note: When missing, the value is assumed to be `/`.634    """635 636    URL_QUERY = "url.query"637    """638    The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component.639    Note: Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it.640    """641 642    MESSAGING_SYSTEM = "messaging.system"643    """644    A string identifying the messaging system.645    """646 647    MESSAGING_OPERATION = "messaging.operation"648    """649    A string identifying the kind of messaging operation as defined in the [Operation names](#operation-names) section above.650    Note: If a custom value is used, it MUST be of low cardinality.651    """652 653    MESSAGING_BATCH_MESSAGE_COUNT = "messaging.batch.message_count"654    """655    The number of messages sent, received, or processed in the scope of the batching operation.656    Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.657    """658 659    MESSAGING_CLIENT_ID = "messaging.client_id"660    """661    A unique identifier for the client that consumes or produces a message.662    """663 664    MESSAGING_DESTINATION_NAME = "messaging.destination.name"665    """666    The message destination name.667    Note: Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If668    the broker does not have such notion, the destination name SHOULD uniquely identify the broker.669    """670 671    MESSAGING_DESTINATION_TEMPLATE = "messaging.destination.template"672    """673    Low cardinality representation of the messaging destination name.674    Note: Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.675    """676 677    MESSAGING_DESTINATION_TEMPORARY = "messaging.destination.temporary"678    """679    A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.680    """681 682    MESSAGING_DESTINATION_ANONYMOUS = "messaging.destination.anonymous"683    """684    A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).685    """686 687    MESSAGING_MESSAGE_ID = "messaging.message.id"688    """689    A value used by the messaging system as an identifier for the message, represented as a string.690    """691 692    MESSAGING_MESSAGE_CONVERSATION_ID = "messaging.message.conversation_id"693    """694    The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".695    """696 697    MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = (698        "messaging.message.payload_size_bytes"699    )700    """701    The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.702    """703 704    MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = (705        "messaging.message.payload_compressed_size_bytes"706    )707    """708    The compressed size of the message payload in bytes.709    """710 711    FAAS_TIME = "faas.time"712    """713    A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).714    """715 716    FAAS_CRON = "faas.cron"717    """718    A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).719    """720 721    FAAS_COLDSTART = "faas.coldstart"722    """723    A boolean that is true if the serverless function is executed for the first time (aka cold-start).724    """725 726    FAAS_INVOKED_NAME = "faas.invoked_name"727    """728    The name of the invoked function.729    Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.730    """731 732    FAAS_INVOKED_PROVIDER = "faas.invoked_provider"733    """734    The cloud provider of the invoked function.735    Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.736    """737 738    FAAS_INVOKED_REGION = "faas.invoked_region"739    """740    The cloud region of the invoked function.741    Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.742    """743 744    NETWORK_CONNECTION_TYPE = "network.connection.type"745    """746    The internet connection type.747    """748 749    NETWORK_CONNECTION_SUBTYPE = "network.connection.subtype"750    """751    This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.752    """753 754    NETWORK_CARRIER_NAME = "network.carrier.name"755    """756    The name of the mobile carrier.757    """758 759    NETWORK_CARRIER_MCC = "network.carrier.mcc"760    """761    The mobile carrier country code.762    """763 764    NETWORK_CARRIER_MNC = "network.carrier.mnc"765    """766    The mobile carrier network code.767    """768 769    NETWORK_CARRIER_ICC = "network.carrier.icc"770    """771    The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.772    """773 774    PEER_SERVICE = "peer.service"775    """776    The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.777    """778 779    ENDUSER_ID = "enduser.id"780    """781    Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.782    """783 784    ENDUSER_ROLE = "enduser.role"785    """786    Actual/assumed role the client is making the request under extracted from token or application security context.787    """788 789    ENDUSER_SCOPE = "enduser.scope"790    """791    Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).792    """793 794    THREAD_ID = "thread.id"795    """796    Current "managed" thread ID (as opposed to OS thread ID).797    """798 799    THREAD_NAME = "thread.name"800    """801    Current thread name.802    """803 804    CODE_FUNCTION = "code.function"805    """806    The method or function name, or equivalent (usually rightmost part of the code unit's name).807    """808 809    CODE_NAMESPACE = "code.namespace"810    """811    The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.812    """813 814    CODE_FILEPATH = "code.filepath"815    """816    The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).817    """818 819    CODE_LINENO = "code.lineno"820    """821    The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.822    """823 824    CODE_COLUMN = "code.column"825    """826    The column number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.827    """828 829    HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original"830    """831    Original HTTP method sent by the client in the request line.832    """833 834    HTTP_REQUEST_BODY_SIZE = "http.request.body.size"835    """836    The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.837    """838 839    HTTP_RESPONSE_BODY_SIZE = "http.response.body.size"840    """841    The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.842    """843 844    HTTP_RESEND_COUNT = "http.resend_count"845    """846    The ordinal number of request resending attempt (for any reason, including redirects).847    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).848    """849 850    RPC_SYSTEM = "rpc.system"851    """852    The value `aws-api`.853    """854 855    RPC_SERVICE = "rpc.service"856    """857    The name of the service to which a request is made, as returned by the AWS SDK.858    Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).859    """860 861    RPC_METHOD = "rpc.method"862    """863    The name of the operation corresponding to the request, as returned by the AWS SDK.864    Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).865    """866 867    AWS_REQUEST_ID = "aws.request_id"868    """869    The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`.870    """871 872    AWS_DYNAMODB_TABLE_NAMES = "aws.dynamodb.table_names"873    """874    The keys in the `RequestItems` object field.875    """876 877    AWS_DYNAMODB_CONSUMED_CAPACITY = "aws.dynamodb.consumed_capacity"878    """879    The JSON-serialized value of each item in the `ConsumedCapacity` response field.880    """881 882    AWS_DYNAMODB_ITEM_COLLECTION_METRICS = (883        "aws.dynamodb.item_collection_metrics"884    )885    """886    The JSON-serialized value of the `ItemCollectionMetrics` response field.887    """888 889    AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = (890        "aws.dynamodb.provisioned_read_capacity"891    )892    """893    The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.894    """895 896    AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = (897        "aws.dynamodb.provisioned_write_capacity"898    )899    """900    The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.901    """902 903    AWS_DYNAMODB_CONSISTENT_READ = "aws.dynamodb.consistent_read"904    """905    The value of the `ConsistentRead` request parameter.906    """907 908    AWS_DYNAMODB_PROJECTION = "aws.dynamodb.projection"909    """910    The value of the `ProjectionExpression` request parameter.911    """912 913    AWS_DYNAMODB_LIMIT = "aws.dynamodb.limit"914    """915    The value of the `Limit` request parameter.916    """917 918    AWS_DYNAMODB_ATTRIBUTES_TO_GET = "aws.dynamodb.attributes_to_get"919    """920    The value of the `AttributesToGet` request parameter.921    """922 923    AWS_DYNAMODB_INDEX_NAME = "aws.dynamodb.index_name"924    """925    The value of the `IndexName` request parameter.926    """927 928    AWS_DYNAMODB_SELECT = "aws.dynamodb.select"929    """930    The value of the `Select` request parameter.931    """932 933    AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = (934        "aws.dynamodb.global_secondary_indexes"935    )936    """937    The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.938    """939 940    AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = (941        "aws.dynamodb.local_secondary_indexes"942    )943    """944    The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.945    """946 947    AWS_DYNAMODB_EXCLUSIVE_START_TABLE = "aws.dynamodb.exclusive_start_table"948    """949    The value of the `ExclusiveStartTableName` request parameter.950    """951 952    AWS_DYNAMODB_TABLE_COUNT = "aws.dynamodb.table_count"953    """954    The the number of items in the `TableNames` response parameter.955    """956 957    AWS_DYNAMODB_SCAN_FORWARD = "aws.dynamodb.scan_forward"958    """959    The value of the `ScanIndexForward` request parameter.960    """961 962    AWS_DYNAMODB_SEGMENT = "aws.dynamodb.segment"963    """964    The value of the `Segment` request parameter.965    """966 967    AWS_DYNAMODB_TOTAL_SEGMENTS = "aws.dynamodb.total_segments"968    """969    The value of the `TotalSegments` request parameter.970    """971 972    AWS_DYNAMODB_COUNT = "aws.dynamodb.count"973    """974    The value of the `Count` response parameter.975    """976 977    AWS_DYNAMODB_SCANNED_COUNT = "aws.dynamodb.scanned_count"978    """979    The value of the `ScannedCount` response parameter.980    """981 982    AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = "aws.dynamodb.attribute_definitions"983    """984    The JSON-serialized value of each item in the `AttributeDefinitions` request field.985    """986 987    AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = (988        "aws.dynamodb.global_secondary_index_updates"989    )990    """991    The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.992    """993 994    AWS_S3_BUCKET = "aws.s3.bucket"995    """996    The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.997    Note: The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter.998    This applies to almost all S3 operations except `list-buckets`.999    """1000 1001    AWS_S3_KEY = "aws.s3.key"1002    """1003    The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations.1004    Note: The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter.1005    This applies in particular to the following operations:1006 1007    - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)1008    - [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)1009    - [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)1010    - [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)1011    - [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)1012    - [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)1013    - [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)1014    - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)1015    - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)1016    - [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)1017    - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)1018    - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)1019    - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).1020    """1021 1022    AWS_S3_COPY_SOURCE = "aws.s3.copy_source"1023    """1024    The source object (in the form `bucket`/`key`) for the copy operation.1025    Note: The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter1026    of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).1027    This applies in particular to the following operations:1028 1029    - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)1030    - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).1031    """1032 1033    AWS_S3_UPLOAD_ID = "aws.s3.upload_id"1034    """1035    Upload ID that identifies the multipart upload.1036    Note: The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter1037    of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations.1038    This applies in particular to the following operations:1039 1040    - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)1041    - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)1042    - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)1043    - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)1044    - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html).1045    """1046 1047    AWS_S3_DELETE = "aws.s3.delete"1048    """1049    The delete request container that specifies the objects to be deleted.1050    Note: The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation.1051    The `delete` attribute corresponds to the `--delete` parameter of the1052    [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).1053    """1054 1055    AWS_S3_PART_NUMBER = "aws.s3.part_number"1056    """1057    The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000.1058    Note: The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)1059    and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations.1060    The `part_number` attribute corresponds to the `--part-number` parameter of the1061    [upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).1062    """1063 1064    GRAPHQL_OPERATION_NAME = "graphql.operation.name"1065    """1066    The name of the operation being executed.1067    """1068 1069    GRAPHQL_OPERATION_TYPE = "graphql.operation.type"1070    """1071    The type of the operation being executed.1072    """1073 1074    GRAPHQL_DOCUMENT = "graphql.document"1075    """1076    The GraphQL document being executed.1077    Note: The value may be sanitized to exclude sensitive information.1078    """1079 1080    MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = (1081        "messaging.rabbitmq.destination.routing_key"1082    )1083    """1084    RabbitMQ message routing key.1085    """1086 1087    MESSAGING_KAFKA_MESSAGE_KEY = "messaging.kafka.message.key"1088    """1089    Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.1090    Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.1091    """1092 1093    MESSAGING_KAFKA_CONSUMER_GROUP = "messaging.kafka.consumer.group"1094    """1095    Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.1096    """1097 1098    MESSAGING_KAFKA_DESTINATION_PARTITION = (1099        "messaging.kafka.destination.partition"1100    )1101    """1102    Partition the message is sent to.1103    """1104 1105    MESSAGING_KAFKA_MESSAGE_OFFSET = "messaging.kafka.message.offset"1106    """1107    The offset of a record in the corresponding Kafka partition.1108    """1109 1110    MESSAGING_KAFKA_MESSAGE_TOMBSTONE = "messaging.kafka.message.tombstone"1111    """1112    A boolean that is true if the message is a tombstone.1113    """1114 1115    MESSAGING_ROCKETMQ_NAMESPACE = "messaging.rocketmq.namespace"1116    """1117    Namespace of RocketMQ resources, resources in different namespaces are individual.1118    """1119 1120    MESSAGING_ROCKETMQ_CLIENT_GROUP = "messaging.rocketmq.client_group"1121    """1122    Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind.1123    """1124 1125    MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = (1126        "messaging.rocketmq.message.delivery_timestamp"1127    )1128    """1129    The timestamp in milliseconds that the delay message is expected to be delivered to consumer.1130    """1131 1132    MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = (1133        "messaging.rocketmq.message.delay_time_level"1134    )1135    """1136    The delay time level for delay message, which determines the message delay time.1137    """1138 1139    MESSAGING_ROCKETMQ_MESSAGE_GROUP = "messaging.rocketmq.message.group"1140    """1141    It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group.1142    """1143 1144    MESSAGING_ROCKETMQ_MESSAGE_TYPE = "messaging.rocketmq.message.type"1145    """1146    Type of message.1147    """1148 1149    MESSAGING_ROCKETMQ_MESSAGE_TAG = "messaging.rocketmq.message.tag"1150    """1151    The secondary classifier of message besides topic.1152    """1153 1154    MESSAGING_ROCKETMQ_MESSAGE_KEYS = "messaging.rocketmq.message.keys"1155    """1156    Key(s) of message, another way to mark message besides message id.1157    """1158 1159    MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = (1160        "messaging.rocketmq.consumption_model"1161    )1162    """1163    Model of message consumption. This only applies to consumer spans.1164    """1165 1166    RPC_GRPC_STATUS_CODE = "rpc.grpc.status_code"1167    """1168    The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.1169    """1170 1171    RPC_JSONRPC_VERSION = "rpc.jsonrpc.version"1172    """1173    Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.1174    """1175 1176    RPC_JSONRPC_REQUEST_ID = "rpc.jsonrpc.request_id"1177    """1178    `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.1179    """1180 1181    RPC_JSONRPC_ERROR_CODE = "rpc.jsonrpc.error_code"1182    """1183    `error.code` property of response if it is an error response.1184    """1185 1186    RPC_JSONRPC_ERROR_MESSAGE = "rpc.jsonrpc.error_message"1187    """1188    `error.message` property of response if it is an error response.1189    """1190 1191    MESSAGE_TYPE = "message.type"1192    """1193    Whether this is a received or sent message.1194    """1195 1196    MESSAGE_ID = "message.id"1197    """1198    MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.1199    Note: This way we guarantee that the values will be consistent between different implementations.1200    """

Showing the first 1,200 of 2208 lines. Download the file for the rest.

codekingpro/portable-devtools · Team Ai