opentelemetry-semantic_conventions 1.43.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/opentelemetry/semantic_conventions/version.rb +2 -2
  4. data/lib/opentelemetry/semconv/client/attributes.rb +3 -3
  5. data/lib/opentelemetry/semconv/code/attributes.rb +1 -1
  6. data/lib/opentelemetry/semconv/container/attributes.rb +1 -1
  7. data/lib/opentelemetry/semconv/db/attributes.rb +16 -11
  8. data/lib/opentelemetry/semconv/incubating/android/attributes.rb +1 -1
  9. data/lib/opentelemetry/semconv/incubating/app/attributes.rb +1 -1
  10. data/lib/opentelemetry/semconv/incubating/artifact/attributes.rb +3 -3
  11. data/lib/opentelemetry/semconv/incubating/aws/attributes.rb +1 -1
  12. data/lib/opentelemetry/semconv/incubating/azure/attributes.rb +20 -0
  13. data/lib/opentelemetry/semconv/incubating/browser/attributes.rb +30 -0
  14. data/lib/opentelemetry/semconv/incubating/client/attributes.rb +73 -3
  15. data/lib/opentelemetry/semconv/incubating/cloudfoundry/attributes.rb +1 -1
  16. data/lib/opentelemetry/semconv/incubating/code/attributes.rb +1 -1
  17. data/lib/opentelemetry/semconv/incubating/container/attributes.rb +3 -3
  18. data/lib/opentelemetry/semconv/incubating/container/metrics.rb +40 -34
  19. data/lib/opentelemetry/semconv/incubating/cpu/attributes.rb +4 -2
  20. data/lib/opentelemetry/semconv/incubating/db/attributes.rb +24 -14
  21. data/lib/opentelemetry/semconv/incubating/db/metrics.rb +8 -2
  22. data/lib/opentelemetry/semconv/incubating/deployment/attributes.rb +1 -1
  23. data/lib/opentelemetry/semconv/incubating/destination/attributes.rb +53 -2
  24. data/lib/opentelemetry/semconv/incubating/enduser/attributes.rb +2 -0
  25. data/lib/opentelemetry/semconv/incubating/faas/attributes.rb +7 -3
  26. data/lib/opentelemetry/semconv/incubating/file/attributes.rb +3 -3
  27. data/lib/opentelemetry/semconv/incubating/gcp/attributes.rb +20 -0
  28. data/lib/opentelemetry/semconv/incubating/host/attributes.rb +61 -2
  29. data/lib/opentelemetry/semconv/incubating/http/attributes.rb +59 -0
  30. data/lib/opentelemetry/semconv/incubating/jvm/attributes.rb +24 -0
  31. data/lib/opentelemetry/semconv/incubating/jvm/metrics.rb +45 -2
  32. data/lib/opentelemetry/semconv/incubating/k8s/metrics.rb +315 -73
  33. data/lib/opentelemetry/semconv/incubating/kafka/attributes.rb +55 -0
  34. data/lib/opentelemetry/semconv/incubating/kafka.rb +21 -0
  35. data/lib/opentelemetry/semconv/incubating/log/attributes.rb +7 -7
  36. data/lib/opentelemetry/semconv/incubating/mcp/attributes.rb +1 -1
  37. data/lib/opentelemetry/semconv/incubating/messaging/attributes.rb +78 -29
  38. data/lib/opentelemetry/semconv/incubating/network/attributes.rb +107 -5
  39. data/lib/opentelemetry/semconv/incubating/opentracing/attributes.rb +1 -0
  40. data/lib/opentelemetry/semconv/incubating/oracle/attributes.rb +1 -1
  41. data/lib/opentelemetry/semconv/incubating/otel/metrics.rb +25 -8
  42. data/lib/opentelemetry/semconv/incubating/peer/attributes.rb +1 -1
  43. data/lib/opentelemetry/semconv/incubating/pprof/attributes.rb +2 -2
  44. data/lib/opentelemetry/semconv/incubating/process/metrics.rb +16 -1
  45. data/lib/opentelemetry/semconv/incubating/rabbitmq/attributes.rb +41 -0
  46. data/lib/opentelemetry/semconv/incubating/rabbitmq.rb +21 -0
  47. data/lib/opentelemetry/semconv/incubating/rocketmq/attributes.rb +71 -0
  48. data/lib/opentelemetry/semconv/incubating/rocketmq.rb +21 -0
  49. data/lib/opentelemetry/semconv/incubating/rpc/attributes.rb +111 -36
  50. data/lib/opentelemetry/semconv/incubating/rpc/metrics.rb +6 -2
  51. data/lib/opentelemetry/semconv/incubating/server/attributes.rb +71 -1
  52. data/lib/opentelemetry/semconv/incubating/service/attributes.rb +16 -0
  53. data/lib/opentelemetry/semconv/incubating/session/attributes.rb +1 -1
  54. data/lib/opentelemetry/semconv/incubating/source/attributes.rb +53 -2
  55. data/lib/opentelemetry/semconv/incubating/system/attributes.rb +15 -9
  56. data/lib/opentelemetry/semconv/incubating/system/metrics.rb +18 -5
  57. data/lib/opentelemetry/semconv/incubating/url/attributes.rb +15 -3
  58. data/lib/opentelemetry/semconv/incubating/v8js/attributes.rb +2 -1
  59. data/lib/opentelemetry/semconv/incubating/zos/attributes.rb +4 -2
  60. data/lib/opentelemetry/semconv/network/attributes.rb +2 -2
  61. data/lib/opentelemetry/semconv/rpc/attributes.rb +77 -0
  62. data/lib/opentelemetry/semconv/rpc/metrics.rb +45 -0
  63. data/lib/opentelemetry/semconv/rpc.rb +22 -0
  64. data/lib/opentelemetry/semconv/server/attributes.rb +1 -1
  65. data/lib/opentelemetry/semconv/url/attributes.rb +12 -0
  66. data/lib/opentelemetry/semconv.rb +4 -0
  67. metadata +14 -5
