NET_HOST_PORT = longKey("net.host.port");
-
- /**
- * Deprecated, use {@code server.socket.address}.
+ * Notes:
*
- * @deprecated Deprecated, use `server.socket.address`.
+ *
+ * - When observed from the source side, and when communicating through an intermediary,
+ * {@code destination.address} SHOULD represent the destination address behind any
+ * intermediaries (e.g. proxies) if it's available.
+ *
*/
- @Deprecated
- public static final AttributeKey NET_SOCK_HOST_ADDR = stringKey("net.sock.host.addr");
+ public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address");
+
+ /** Destination port number */
+ public static final AttributeKey DESTINATION_PORT = longKey("destination.port");
/**
- * Deprecated, use {@code server.socket.port}.
+ * Describes a class of error the operation ended with.
*
- * @deprecated Deprecated, use `server.socket.port`.
+ * Notes:
+ *
+ *
+ * - The {@code error.type} SHOULD be predictable and SHOULD have low cardinality.
+ * Instrumentations SHOULD document the list of errors they report.
+ *
- The cardinality of {@code error.type} within one instrumentation library SHOULD be low,
+ * but telemetry consumers that aggregate data from multiple instrumentation libraries and
+ * applications should be prepared for {@code 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 {@code
+ * error.type}.
+ *
- If a specific domain defines its own set of error codes (such as HTTP or gRPC status
+ * codes), it's RECOMMENDED to use a domain-specific attribute and also set {@code
+ * error.type} to capture all errors, regardless of whether they are defined within the
+ * domain-specific set or not.
+ *
*/
- @Deprecated
- public static final AttributeKey NET_SOCK_HOST_PORT = longKey("net.sock.host.port");
+ public static final AttributeKey ERROR_TYPE = stringKey("error.type");
+
+ /** The exception message. */
+ public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message");
/**
- * Deprecated, use {@code network.transport}.
- *
- * @deprecated Deprecated, use `network.transport`.
+ * 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.
*/
- @Deprecated public static final AttributeKey NET_TRANSPORT = stringKey("net.transport");
+ public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace");
/**
- * Deprecated, use {@code network.protocol.name}.
- *
- * @deprecated Deprecated, use `network.protocol.name`.
+ * 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.
*/
- @Deprecated
- public static final AttributeKey NET_PROTOCOL_NAME = stringKey("net.protocol.name");
+ public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type");
/**
- * Deprecated, use {@code network.protocol.version}.
+ * The name of the invoked function.
*
- * @deprecated Deprecated, use `network.protocol.version`.
+ * Notes:
+ *
+ *
+ * - SHOULD be equal to the {@code faas.name} resource attribute of the invoked function.
+ *
*/
- @Deprecated
- public static final AttributeKey NET_PROTOCOL_VERSION = stringKey("net.protocol.version");
+ public static final AttributeKey FAAS_INVOKED_NAME = stringKey("faas.invoked_name");
/**
- * Deprecated, use {@code network.transport} and {@code network.type}.
+ * The cloud provider of the invoked function.
*
- * @deprecated Deprecated, use `network.transport` and `network.type`.
+ * Notes:
+ *
+ *
+ * - SHOULD be equal to the {@code cloud.provider} resource attribute of the invoked function.
+ *
*/
- @Deprecated
- public static final AttributeKey NET_SOCK_FAMILY = stringKey("net.sock.family");
+ public static final AttributeKey FAAS_INVOKED_PROVIDER =
+ stringKey("faas.invoked_provider");
/**
- * The domain name of the destination system.
+ * The cloud region of the invoked function.
*
* Notes:
*
*
- * - This value may be a host name, a fully qualified domain name, or another host naming
- * format.
+ *
- SHOULD be equal to the {@code cloud.region} resource attribute of the invoked function.
*
*/
- public static final AttributeKey DESTINATION_DOMAIN = stringKey("destination.domain");
+ public static final AttributeKey FAAS_INVOKED_REGION = stringKey("faas.invoked_region");
- /** Peer address, for example IP address or UNIX socket name. */
- public static final AttributeKey DESTINATION_ADDRESS = stringKey("destination.address");
+ /** Type of the trigger which caused this function invocation. */
+ public static final AttributeKey FAAS_TRIGGER = stringKey("faas.trigger");
- /** Peer port number */
- public static final AttributeKey DESTINATION_PORT = longKey("destination.port");
+ /**
+ * The {@code service.name} of the remote service.
+ * SHOULD be equal to the actual {@code service.name} resource attribute of the remote service if
+ * any.
+ */
+ public static final AttributeKey PEER_SERVICE = stringKey("peer.service");
/**
- * 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.
+ * Username or client_id extracted from the access token or Authorization header in the inbound
+ * request from outside the system.
*/
- public static final AttributeKey EXCEPTION_TYPE = stringKey("exception.type");
+ public static final AttributeKey ENDUSER_ID = stringKey("enduser.id");
- /** The exception message. */
- public static final AttributeKey EXCEPTION_MESSAGE = stringKey("exception.message");
+ /**
+ * Actual/assumed role the client is making the request under extracted from token or application
+ * security context.
+ */
+ public static final AttributeKey ENDUSER_ROLE = stringKey("enduser.role");
/**
- * 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.
+ * 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 or an
+ * attribute value in a SAML
+ * 2.0 Assertion.
*/
- public static final AttributeKey EXCEPTION_STACKTRACE = stringKey("exception.stacktrace");
+ public static final AttributeKey ENDUSER_SCOPE = stringKey("enduser.scope");
+
+ /** Whether the thread is daemon or not. */
+ public static final AttributeKey THREAD_DAEMON = booleanKey("thread.daemon");
+
+ /** Current "managed" thread ID (as opposed to OS thread ID). */
+ public static final AttributeKey THREAD_ID = longKey("thread.id");
+
+ /** Current thread name. */
+ public static final AttributeKey THREAD_NAME = stringKey("thread.name");
/**
- * HTTP request method.
- *
- * Notes:
- *
- *
- * - HTTP request method value SHOULD be "known" to the instrumentation. By default,
- * this convention defines "known" methods as the ones listed in RFC9110 and the PATCH
- * method defined in RFC5789.
- *
- If the HTTP request method is not known to instrumentation, it MUST set the {@code
- * http.request.method} attribute to {@code _OTHER} and, except if reporting a metric, MUST
- * set the exact method received in the request line as value of the {@code
- * http.request.method_original} attribute.
- *
- If the HTTP instrumentation could end up converting valid HTTP request methods to {@code
- * _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 {@code 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 {@code http.request.method_original}
- * to the original value.
- *
+ * The column number in {@code code.filepath} best representing the operation. It SHOULD point
+ * within the code unit named in {@code code.function}.
*/
- public static final AttributeKey HTTP_REQUEST_METHOD = stringKey("http.request.method");
+ public static final AttributeKey CODE_COLUMN = longKey("code.column");
- /** HTTP response status code. */
- public static final AttributeKey HTTP_RESPONSE_STATUS_CODE =
- longKey("http.response.status_code");
+ /**
+ * The source code file name that identifies the code unit as uniquely as possible (preferably an
+ * absolute file path).
+ */
+ public static final AttributeKey CODE_FILEPATH = stringKey("code.filepath");
/**
- * The matched route (path template in the format used by the respective server framework). See
- * note below
- *
- * Notes:
- *
- *
- * - 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 if there is one.
- *
+ * The method or function name, or equivalent (usually rightmost part of the code unit's name).
*/
- public static final AttributeKey HTTP_ROUTE = stringKey("http.route");
+ public static final AttributeKey CODE_FUNCTION = stringKey("code.function");
- /** The name identifies the event. */
- public static final AttributeKey EVENT_NAME = stringKey("event.name");
+ /**
+ * The line number in {@code code.filepath} best representing the operation. It SHOULD point
+ * within the code unit named in {@code code.function}.
+ */
+ public static final AttributeKey CODE_LINENO = longKey("code.lineno");
+
+ /**
+ * The "namespace" within which {@code code.function} is defined. Usually the qualified
+ * class or module name, such that {@code code.namespace} + some separator + {@code code.function}
+ * form a unique identifier for the code unit.
+ */
+ public static final AttributeKey CODE_NAMESPACE = stringKey("code.namespace");
/**
* The domain identifies the business context for the events.
@@ -314,6 +327,9 @@ public final class SemanticAttributes {
*/
public static final AttributeKey EVENT_DOMAIN = stringKey("event.domain");
+ /** The name identifies the event. */
+ public static final AttributeKey EVENT_NAME = stringKey("event.name");
+
/**
* A unique identifier for the Log Record.
*
@@ -335,19 +351,39 @@ public final class SemanticAttributes {
/** The basename of the file. */
public static final AttributeKey LOG_FILE_NAME = stringKey("log.file.name");
- /** The full path to the file. */
- public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path");
-
/** The basename of the file, with symlinks resolved. */
public static final AttributeKey LOG_FILE_NAME_RESOLVED =
stringKey("log.file.name_resolved");
- /** The full path to the file, with symlinks resolved. */
- public static final AttributeKey LOG_FILE_PATH_RESOLVED =
+ /** The full path to the file. */
+ public static final AttributeKey LOG_FILE_PATH = stringKey("log.file.path");
+
+ /** The full path to the file, with symlinks resolved. */
+ public static final AttributeKey LOG_FILE_PATH_RESOLVED =
stringKey("log.file.path_resolved");
- /** The type of memory. */
- public static final AttributeKey TYPE = stringKey("type");
+ /**
+ * The name of the connection pool; unique within the instrumented application. In case the
+ * connection pool implementation does not provide a name, then the db.connection_string
+ * should be used
+ */
+ public static final AttributeKey POOL_NAME = stringKey("pool.name");
+
+ /** The state of a connection in the pool */
+ public static final AttributeKey STATE = stringKey("state");
+
+ /**
+ * Name of the buffer pool.
+ *
+ * Notes:
+ *
+ *
+ */
+ public static final AttributeKey JVM_BUFFER_POOL_NAME = stringKey("jvm.buffer.pool.name");
/**
* Name of the memory pool.
@@ -359,224 +395,498 @@ public final class SemanticAttributes {
* href="https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()">MemoryPoolMXBean#getName()