@@ -66,7 +66,7 @@ module OpenTelemetry
66
66
  # @deprecated Replaced by `db.collection.name`.
67
67
  DB_CASSANDRA_TABLE = 'db.cassandra.table'
68
68
 
69
- # The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.
69
+ # The name of the connection pool. If the connection pool does not have a name, instrumentation SHOULD use `db.namespace`; otherwise `server.address`, with `server.port` appended using `:` if set. When appending a port to an IPv6 address, instrumentation MUST enclose the address in square brackets. If `server.address` is not available, instrumentation SHOULD use `db.system.name`; otherwise the connection pool library name.
70
70
  #
71
71
  # @note Stability Level: development
72
72
  DB_CLIENT_CONNECTION_POOL_NAME = 'db.client.connection.pool.name'
@@ -97,8 +97,9 @@ module OpenTelemetry
97
97
  # when the database system supports query text with multiple collections
98
98
  # in non-batch operations.
99
99
  #
100
- # For batch operations, if the individual operations are known to have the same
101
- # collection name then that collection name SHOULD be used.
100
+ # For batch operations, if the individual operations would all have the same
101
+ # `db.collection.name` when executed as non-batch operations,
102
+ # then that collection name SHOULD be used.
102
103
  #
103
104
  # @note Stability Level: stable
104
105
  #
@@ -284,9 +285,10 @@ module OpenTelemetry
284
285
  # If spaces can occur in the operation name, multiple consecutive spaces
285
286
  # SHOULD be normalized to a single space.
286
287
  #
287
- # For batch operations, if the individual operations are known to have the same operation name
288
- # then that operation name SHOULD be used prepended by `BATCH `,
289
- # otherwise `db.operation.name` SHOULD be `BATCH` or some other database
288
+ # For batch operations, if the individual operations would all have the same
289
+ # `db.operation.name` when executed as non-batch operations,
290
+ # then that operation name SHOULD be used prepended by `BATCH `.
291
+ # Otherwise, `db.operation.name` SHOULD be `BATCH` or some other database
290
292
  # system specific term if more applicable.
291
293
  #
292
294
  # @note Stability Level: stable
@@ -326,7 +328,12 @@ module OpenTelemetry
326
328
  # up with the parameterized placeholders present in `db.query.text`.
327
329
  #
328
330
  # It is RECOMMENDED to capture the value as provided by the application
329
- # without attempting to do any case normalization.
331
+ # without attempting to do any case normalization or sanitization.
332
+ #
333
+ # Instrumentations SHOULD NOT capture `db.query.parameter.<key>` by default
334
+ # since values may contain PII or sensitive details.
335
+ # Application operators are expected to enable specific keys depending
336
+ # on their privacy and security considerations.
330
337
  #
331
338
  # `db.query.parameter.<key>` SHOULD NOT be captured on batch operations.
332
339
  #
@@ -352,9 +359,10 @@ module OpenTelemetry
352
359
  # [Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
353
360
  # section.
354
361
  #
355
- # For batch operations, if the individual operations are known to have the same query summary
356
- # then that query summary SHOULD be used prepended by `BATCH `,
357
- # otherwise `db.query.summary` SHOULD be `BATCH` or some other database
362
+ # For batch operations, if the individual operations would all have the same
363
+ # `db.query.summary` when executed as non-batch operations,
364
+ # then that query summary SHOULD be used prepended by `BATCH `.
365
+ # Otherwise, `db.query.summary` SHOULD be `BATCH` or some other database
358
366
  # system specific term if more applicable.
359
367
  #
360
368
  # @note Stability Level: stable
@@ -365,7 +373,7 @@ module OpenTelemetry
365
373
  # The database query being executed.
366
374
  #
367
375
  # For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
368
- # 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.
376
+ # For batch operations, if the individual operations would all have the same `db.query.text` when executed as non-batch operations, 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.
369
377
  # 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.
370
378
  #
371
379
  # @note Stability Level: stable
@@ -376,7 +384,7 @@ module OpenTelemetry
376
384
  # Deprecated, use `db.namespace` instead.
377
385
  #
378
386
  # @note Stability Level: development
379
- # @deprecated Uncategorized.
387
+ # @deprecated Replaced by `db.namespace` (string).
380
388
  DB_REDIS_DATABASE_INDEX = 'db.redis.database_index'
381
389
 
382
390
  # Number of rows returned by the operation.
@@ -387,6 +395,7 @@ module OpenTelemetry
387
395
  # Database response status code.
388
396
  #
389
397
  # 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.
398
+ # The value MAY use a standardized string representation of a numeric status code, if one exists, instead of the numeric code. The value MAY be a synthetic status provided by the client library rather than returned by the remote service.
390
399
  # Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
391
400
  #
392
401
  # @note Stability Level: stable
@@ -411,8 +420,9 @@ module OpenTelemetry
411
420
  # It is RECOMMENDED to capture the value as provided by the application
412
421
  # without attempting to do any case normalization.
413
422
  #
414
- # For batch operations, if the individual operations are known to have the same
415
- # stored procedure name then that stored procedure name SHOULD be used.
423
+ # For batch operations, if the individual operations would all have the same
424
+ # `db.stored_procedure.name` when executed as non-batch operations,
425
+ # then that stored procedure name SHOULD be used.
416
426
  #
417
427
  # @note Stability Level: stable
418
428
  #
@@ -47,6 +47,12 @@ module OpenTelemetry
47
47
  # The maximum number of open connections allowed.
48
48
  #
49
49
  # @note Stability Level: development
50
+ DB_CLIENT_CONNECTION_LIMIT = 'db.client.connection.limit'
51
+
52
+ # Deprecated, use `db.client.connection.limit` instead.
53
+ #
54
+ # @note Stability Level: development
55
+ # @deprecated Replaced by `db.client.connection.limit`.
50
56
  DB_CLIENT_CONNECTION_MAX = 'db.client.connection.max'
51
57
 
52
58
  # The number of current pending requests for an open connection.
@@ -87,10 +93,10 @@ module OpenTelemetry
87
93
  # @deprecated Replaced by `db.client.connection.idle.min`.
88
94
  DB_CLIENT_CONNECTIONS_IDLE_MIN = 'db.client.connections.idle.min'
89
95
 
90
- # Deprecated, use `db.client.connection.max` instead.
96
+ # Deprecated, use `db.client.connection.limit` instead.
91
97
  #
92
98
  # @note Stability Level: development
93
- # @deprecated Replaced by `db.client.connection.max`.
99
+ # @deprecated Replaced by `db.client.connection.limit`.
94
100
  DB_CLIENT_CONNECTIONS_MAX = 'db.client.connections.max'
95
101
 
96
102
  # Deprecated, use `db.client.connection.pending_requests` instead.
@@ -45,7 +45,7 @@ module OpenTelemetry
45
45
  # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::DEPLOYMENT::DEPLOYMENT_ENVIRONMENT_NAME}.
46
46
  DEPLOYMENT_ENVIRONMENT_NAME = 'deployment.environment.name'
47
47
 
48
- # The id of the deployment.
48
+ # The ID of the deployment.
49
49
  #
50
50
  # @note Stability Level: development
51
51
  DEPLOYMENT_ID = 'deployment.id'
@@ -24,18 +24,69 @@ module OpenTelemetry
24
24
  module DESTINATION
25
25
  # @!group Attribute Names
26
26
 
27
- # Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
27
+ # Destination address as observed at the point of instrumentation - typically an IP address, or a UNIX domain socket name; a domain name only when the receiver was addressed by name (for example a peer-to-peer node dialed by hostname), never obtained via reverse DNS lookup.
28
28
  #
29
- # When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available.
29
+ # `destination.address` SHOULD be the receiver address as observed at the point of instrumentation, for example the destination of the packet, flow, or exchange seen on the wire or socket. Instrumentation SHOULD capture the available address and SHOULD NOT try to resolve the address behind intermediaries such as proxies or load balancers, or perform a reverse DNS lookup to obtain a domain name.
30
30
  #
31
31
  # @note Stability Level: development
32
32
  DESTINATION_ADDRESS = 'destination.address'
33
33
 
34
+ # The [Autonomous System Number (ASN)](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) associated with the destination IP address.
35
+ #
36
+ # This attribute SHOULD only be set when the destination address is an IP address and the ASN is available from routing, enrichment, or lookup data. The value SHOULD be represented as an integer without the `AS` prefix.
37
+ #
38
+ # @note Stability Level: development
39
+ DESTINATION_AS_NUMBER = 'destination.as.number'
40
+
41
+ # The name of the organization associated with the autonomous system of the destination IP address.
42
+ #
43
+ # This attribute SHOULD only be set when `destination.as.number` is set and the organization name is available. The value SHOULD be the organization name as provided by the lookup or enrichment source, not the AS name or short code.
44
+ #
45
+ # @note Stability Level: development
46
+ DESTINATION_AS_ORGANIZATION = 'destination.as.organization'
47
+
48
+ # Destination Media Access Control (MAC) address.
49
+ #
50
+ # MAC addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
51
+ # as hyphen-separated octets in uppercase hexadecimal form from most to least significant.
52
+ #
53
+ # > [!WARNING]> This attribute may contain sensitive (PII) information.
54
+ #
55
+ # @note Stability Level: development
56
+ DESTINATION_MAC_ADDRESS = 'destination.mac.address'
57
+
34
58
  # Destination port number
35
59
  #
36
60
  # @note Stability Level: development
37
61
  DESTINATION_PORT = 'destination.port'
38
62
 
63
+ # The IP prefix associated with the destination IP address, in CIDR notation.
64
+ #
65
+ # > [!WARNING]> This attribute may contain sensitive (PII) information. A `/32`> IPv4 prefix
66
+ # > or `/128`> IPv6 prefix preserves the complete endpoint IP address.
67
+ # > Using CIDR notation does not guarantee that the data is anonymous.
68
+ #
69
+ # The value MUST be an IPv4 or IPv6 network prefix in CIDR notation, as defined in
70
+ # [RFC 4632](https://www.rfc-editor.org/rfc/rfc4632.html) for IPv4 and
71
+ # [RFC 4291](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.3) for IPv6.
72
+ # IPv4 prefixes MUST use a dotted-decimal address followed by `/` and a decimal
73
+ # prefix length from 0 to 32. IPv6 prefixes MUST use the canonical address text
74
+ # representation defined in [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html),
75
+ # followed by `/` and a decimal prefix length from 0 to 128. All host bits in
76
+ # the address MUST be set to zero. The value MUST NOT contain a domain name,
77
+ # UNIX domain socket name, or IPv6 zone identifier.
78
+ #
79
+ # Instrumentation or Collector receivers that populate this attribute MUST
80
+ # convert native representations, such as an address and subnet mask or an
81
+ # address and prefix length, to equivalent CIDR notation before emitting it.
82
+ #
83
+ # This attribute MAY be set whether or not `destination.address` is set. If
84
+ # `destination.address` is also set to an IP address, it MUST use the same IP version
85
+ # and be contained in this prefix.
86
+ #
87
+ # @note Stability Level: development
88
+ DESTINATION_PREFIX = 'destination.prefix'
89
+
39
90
  # @!endgroup
40
91
  end
41
92
  end
@@ -32,6 +32,7 @@ module OpenTelemetry
32
32
  # > This field contains sensitive (PII) information.
33
33
  #
34
34
  # @note Stability Level: development
35
+ # @deprecated Moved to the [OpenTelemetry Client-Side semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-client-side).
35
36
  ENDUSER_ID = 'enduser.id'
36
37
 
37
38
  # Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.
@@ -42,6 +43,7 @@ module OpenTelemetry
42
43
  # > This field contains sensitive (linkable PII) information.
43
44
  #
44
45
  # @note Stability Level: development
46
+ # @deprecated Moved to the [OpenTelemetry Client-Side semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-client-side).
45
47
  ENDUSER_PSEUDO_ID = 'enduser.pseudo.id'
46
48
 
47
49
  # Deprecated, use `user.roles` instead.
@@ -64,7 +64,12 @@ module OpenTelemetry
64
64
  # The invocation ID of the current function invocation.
65
65
  #
66
66
  # @note Stability Level: development
67
- FAAS_INVOCATION_ID = 'faas.invocation_id'
67
+ FAAS_INVOCATION_ID = 'faas.invocation.id'
68
+
69
+ # 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).
70
+ #
71
+ # @note Stability Level: development
72
+ FAAS_INVOCATION_START_TIME = 'faas.invocation.start_time'
68
73
 
69
74
  # The name of the invoked function.
70
75
  #
@@ -117,8 +122,7 @@ module OpenTelemetry
117
122
  FAAS_NAME = 'faas.name'
118
123
 
119
124
  # 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).
120
- #
121
- # @note Stability Level: development
125
+ # @deprecated Replaced by `faas.invocation.start_time`.
122
126
  FAAS_TIME = 'faas.time'
123
127
 
124
128
  # Type of the trigger which caused this function invocation.
@@ -59,7 +59,7 @@ module OpenTelemetry
59
59
 
60
60
  # File extension, excluding the leading dot.
61
61
  #
62
- # When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
62
+ # When the filename has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
63
63
  #
64
64
  # @note Stability Level: development
65
65
  FILE_EXTENSION = 'file.extension'
@@ -67,7 +67,7 @@ module OpenTelemetry
67
67
  # Name of the fork. A fork is additional data associated with a filesystem object.
68
68
  #
69
69
  # On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.
70
- # On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.
70
+ # On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the internet. An ADS is typically of the form: C:\path\to\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.
71
71
  #
72
72
  # @note Stability Level: development
73
73
  FILE_FORK_NAME = 'file.fork_name'
@@ -127,7 +127,7 @@ module OpenTelemetry
127
127
  # @note Stability Level: development
128
128
  FILE_OWNER_NAME = 'file.owner.name'
129
129
 
130
- # Full path to the file, including the file name. It should include the drive letter, when appropriate.
130
+ # Full path to the file, including the filename. It should include the drive letter, when appropriate.
131
131
  #
132
132
  # @note Stability Level: development
133
133
  FILE_PATH = 'file.path'
@@ -177,6 +177,26 @@ module OpenTelemetry
177
177
  # @note Stability Level: development
178
178
  GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE = 'gcp.gce.instance_group_manager.zone'
179
179
 
180
+ # The ack deadline in seconds set for the modify ack deadline request.
181
+ #
182
+ # @note Stability Level: development
183
+ GCP_PUBSUB_MESSAGE_ACK_DEADLINE = 'gcp.pubsub.message.ack_deadline'
184
+
185
+ # The ack ID for a given message.
186
+ #
187
+ # @note Stability Level: development
188
+ GCP_PUBSUB_MESSAGE_ACK_ID = 'gcp.pubsub.message.ack_id'
189
+
190
+ # The delivery attempt for a given message.
191
+ #
192
+ # @note Stability Level: development
193
+ GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT = 'gcp.pubsub.message.delivery_attempt'
194
+
195
+ # The ordering key for a given message. If the attribute is not present, the message does not have an ordering key.
196
+ #
197
+ # @note Stability Level: development
198
+ GCP_PUBSUB_MESSAGE_ORDERING_KEY = 'gcp.pubsub.message.ordering_key'
199
+
180
200
  # @!endgroup
181
201
  end
182
202
  end
@@ -61,7 +61,66 @@ module OpenTelemetry
61
61
  # @note Stability Level: development
62
62
  HOST_CPU_VENDOR_ID = 'host.cpu.vendor.id'
63
63
 
64
- # Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.
64
+ # Unique host ID, determined by the first matching source in the priority order.
65
+ #
66
+ # SHOULD be determined using the first available source from the following priority tiers:
67
+ #
68
+ # 1. Known cloud vendors - cloud instance ID
69
+ # 2. Known VM vendors - provider VM ID
70
+ # 3. OS-dependent machine ID
71
+ # 4. User-provided value
72
+ #
73
+ # The value SHOULD conform to the following properties:
74
+ #
75
+ # - **Unique** within a given context;
76
+ # - **[Repeatable](https://opentelemetry.io/docs/specs/otel/entities/data-model/#repeatable-identity)** - multiple observers on the same host come up with the same value;
77
+ # - **Persistent** - survives host restarts and software updates.
78
+ #
79
+ # **Collecting `host.id` From Known Environments:** When `host.id` is derived from a
80
+ # cloud vendor instance ID, the resource SHOULD also carry the corresponding
81
+ # `cloud.provider` and `cloud.platform` attributes so that the source of the `host.id`
82
+ # value can be unambiguously determined.
83
+ #
84
+ # The following cloud environments are currently recognized:
85
+ #
86
+ # | Environment | `host.id` source | `cloud.provider` | `cloud.platform` |
87
+ # | --- | --- | --- | --- |
88
+ # | AWS EC2 | EC2 instance ID | `aws` | `aws_ec2` |
89
+ # | AWS EKS (node) | EC2 instance ID | `aws` | `aws_eks` |
90
+ # | Azure VM | `vmId` | `azure` | `azure.vm` |
91
+ # | GCP Compute Engine | GCE instance ID | `gcp` | `gcp_compute_engine` |
92
+ # | GCP GKE (node) | GCE instance ID | `gcp` | `gcp_kubernetes_engine` |
93
+ #
94
+ # The listed `cloud.provider`/`cloud.platform` values are for example only. Refer to the
95
+ # [`cloud`](/docs/registry/attributes/cloud.md) attribute definitions for the relevant set of values.
96
+ #
97
+ # **Non-privileged Machine ID Lookup:** When collecting `host.id` for non-containerized
98
+ # systems, non-privileged lookups of the machine ID are preferred. SDK detector
99
+ # implementations MUST use the sources listed below to obtain the machine ID.
100
+ #
101
+ # | OS | Primary | Fallback |
102
+ # | --- | --- | --- |
103
+ # | Linux | contents of `/etc/machine-id` | contents of `/var/lib/dbus/machine-id` |
104
+ # | BSD | contents of `/etc/hostid` | output of `/bin/kenv -q smbios.system.uuid` |
105
+ # | macOS | `IOPlatformUUID` line from the output of `/usr/sbin/ioreg -rd1 -c "IOPlatformExpertDevice"` | - |
106
+ # | Windows | `MachineGuid` from registry `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography` | - |
107
+ #
108
+ # **Privileged Machine ID Lookup:** The `host.id` can be looked up using privileged
109
+ # sources. For example, Linux systems can use the output of `dmidecode -t system`,
110
+ # `dmidecode -t baseboard`,
111
+ # `dmidecode -t chassis`, or read the corresponding data from the filesystem
112
+ # (e.g. `cat /sys/devices/virtual/dmi/id/product_id`,
113
+ # `cat /sys/devices/virtual/dmi/id/product_uuid`, etc), however, SDK resource
114
+ # detector implementations MUST NOT collect `host.id` from privileged sources. If
115
+ # privileged lookup of `host.id` is required, the value SHOULD be injected via the
116
+ # `OTEL_RESOURCE_ATTRIBUTES` environment variable.
117
+ #
118
+ # **Collecting `host.id` From User Configuration:** If none of the above sources yields
119
+ # a non-empty value, the implementation MAY be unable to determine `host.id`
120
+ # automatically and SHOULD omit the attribute.
121
+ # In that case, the `host.id` can only be provided through user configuration
122
+ # or other available manual options. Users SHOULD ensure that the `host.id` value
123
+ # conforms to the properties stated above.
65
124
  #
66
125
  # @note Stability Level: development
67
126
  HOST_ID = 'host.id'
@@ -95,7 +154,7 @@ module OpenTelemetry
95
154
  # @note Stability Level: development
96
155
  HOST_MAC = 'host.mac'
97
156
 
98
- # Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.
157
+ # Name of the host. On UNIX systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.
99
158
  #
100
159
  # @note Stability Level: development
101
160
  HOST_NAME = 'host.name'
@@ -53,6 +53,34 @@ module OpenTelemetry
53
53
  # @deprecated Replaced by `http.request.method`.
54
54
  HTTP_METHOD = 'http.method'
55
55
 
56
+ # The content of the HTTP request body, with any content coding indicated by [Content-Encoding](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding) removed, captured as a string when the request content is textual or as byte array otherwise.
57
+ #
58
+ # Captured value MAY be limited in size and thus value is expected to be truncated in many cases.
59
+ # When an instrumentation applies a byte-based limit while capturing the body as a string, it SHOULD truncate on a character
60
+ # boundary so that the recorded value remains valid text.
61
+ #
62
+ # Instrumentations MUST NOT capture this attribute by default and MAY provide an option to enable it.
63
+ #
64
+ # > [!WARNING]
65
+ # > This attribute may contain sensitive information.
66
+ #
67
+ # When instrumentations record body, they SHOULD capture the body as string whenever possible as it makes it easier to use in human-readable form,
68
+ # also it allows to implement sanitization if needed.
69
+ #
70
+ # Textual content is typically detected based on the [Content-Type](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-type) header using heuristics
71
+ # such as checking if the type/subtype (compared case-insensitively, ignoring any parameters) starts with `text/`, ends with `/json`, `+json`, `/xml`, `+xml`, `/yaml` or `+yaml`,
72
+ # is `application/x-www-form-urlencoded`, or if the header declares a `charset` parameter.
73
+ #
74
+ # Instrumentations that implement request body recording MUST NOT intentionally introduce side effects such as changing stream position or closing body stream independently from the
75
+ # application.
76
+ #
77
+ # When body is recorded, the instrumentation SHOULD record part of the body that was sent or received at the time HTTP call has ended.
78
+ # The value MUST be either a string or a byte array. Instrumentations MUST NOT record a parsed or otherwise structured representation of the body,
79
+ # and MUST NOT base64-encode binary content into a string value.
80
+ #
81
+ # @note Stability Level: development
82
+ HTTP_REQUEST_BODY_CONTENT = 'http.request.body.content'
83
+
56
84
  # 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.
57
85
  #
58
86
  # @note Stability Level: development
@@ -151,6 +179,37 @@ module OpenTelemetry
151
179
  # @deprecated Replaced by `http.request.body.size`.
152
180
  HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed'
153
181
 
182
+ # The content of the HTTP response body, with any content coding indicated by [Content-Encoding](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding) removed, captured as a string when the response content is textual or as byte array otherwise.
183
+ #
184
+ # Captured value MAY be limited in size and thus value is expected to be truncated in many cases.
185
+ # When an instrumentation applies a byte-based limit while capturing the body as a string, it SHOULD truncate on a character
186
+ # boundary so that the recorded value remains valid text.
187
+ #
188
+ # Instrumentations MUST NOT capture this attribute by default and MAY provide an option to enable it.
189
+ #
190
+ # > [!WARNING]
191
+ # > This attribute may contain sensitive information.
192
+ #
193
+ # When instrumentations record body, they SHOULD capture the body as string whenever possible as it makes it easier to use in human-readable form,
194
+ # also it allows to implement sanitization if needed.
195
+ #
196
+ # Textual content is typically detected based on the [Content-Type](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-type) header using heuristics
197
+ # such as checking if the type/subtype (compared case-insensitively, ignoring any parameters) starts with `text/`, ends with `/json`, `+json`, `/xml`, `+xml`, `/yaml` or `+yaml`,
198
+ # is `application/x-www-form-urlencoded`, or if the header declares a `charset` parameter.
199
+ #
200
+ # Instrumentations that implement response body recording MUST NOT intentionally introduce side effects such as changing stream position or closing body stream independently from the
201
+ # application.
202
+ #
203
+ # When body is recorded, the instrumentation SHOULD record part of the body that was sent or received at the time HTTP call has ended.
204
+ # Note that HTTP client spans [SHOULD end sometime after the response headers are fully read](/docs/http/http-spans.md#http-client-span-duration),
205
+ # which may or may not include reading the response body, so on client spans this attribute is often absent or holds only part of the body.
206
+ #
207
+ # The value MUST be either a string or a byte array. Instrumentations MUST NOT record a parsed or otherwise structured representation of the body,
208
+ # and MUST NOT base64-encode binary content into a string value.
209
+ #
210
+ # @note Stability Level: development
211
+ HTTP_RESPONSE_BODY_CONTENT = 'http.response.body.content'
212
+
154
213
  # 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.
155
214
  #
156
215
  # @note Stability Level: development
@@ -31,6 +31,30 @@ module OpenTelemetry
31
31
  # @note Stability Level: development
32
32
  JVM_BUFFER_POOL_NAME = 'jvm.buffer.pool.name'
33
33
 
34
+ # Name of the executor.
35
+ #
36
+ # The executor name SHOULD be low-cardinality. If `jvm.executor.owner.name` is present, the combination of `jvm.executor.owner.name` and `jvm.executor.name` SHOULD be unique within the instrumented application; otherwise, `jvm.executor.name` SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use `unknown`. The `unknown` value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor's `ThreadFactory`. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, `jvm.executor.name` and `jvm.executor.owner.name` MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.
37
+ #
38
+ # @note Stability Level: development
39
+ JVM_EXECUTOR_NAME = 'jvm.executor.name'
40
+
41
+ # Name of the logical component that owns the executor.
42
+ #
43
+ # The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.
44
+ #
45
+ # @note Stability Level: development
46
+ JVM_EXECUTOR_OWNER_NAME = 'jvm.executor.owner.name'
47
+
48
+ # State of an executor thread.
49
+ #
50
+ # @note Stability Level: development
51
+ JVM_EXECUTOR_THREAD_STATE = 'jvm.executor.thread.state'
52
+
53
+ # The fully qualified class name of the executor implementation.
54
+ #
55
+ # @note Stability Level: development
56
+ JVM_EXECUTOR_TYPE = 'jvm.executor.type'
57
+
34
58
  # Name of the garbage collector action.
35
59
  #
36
60
  # Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
@@ -89,14 +89,57 @@ module OpenTelemetry
89
89
  # @deprecated Now available in the stable namespace at {OpenTelemetry::SemConv::JVM::JVM_CPU_TIME}.
90
90
  JVM_CPU_TIME = 'jvm.cpu.time'
91
91
 
92
- # Number of open file descriptors as reported by the JVM.
92
+ # The maximum number of tasks the executor queue can hold.
93
+ #
94
+ # Instrumentations SHOULD emit this metric only when the queue has a finite capacity that represents a meaningful operational limit. This metric SHOULD NOT be emitted for unbounded or effectively unbounded queues.
95
+ #
96
+ # @note Stability Level: development
97
+ JVM_EXECUTOR_QUEUE_CAPACITY = 'jvm.executor.queue.capacity'
98
+
99
+ # The number of tasks currently queued for execution.
100
+ #
101
+ # @note Stability Level: development
102
+ JVM_EXECUTOR_QUEUE_SIZE = 'jvm.executor.queue.size'
103
+
104
+ # The number of tasks completed by the executor.
105
+ #
106
+ # A task SHOULD be counted as completed when the executor has finished processing it, regardless of whether it returns normally, terminates with an exception, or is canceled. Cancellation during processing does not complete the task until processing ends. A task that never begins processing on the executor SHOULD NOT be counted. A task initially rejected but subsequently resubmitted to and processed by the executor SHOULD be counted when processing ends.
93
107
  #
94
108
  # @note Stability Level: development
109
+ JVM_EXECUTOR_TASK_COMPLETED = 'jvm.executor.task.completed'
110
+
111
+ # The number of task submissions rejected by the executor.
112
+ #
113
+ # A task submission SHOULD be counted as rejected when the executor invokes its rejection handler, regardless of whether the handler subsequently executes the task in the caller (for example, `CallerRunsPolicy`) or discards or replaces a queued task (for example, `DiscardOldestPolicy`). This metric counts rejected submissions, not tasks ultimately discarded from the queue.
114
+ #
115
+ # @note Stability Level: development
116
+ JVM_EXECUTOR_TASK_REJECTED = 'jvm.executor.task.rejected'
117
+
118
+ # The number of core threads configured for the executor.
119
+ #
120
+ # @note Stability Level: development
121
+ JVM_EXECUTOR_THREAD_CORE = 'jvm.executor.thread.core'
122
+
123
+ # The number of executor threads that are currently in the state described by the `jvm.executor.thread.state` attribute.
124
+ #
125
+ # @note Stability Level: development
126
+ JVM_EXECUTOR_THREAD_COUNT = 'jvm.executor.thread.count'
127
+
128
+ # The maximum number of threads allowed for the executor.
129
+ #
130
+ # Instrumentations SHOULD emit this metric only when the maximum thread count is finite and represents a meaningful operational limit. This metric SHOULD NOT be emitted for unbounded or effectively unbounded executors. For example, an executor with a maximum thread count of `Integer.MAX_VALUE` is effectively unbounded.
131
+ #
132
+ # @note Stability Level: development
133
+ JVM_EXECUTOR_THREAD_LIMIT = 'jvm.executor.thread.limit'
134
+
135
+ # Number of open file descriptors as reported by the JVM.
136
+ #
137
+ # @note Stability Level: release_candidate
95
138
  JVM_FILE_DESCRIPTOR_COUNT = 'jvm.file_descriptor.count'
96
139
 
97
140
  # Measure of max open file descriptors as reported by the JVM.
98
141
  #
99
- # @note Stability Level: development
142
+ # @note Stability Level: release_candidate
100
143
  JVM_FILE_DESCRIPTOR_LIMIT = 'jvm.file_descriptor.limit'
101
144
 
102
145
  # Duration of JVM garbage collection actions.