@songtonyli/dsh-cli 0.1.98 → 0.1.100

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 (190) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +12 -0
  4. package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
  5. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
  8. package/node_modules/@aws-sdk/core/package.json +1 -1
  9. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  10. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  11. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  12. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  13. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  14. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  15. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  16. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  17. package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
  18. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
  19. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -2
  20. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
  23. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
  24. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
  25. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
  26. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
  27. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
  28. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  29. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  30. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/boot.js +1 -1
  31. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/file.js +1 -1
  32. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/index.js +3 -0
  33. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/from-binary.js +3 -1
  34. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/index.js +7 -2
  35. package/node_modules/@bufbuild/protobuf/dist/cjs/package.json +1 -0
  36. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/reflect.js +0 -1
  37. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/registry.js +79 -10
  38. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/to-json.js +1 -1
  39. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/to-text.js +4 -9
  40. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/binary-encoding.js +9 -5
  41. package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/text-encoding.js +7 -3
  42. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +2 -2
  43. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +2 -2
  44. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +1 -0
  45. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +3 -1
  46. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +1 -1
  47. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +0 -1
  48. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +77 -10
  49. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +1 -1
  50. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +4 -9
  51. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +9 -5
  52. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +7 -3
  53. package/node_modules/@bufbuild/protobuf/package.json +70 -267
  54. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  56. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +8 -8
  57. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +4 -4
  58. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +4 -4
  59. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +507 -127
  60. package/node_modules/@eslint-community/regexpp/index.js +3 -3
  61. package/node_modules/@eslint-community/regexpp/index.mjs +3 -3
  62. package/node_modules/@eslint-community/regexpp/package.json +1 -1
  63. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +1461 -176
  64. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +1363 -171
  65. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +1 -1
  66. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +1 -1
  67. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +382 -95
  68. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +358 -94
  69. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +132 -8
  70. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +5 -5
  71. package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +8 -0
  72. package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +3 -3
  73. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +104 -13
  74. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +99 -14
  75. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +16 -0
  76. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +15 -1
  77. package/node_modules/@opentelemetry/semantic-conventions/package.json +2 -2
  78. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1 -0
  79. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +33 -5
  80. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +33 -5
  81. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +1 -0
  82. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +11 -5
  83. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
  84. package/node_modules/@smithy/core/package.json +2 -2
  85. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +10 -4
  86. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +6 -2
  87. package/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +4 -2
  88. package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
  89. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +31 -31
  90. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +2 -4
  91. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +29 -27
  92. package/node_modules/@smithy/node-http-handler/package.json +3 -3
  93. package/node_modules/@smithy/types/package.json +1 -1
  94. package/node_modules/commander/Readme.md +6 -32
  95. package/node_modules/commander/index.js +1 -1
  96. package/node_modules/commander/lib/command.js +22 -9
  97. package/node_modules/commander/lib/help.js +6 -2
  98. package/node_modules/commander/lib/option.js +1 -1
  99. package/node_modules/commander/package.json +2 -1
  100. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +3 -2
  101. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  102. package/node_modules/jose/dist/webapi/jws/general/verify.js +2 -8
  103. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +11 -8
  104. package/node_modules/jose/dist/webapi/lib/key_management.js +0 -1
  105. package/node_modules/jose/package.json +1 -1
  106. package/node_modules/vfile-message/lib/index.js +44 -14
  107. package/node_modules/vfile-message/package.json +6 -13
  108. package/node_modules/vfile-message/readme.md +9 -14
  109. package/package.json +23 -23
  110. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +0 -4
  111. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +0 -4
  112. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/clone.js +0 -0
  113. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/boot.js +0 -0
  114. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/enum.js +0 -0
  115. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/extension.js +0 -0
  116. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/file.js +0 -0
  117. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/index.js +0 -0
  118. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/message.js +0 -0
  119. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/service.js +0 -0
  120. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/symbols.js +0 -0
  121. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv1/types.js +0 -0
  122. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/embed.js +0 -0
  123. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/enum.js +0 -0
  124. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/extension.js +0 -0
  125. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/message.js +0 -0
  126. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/restore-json-names.js +0 -0
  127. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/scalar.js +0 -0
  128. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/service.js +0 -0
  129. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/symbols.js +0 -0
  130. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/codegenv2/types.js +0 -0
  131. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/create.js +0 -0
  132. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/descriptors.js +0 -0
  133. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/equals.js +0 -0
  134. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/extensions.js +0 -0
  135. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/fields.js +0 -0
  136. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/from-json.js +0 -0
  137. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/is-message.js +0 -0
  138. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/json-value.js +0 -0
  139. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/merge.js +0 -0
  140. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/proto-int64.js +0 -0
  141. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/error.js +0 -0
  142. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/guard.js +0 -0
  143. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/index.js +0 -0
  144. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/message.js +0 -0
  145. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/names.js +0 -0
  146. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/nested-types.js +0 -0
  147. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/path.js +0 -0
  148. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/reflect-check.js +0 -0
  149. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/reflect-types.js +0 -0
  150. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/scalar.js +0 -0
  151. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/reflect/unsafe.js +0 -0
  152. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/to-binary.js +0 -0
  153. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/from-text.js +0 -0
  154. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/index.js +0 -0
  155. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/is-group-like.js +0 -0
  156. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/reader.js +0 -0
  157. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/txtpb/writer.js +0 -0
  158. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/types.js +0 -0
  159. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/unknown-enum.js +0 -0
  160. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/base64-encoding.js +0 -0
  161. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/index.js +0 -0
  162. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/size-delimited.js +0 -0
  163. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/text-format.js +0 -0
  164. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wire/varint.js +0 -0
  165. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/any.js +0 -0
  166. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/duration.js +0 -0
  167. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/any_pb.js +0 -0
  168. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/api_pb.js +0 -0
  169. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/c_sharp_features_pb.js +0 -0
  170. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/compiler/plugin_pb.js +0 -0
  171. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/cpp_features_pb.js +0 -0
  172. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/cpp_file_options_pb.js +0 -0
  173. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/cpp_options_pb.js +0 -0
  174. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/descriptor_pb.js +0 -0
  175. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/duration_pb.js +0 -0
  176. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/empty_pb.js +0 -0
  177. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/field_mask_pb.js +0 -0
  178. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/go_features_pb.js +0 -0
  179. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/java_features_pb.js +0 -0
  180. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/json_enumvalue_options_pb.js +0 -0
  181. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/json_options_pb.js +0 -0
  182. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/source_context_pb.js +0 -0
  183. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/struct_pb.js +0 -0
  184. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/timestamp_pb.js +0 -0
  185. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/type_pb.js +0 -0
  186. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/google/protobuf/wrappers_pb.js +0 -0
  187. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/index.js +0 -0
  188. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/json.js +0 -0
  189. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/timestamp.js +0 -0
  190. /package/node_modules/@bufbuild/protobuf/dist/{commonjs → cjs}/wkt/wrappers.js +0 -0
@@ -119,7 +119,7 @@ const ATTR_ASPNETCORE_USER_IS_AUTHENTICATED = "aspnetcore.user.is_authenticated"
119
119
  * @example 10.1.2.80
120
120
  * @example /tmp/my.sock
121
121
  *
122
- * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available.
122
+ * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available.
123
123
  */
124
124
  const ATTR_CLIENT_ADDRESS = "client.address";
125
125
  /**
@@ -127,7 +127,7 @@ const ATTR_CLIENT_ADDRESS = "client.address";
127
127
  *
128
128
  * @example 65123
129
129
  *
130
- * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available.
130
+ * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available.
131
131
  */
132
132
  const ATTR_CLIENT_PORT = "client.port";
133
133
  /**
@@ -217,8 +217,9 @@ const ATTR_CONTAINER_IMAGE_TAGS = "container.image.tags";
217
217
  * when the database system supports query text with multiple collections
218
218
  * in non-batch operations.
219
219
  *
220
- * For batch operations, if the individual operations are known to have the same
221
- * collection name then that collection name **SHOULD** be used.
220
+ * For batch operations, if the individual operations would all have the same
221
+ * `db.collection.name` when executed as non-batch operations,
222
+ * then that collection name **SHOULD** be used.
222
223
  */
223
224
  const ATTR_DB_COLLECTION_NAME = "db.collection.name";
224
225
  /**
@@ -280,9 +281,10 @@ const ATTR_DB_OPERATION_BATCH_SIZE = "db.operation.batch.size";
280
281
  * If spaces can occur in the operation name, multiple consecutive spaces
281
282
  * **SHOULD** be normalized to a single space.
282
283
  *
283
- * For batch operations, if the individual operations are known to have the same operation name
284
- * then that operation name **SHOULD** be used prepended by `BATCH `,
285
- * otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database
284
+ * For batch operations, if the individual operations would all have the same
285
+ * `db.operation.name` when executed as non-batch operations,
286
+ * then that operation name **SHOULD** be used prepended by `BATCH `.
287
+ * Otherwise, `db.operation.name` **SHOULD** be `BATCH` or some other database
286
288
  * system specific term if more applicable.
287
289
  */
288
290
  const ATTR_DB_OPERATION_NAME = "db.operation.name";
@@ -303,9 +305,10 @@ const ATTR_DB_OPERATION_NAME = "db.operation.name";
303
305
  * [Generating query summary](/docs/db/database-spans.md#generating-a-summary-of-the-query)
304
306
  * section.
305
307
  *
306
- * For batch operations, if the individual operations are known to have the same query summary
307
- * then that query summary **SHOULD** be used prepended by `BATCH `,
308
- * otherwise `db.query.summary` **SHOULD** be `BATCH` or some other database
308
+ * For batch operations, if the individual operations would all have the same
309
+ * `db.query.summary` when executed as non-batch operations,
310
+ * then that query summary **SHOULD** be used prepended by `BATCH `.
311
+ * Otherwise, `db.query.summary` **SHOULD** be `BATCH` or some other database
309
312
  * system specific term if more applicable.
310
313
  */
311
314
  const ATTR_DB_QUERY_SUMMARY = "db.query.summary";
@@ -316,7 +319,7 @@ const ATTR_DB_QUERY_SUMMARY = "db.query.summary";
316
319
  * @example SET mykey ?
317
320
  *
318
321
  * @note For sanitization see [Sanitization of `db.query.text`](/docs/db/database-spans.md#sanitization-of-dbquerytext).
319
- * 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.
322
+ * 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.
320
323
  * 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.
321
324
  */
322
325
  const ATTR_DB_QUERY_TEXT = "db.query.text";
@@ -329,6 +332,7 @@ const ATTR_DB_QUERY_TEXT = "db.query.text";
329
332
  * @example 404
330
333
  *
331
334
  * @note The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
335
+ * 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.
332
336
  * Semantic conventions for individual database systems **SHOULD** document what `db.response.status_code` means in the context of that system.
333
337
  */
334
338
  const ATTR_DB_RESPONSE_STATUS_CODE = "db.response.status_code";
@@ -340,8 +344,9 @@ const ATTR_DB_RESPONSE_STATUS_CODE = "db.response.status_code";
340
344
  * @note It is **RECOMMENDED** to capture the value as provided by the application
341
345
  * without attempting to do any case normalization.
342
346
  *
343
- * For batch operations, if the individual operations are known to have the same
344
- * stored procedure name then that stored procedure name **SHOULD** be used.
347
+ * For batch operations, if the individual operations would all have the same
348
+ * `db.stored_procedure.name` when executed as non-batch operations,
349
+ * then that stored procedure name **SHOULD** be used.
345
350
  */
346
351
  const ATTR_DB_STORED_PROCEDURE_NAME = "db.stored_procedure.name";
347
352
  /**
@@ -1405,6 +1410,74 @@ const OTEL_STATUS_CODE_VALUE_OK = "OK";
1405
1410
  */
1406
1411
  const ATTR_OTEL_STATUS_DESCRIPTION = "otel.status_description";
1407
1412
  /**
1413
+ * The fully-qualified logical name of the method from the RPC interface perspective.
1414
+ *
1415
+ * @example com.example.ExampleService/exampleMethod
1416
+ * @example EchoService/Echo
1417
+ * @example _OTHER
1418
+ *
1419
+ * @note The method name **MAY** have unbounded cardinality in edge or error cases.
1420
+ *
1421
+ * Some RPC frameworks or libraries provide a fixed set of recognized methods
1422
+ * for client stubs and server implementations. Instrumentations for such
1423
+ * frameworks **MUST** set this attribute to the original method name only
1424
+ * when the method is recognized by the framework or library.
1425
+ *
1426
+ * When the method is not recognized, for example, when the server receives
1427
+ * a request for a method that is not predefined on the server, or when
1428
+ * instrumentation is not able to reliably detect if the method is predefined,
1429
+ * the attribute **MUST** be set to `_OTHER`.
1430
+ *
1431
+ * If the RPC instrumentation could end up converting valid RPC methods to
1432
+ * `_OTHER`, then it **SHOULD** provide a way to configure the list of recognized
1433
+ * RPC methods.
1434
+ *
1435
+ * The `rpc.method` can be different from the name of any implementing
1436
+ * method/function.
1437
+ * The `code.function.name` attribute may be used to record the fully-qualified
1438
+ * method actually executing the call on the server side, or the
1439
+ * RPC client stub method on the client side.
1440
+ */
1441
+ const ATTR_RPC_METHOD = "rpc.method";
1442
+ /**
1443
+ * The original name of the method used by the client.
1444
+ *
1445
+ * @example com.myservice.EchoService/catchAll
1446
+ * @example com.myservice.EchoService/unknownMethod
1447
+ * @example InvalidMethod
1448
+ */
1449
+ const ATTR_RPC_METHOD_ORIGINAL = "rpc.method_original";
1450
+ /**
1451
+ * Status code of the RPC returned by the RPC server or generated by the client
1452
+ *
1453
+ * @example OK
1454
+ * @example DEADLINE_EXCEEDED
1455
+ * @example -32602
1456
+ *
1457
+ * @note Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
1458
+ * 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.
1459
+ * Semantic conventions for individual RPC frameworks **SHOULD** document what `rpc.status_code` means in the context of that system and which values are considered to represent errors.
1460
+ */
1461
+ const ATTR_RPC_STATUS_CODE = "rpc.status_code";
1462
+ /**
1463
+ * The Remote Procedure Call (RPC) system.
1464
+ *
1465
+ * @note The client and server RPC systems may differ for the same RPC interaction. For example, a client may use Apache Dubbo or Connect RPC to communicate with a server that uses gRPC since both protocols provide compatibility with gRPC.
1466
+ */
1467
+ const ATTR_RPC_SYSTEM_NAME = "rpc.system.name";
1468
+ /**
1469
+ * Enum value "dubbo" for attribute {@link ATTR_RPC_SYSTEM_NAME}.
1470
+ *
1471
+ * [Apache Dubbo](https://dubbo.apache.org/)
1472
+ */
1473
+ const RPC_SYSTEM_NAME_VALUE_DUBBO = "dubbo";
1474
+ /**
1475
+ * Enum value "grpc" for attribute {@link ATTR_RPC_SYSTEM_NAME}.
1476
+ *
1477
+ * [gRPC](https://grpc.io/)
1478
+ */
1479
+ const RPC_SYSTEM_NAME_VALUE_GRPC = "grpc";
1480
+ /**
1408
1481
  * Server domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.
1409
1482
  *
1410
1483
  * @example example.com
@@ -1676,9 +1749,15 @@ const ATTR_URL_FRAGMENT = "url.fragment";
1676
1749
  * - [`X-Amz-Signature`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1677
1750
  * - [`X-Amz-Credential`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1678
1751
  * - [`X-Amz-Security-Token`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1752
+ * - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
1753
+ * - [`Signature`](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html)
1679
1754
  * - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)
1680
1755
  * - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)
1681
1756
  *
1757
+ * Several of these keys are used by more than one service or signing scheme. Each link
1758
+ * points to one representative usage rather than an exhaustive list, and does not narrow
1759
+ * the scope of the key to the linked service or signing scheme.
1760
+ *
1682
1761
  * This list is subject to change over time.
1683
1762
  *
1684
1763
  * Matching of query parameter keys against the sensitive list **SHOULD** be case-sensitive.
@@ -1716,9 +1795,15 @@ const ATTR_URL_PATH = "url.path";
1716
1795
  * - [`X-Amz-Signature`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1717
1796
  * - [`X-Amz-Credential`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1718
1797
  * - [`X-Amz-Security-Token`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html)
1798
+ * - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)
1799
+ * - [`Signature`](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html)
1719
1800
  * - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)
1720
1801
  * - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)
1721
1802
  *
1803
+ * Several of these keys are used by more than one service or signing scheme. Each link
1804
+ * points to one representative usage rather than an exhaustive list, and does not narrow
1805
+ * the scope of the key to the linked service or signing scheme.
1806
+ *
1722
1807
  * This list is subject to change over time.
1723
1808
  *
1724
1809
  * Matching of query parameter keys against the sensitive list **SHOULD** be case-sensitive.
@@ -1751,6 +1836,6 @@ const ATTR_URL_SCHEME = "url.scheme";
1751
1836
  */
1752
1837
  const ATTR_USER_AGENT_ORIGINAL = "user_agent.original";
1753
1838
  //#endregion
1754
- export { ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED, ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE, ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS, ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT, ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE, ATTR_ASPNETCORE_RATE_LIMITING_POLICY, ATTR_ASPNETCORE_RATE_LIMITING_RESULT, ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED, ATTR_ASPNETCORE_ROUTING_IS_FALLBACK, ATTR_ASPNETCORE_ROUTING_MATCH_STATUS, ATTR_ASPNETCORE_USER_IS_AUTHENTICATED, ATTR_CLIENT_ADDRESS, ATTR_CLIENT_PORT, ATTR_CODE_COLUMN_NUMBER, ATTR_CODE_FILE_PATH, ATTR_CODE_FUNCTION_NAME, ATTR_CODE_LINE_NUMBER, ATTR_CODE_STACKTRACE, ATTR_CONTAINER_ID, ATTR_CONTAINER_IMAGE_NAME, ATTR_CONTAINER_IMAGE_REPO_DIGESTS, ATTR_CONTAINER_IMAGE_TAGS, ATTR_DB_COLLECTION_NAME, ATTR_DB_NAMESPACE, ATTR_DB_OPERATION_BATCH_SIZE, ATTR_DB_OPERATION_NAME, ATTR_DB_QUERY_SUMMARY, ATTR_DB_QUERY_TEXT, ATTR_DB_RESPONSE_STATUS_CODE, ATTR_DB_STORED_PROCEDURE_NAME, ATTR_DB_SYSTEM_NAME, ATTR_DEPLOYMENT_ENVIRONMENT_NAME, ATTR_DOTNET_GC_HEAP_GENERATION, ATTR_ERROR_TYPE, ATTR_EXCEPTION_ESCAPED, ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, ATTR_EXCEPTION_TYPE, ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_REQUEST_METHOD_ORIGINAL, ATTR_HTTP_REQUEST_RESEND_COUNT, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_HTTP_ROUTE, ATTR_JVM_GC_ACTION, ATTR_JVM_GC_NAME, ATTR_JVM_MEMORY_POOL_NAME, ATTR_JVM_MEMORY_TYPE, ATTR_JVM_THREAD_DAEMON, ATTR_JVM_THREAD_STATE, ATTR_K8S_CLUSTER_NAME, ATTR_K8S_CLUSTER_UID, ATTR_K8S_CONTAINER_NAME, ATTR_K8S_CONTAINER_RESTART_COUNT, ATTR_K8S_CRONJOB_ANNOTATION, ATTR_K8S_CRONJOB_LABEL, ATTR_K8S_CRONJOB_NAME, ATTR_K8S_CRONJOB_UID, ATTR_K8S_DAEMONSET_ANNOTATION, ATTR_K8S_DAEMONSET_LABEL, ATTR_K8S_DAEMONSET_NAME, ATTR_K8S_DAEMONSET_UID, ATTR_K8S_DEPLOYMENT_ANNOTATION, ATTR_K8S_DEPLOYMENT_LABEL, ATTR_K8S_DEPLOYMENT_NAME, ATTR_K8S_DEPLOYMENT_UID, ATTR_K8S_JOB_ANNOTATION, ATTR_K8S_JOB_LABEL, ATTR_K8S_JOB_NAME, ATTR_K8S_JOB_UID, ATTR_K8S_NAMESPACE_ANNOTATION, ATTR_K8S_NAMESPACE_LABEL, ATTR_K8S_NAMESPACE_NAME, ATTR_K8S_NODE_ANNOTATION, ATTR_K8S_NODE_LABEL, ATTR_K8S_NODE_NAME, ATTR_K8S_NODE_UID, ATTR_K8S_POD_ANNOTATION, ATTR_K8S_POD_HOSTNAME, ATTR_K8S_POD_IP, ATTR_K8S_POD_LABEL, ATTR_K8S_POD_NAME, ATTR_K8S_POD_START_TIME, ATTR_K8S_POD_UID, ATTR_K8S_REPLICASET_ANNOTATION, ATTR_K8S_REPLICASET_LABEL, ATTR_K8S_REPLICASET_NAME, ATTR_K8S_REPLICASET_UID, ATTR_K8S_STATEFULSET_ANNOTATION, ATTR_K8S_STATEFULSET_LABEL, ATTR_K8S_STATEFULSET_NAME, ATTR_K8S_STATEFULSET_UID, ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_NETWORK_TRANSPORT, ATTR_NETWORK_TYPE, ATTR_OTEL_EVENT_NAME, ATTR_OTEL_SCOPE_NAME, ATTR_OTEL_SCOPE_VERSION, ATTR_OTEL_STATUS_CODE, ATTR_OTEL_STATUS_DESCRIPTION, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_SERVICE_INSTANCE_ID, ATTR_SERVICE_NAME, ATTR_SERVICE_NAMESPACE, ATTR_SERVICE_VERSION, ATTR_SIGNALR_CONNECTION_STATUS, ATTR_SIGNALR_TRANSPORT, ATTR_TELEMETRY_DISTRO_NAME, ATTR_TELEMETRY_DISTRO_VERSION, ATTR_TELEMETRY_SDK_LANGUAGE, ATTR_TELEMETRY_SDK_NAME, ATTR_TELEMETRY_SDK_VERSION, ATTR_URL_FRAGMENT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_QUERY, ATTR_URL_SCHEME, ATTR_USER_AGENT_ORIGINAL, DB_SYSTEM_NAME_VALUE_MARIADB, DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER, DB_SYSTEM_NAME_VALUE_MYSQL, DB_SYSTEM_NAME_VALUE_POSTGRESQL, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST, DOTNET_GC_HEAP_GENERATION_VALUE_GEN0, DOTNET_GC_HEAP_GENERATION_VALUE_GEN1, DOTNET_GC_HEAP_GENERATION_VALUE_GEN2, DOTNET_GC_HEAP_GENERATION_VALUE_LOH, DOTNET_GC_HEAP_GENERATION_VALUE_POH, ERROR_TYPE_VALUE_OTHER, HTTP_REQUEST_METHOD_VALUE_CONNECT, HTTP_REQUEST_METHOD_VALUE_DELETE, HTTP_REQUEST_METHOD_VALUE_GET, HTTP_REQUEST_METHOD_VALUE_HEAD, HTTP_REQUEST_METHOD_VALUE_OPTIONS, HTTP_REQUEST_METHOD_VALUE_OTHER, HTTP_REQUEST_METHOD_VALUE_PATCH, HTTP_REQUEST_METHOD_VALUE_POST, HTTP_REQUEST_METHOD_VALUE_PUT, HTTP_REQUEST_METHOD_VALUE_TRACE, JVM_MEMORY_TYPE_VALUE_HEAP, JVM_MEMORY_TYPE_VALUE_NON_HEAP, JVM_THREAD_STATE_VALUE_BLOCKED, JVM_THREAD_STATE_VALUE_NEW, JVM_THREAD_STATE_VALUE_RUNNABLE, JVM_THREAD_STATE_VALUE_TERMINATED, JVM_THREAD_STATE_VALUE_TIMED_WAITING, JVM_THREAD_STATE_VALUE_WAITING, NETWORK_TRANSPORT_VALUE_PIPE, NETWORK_TRANSPORT_VALUE_QUIC, NETWORK_TRANSPORT_VALUE_TCP, NETWORK_TRANSPORT_VALUE_UDP, NETWORK_TRANSPORT_VALUE_UNIX, NETWORK_TYPE_VALUE_IPV4, NETWORK_TYPE_VALUE_IPV6, OTEL_STATUS_CODE_VALUE_ERROR, OTEL_STATUS_CODE_VALUE_OK, SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN, SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE, SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT, SIGNALR_TRANSPORT_VALUE_LONG_POLLING, SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS, SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS, TELEMETRY_SDK_LANGUAGE_VALUE_CPP, TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET, TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG, TELEMETRY_SDK_LANGUAGE_VALUE_GO, TELEMETRY_SDK_LANGUAGE_VALUE_JAVA, TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN, TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS, TELEMETRY_SDK_LANGUAGE_VALUE_PHP, TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON, TELEMETRY_SDK_LANGUAGE_VALUE_RUBY, TELEMETRY_SDK_LANGUAGE_VALUE_RUST, TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT, TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS };
1839
+ export { ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED, ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER, ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED, ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE, ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS, ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT, ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE, ATTR_ASPNETCORE_RATE_LIMITING_POLICY, ATTR_ASPNETCORE_RATE_LIMITING_RESULT, ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED, ATTR_ASPNETCORE_ROUTING_IS_FALLBACK, ATTR_ASPNETCORE_ROUTING_MATCH_STATUS, ATTR_ASPNETCORE_USER_IS_AUTHENTICATED, ATTR_CLIENT_ADDRESS, ATTR_CLIENT_PORT, ATTR_CODE_COLUMN_NUMBER, ATTR_CODE_FILE_PATH, ATTR_CODE_FUNCTION_NAME, ATTR_CODE_LINE_NUMBER, ATTR_CODE_STACKTRACE, ATTR_CONTAINER_ID, ATTR_CONTAINER_IMAGE_NAME, ATTR_CONTAINER_IMAGE_REPO_DIGESTS, ATTR_CONTAINER_IMAGE_TAGS, ATTR_DB_COLLECTION_NAME, ATTR_DB_NAMESPACE, ATTR_DB_OPERATION_BATCH_SIZE, ATTR_DB_OPERATION_NAME, ATTR_DB_QUERY_SUMMARY, ATTR_DB_QUERY_TEXT, ATTR_DB_RESPONSE_STATUS_CODE, ATTR_DB_STORED_PROCEDURE_NAME, ATTR_DB_SYSTEM_NAME, ATTR_DEPLOYMENT_ENVIRONMENT_NAME, ATTR_DOTNET_GC_HEAP_GENERATION, ATTR_ERROR_TYPE, ATTR_EXCEPTION_ESCAPED, ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, ATTR_EXCEPTION_TYPE, ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_REQUEST_METHOD_ORIGINAL, ATTR_HTTP_REQUEST_RESEND_COUNT, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_HTTP_ROUTE, ATTR_JVM_GC_ACTION, ATTR_JVM_GC_NAME, ATTR_JVM_MEMORY_POOL_NAME, ATTR_JVM_MEMORY_TYPE, ATTR_JVM_THREAD_DAEMON, ATTR_JVM_THREAD_STATE, ATTR_K8S_CLUSTER_NAME, ATTR_K8S_CLUSTER_UID, ATTR_K8S_CONTAINER_NAME, ATTR_K8S_CONTAINER_RESTART_COUNT, ATTR_K8S_CRONJOB_ANNOTATION, ATTR_K8S_CRONJOB_LABEL, ATTR_K8S_CRONJOB_NAME, ATTR_K8S_CRONJOB_UID, ATTR_K8S_DAEMONSET_ANNOTATION, ATTR_K8S_DAEMONSET_LABEL, ATTR_K8S_DAEMONSET_NAME, ATTR_K8S_DAEMONSET_UID, ATTR_K8S_DEPLOYMENT_ANNOTATION, ATTR_K8S_DEPLOYMENT_LABEL, ATTR_K8S_DEPLOYMENT_NAME, ATTR_K8S_DEPLOYMENT_UID, ATTR_K8S_JOB_ANNOTATION, ATTR_K8S_JOB_LABEL, ATTR_K8S_JOB_NAME, ATTR_K8S_JOB_UID, ATTR_K8S_NAMESPACE_ANNOTATION, ATTR_K8S_NAMESPACE_LABEL, ATTR_K8S_NAMESPACE_NAME, ATTR_K8S_NODE_ANNOTATION, ATTR_K8S_NODE_LABEL, ATTR_K8S_NODE_NAME, ATTR_K8S_NODE_UID, ATTR_K8S_POD_ANNOTATION, ATTR_K8S_POD_HOSTNAME, ATTR_K8S_POD_IP, ATTR_K8S_POD_LABEL, ATTR_K8S_POD_NAME, ATTR_K8S_POD_START_TIME, ATTR_K8S_POD_UID, ATTR_K8S_REPLICASET_ANNOTATION, ATTR_K8S_REPLICASET_LABEL, ATTR_K8S_REPLICASET_NAME, ATTR_K8S_REPLICASET_UID, ATTR_K8S_STATEFULSET_ANNOTATION, ATTR_K8S_STATEFULSET_LABEL, ATTR_K8S_STATEFULSET_NAME, ATTR_K8S_STATEFULSET_UID, ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_NAME, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_NETWORK_TRANSPORT, ATTR_NETWORK_TYPE, ATTR_OTEL_EVENT_NAME, ATTR_OTEL_SCOPE_NAME, ATTR_OTEL_SCOPE_VERSION, ATTR_OTEL_STATUS_CODE, ATTR_OTEL_STATUS_DESCRIPTION, ATTR_RPC_METHOD, ATTR_RPC_METHOD_ORIGINAL, ATTR_RPC_STATUS_CODE, ATTR_RPC_SYSTEM_NAME, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_SERVICE_INSTANCE_ID, ATTR_SERVICE_NAME, ATTR_SERVICE_NAMESPACE, ATTR_SERVICE_VERSION, ATTR_SIGNALR_CONNECTION_STATUS, ATTR_SIGNALR_TRANSPORT, ATTR_TELEMETRY_DISTRO_NAME, ATTR_TELEMETRY_DISTRO_VERSION, ATTR_TELEMETRY_SDK_LANGUAGE, ATTR_TELEMETRY_SDK_NAME, ATTR_TELEMETRY_SDK_VERSION, ATTR_URL_FRAGMENT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_QUERY, ATTR_URL_SCHEME, ATTR_USER_AGENT_ORIGINAL, DB_SYSTEM_NAME_VALUE_MARIADB, DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER, DB_SYSTEM_NAME_VALUE_MYSQL, DB_SYSTEM_NAME_VALUE_POSTGRESQL, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING, DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST, DOTNET_GC_HEAP_GENERATION_VALUE_GEN0, DOTNET_GC_HEAP_GENERATION_VALUE_GEN1, DOTNET_GC_HEAP_GENERATION_VALUE_GEN2, DOTNET_GC_HEAP_GENERATION_VALUE_LOH, DOTNET_GC_HEAP_GENERATION_VALUE_POH, ERROR_TYPE_VALUE_OTHER, HTTP_REQUEST_METHOD_VALUE_CONNECT, HTTP_REQUEST_METHOD_VALUE_DELETE, HTTP_REQUEST_METHOD_VALUE_GET, HTTP_REQUEST_METHOD_VALUE_HEAD, HTTP_REQUEST_METHOD_VALUE_OPTIONS, HTTP_REQUEST_METHOD_VALUE_OTHER, HTTP_REQUEST_METHOD_VALUE_PATCH, HTTP_REQUEST_METHOD_VALUE_POST, HTTP_REQUEST_METHOD_VALUE_PUT, HTTP_REQUEST_METHOD_VALUE_TRACE, JVM_MEMORY_TYPE_VALUE_HEAP, JVM_MEMORY_TYPE_VALUE_NON_HEAP, JVM_THREAD_STATE_VALUE_BLOCKED, JVM_THREAD_STATE_VALUE_NEW, JVM_THREAD_STATE_VALUE_RUNNABLE, JVM_THREAD_STATE_VALUE_TERMINATED, JVM_THREAD_STATE_VALUE_TIMED_WAITING, JVM_THREAD_STATE_VALUE_WAITING, NETWORK_TRANSPORT_VALUE_PIPE, NETWORK_TRANSPORT_VALUE_QUIC, NETWORK_TRANSPORT_VALUE_TCP, NETWORK_TRANSPORT_VALUE_UDP, NETWORK_TRANSPORT_VALUE_UNIX, NETWORK_TYPE_VALUE_IPV4, NETWORK_TYPE_VALUE_IPV6, OTEL_STATUS_CODE_VALUE_ERROR, OTEL_STATUS_CODE_VALUE_OK, RPC_SYSTEM_NAME_VALUE_DUBBO, RPC_SYSTEM_NAME_VALUE_GRPC, SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN, SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE, SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT, SIGNALR_TRANSPORT_VALUE_LONG_POLLING, SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS, SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS, TELEMETRY_SDK_LANGUAGE_VALUE_CPP, TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET, TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG, TELEMETRY_SDK_LANGUAGE_VALUE_GO, TELEMETRY_SDK_LANGUAGE_VALUE_JAVA, TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN, TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS, TELEMETRY_SDK_LANGUAGE_VALUE_PHP, TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON, TELEMETRY_SDK_LANGUAGE_VALUE_RUBY, TELEMETRY_SDK_LANGUAGE_VALUE_RUST, TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT, TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS };
1755
1840
 
1756
1841
  //# sourceMappingURL=stable_attributes.mjs.map
@@ -295,6 +295,20 @@ const METRIC_KESTREL_TLS_HANDSHAKE_DURATION = "kestrel.tls_handshake.duration";
295
295
  */
296
296
  const METRIC_KESTREL_UPGRADED_CONNECTIONS = "kestrel.upgraded_connections";
297
297
  /**
298
+ * Measures the duration of an outgoing Remote Procedure Call (RPC).
299
+ *
300
+ * @note When this metric is reported alongside an RPC client span, the metric value
301
+ * **SHOULD** be the same as the RPC client span duration.
302
+ */
303
+ const METRIC_RPC_CLIENT_CALL_DURATION = "rpc.client.call.duration";
304
+ /**
305
+ * Measures the duration of an incoming Remote Procedure Call (RPC).
306
+ *
307
+ * @note When this metric is reported alongside an RPC server span, the metric value
308
+ * **SHOULD** be the same as the RPC server span duration.
309
+ */
310
+ const METRIC_RPC_SERVER_CALL_DURATION = "rpc.server.call.duration";
311
+ /**
298
312
  * Number of connections that are currently active on the server.
299
313
  *
300
314
  * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0
@@ -356,6 +370,8 @@ exports.METRIC_KESTREL_QUEUED_REQUESTS = METRIC_KESTREL_QUEUED_REQUESTS;
356
370
  exports.METRIC_KESTREL_REJECTED_CONNECTIONS = METRIC_KESTREL_REJECTED_CONNECTIONS;
357
371
  exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = METRIC_KESTREL_TLS_HANDSHAKE_DURATION;
358
372
  exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = METRIC_KESTREL_UPGRADED_CONNECTIONS;
373
+ exports.METRIC_RPC_CLIENT_CALL_DURATION = METRIC_RPC_CLIENT_CALL_DURATION;
374
+ exports.METRIC_RPC_SERVER_CALL_DURATION = METRIC_RPC_SERVER_CALL_DURATION;
359
375
  exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS;
360
376
  exports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = METRIC_SIGNALR_SERVER_CONNECTION_DURATION;
361
377
 
@@ -295,6 +295,20 @@ const METRIC_KESTREL_TLS_HANDSHAKE_DURATION = "kestrel.tls_handshake.duration";
295
295
  */
296
296
  const METRIC_KESTREL_UPGRADED_CONNECTIONS = "kestrel.upgraded_connections";
297
297
  /**
298
+ * Measures the duration of an outgoing Remote Procedure Call (RPC).
299
+ *
300
+ * @note When this metric is reported alongside an RPC client span, the metric value
301
+ * **SHOULD** be the same as the RPC client span duration.
302
+ */
303
+ const METRIC_RPC_CLIENT_CALL_DURATION = "rpc.client.call.duration";
304
+ /**
305
+ * Measures the duration of an incoming Remote Procedure Call (RPC).
306
+ *
307
+ * @note When this metric is reported alongside an RPC server span, the metric value
308
+ * **SHOULD** be the same as the RPC server span duration.
309
+ */
310
+ const METRIC_RPC_SERVER_CALL_DURATION = "rpc.server.call.duration";
311
+ /**
298
312
  * Number of connections that are currently active on the server.
299
313
  *
300
314
  * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0
@@ -307,6 +321,6 @@ const METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = "signalr.server.active_connecti
307
321
  */
308
322
  const METRIC_SIGNALR_SERVER_CONNECTION_DURATION = "signalr.server.connection.duration";
309
323
  //#endregion
310
- export { METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS, METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES, METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS, METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS, METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION, METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE, METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS, METRIC_DB_CLIENT_OPERATION_DURATION, METRIC_DOTNET_ASSEMBLY_COUNT, METRIC_DOTNET_EXCEPTIONS, METRIC_DOTNET_GC_COLLECTIONS, METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED, METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE, METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE, METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE, METRIC_DOTNET_GC_PAUSE_TIME, METRIC_DOTNET_JIT_COMPILATION_TIME, METRIC_DOTNET_JIT_COMPILED_IL_SIZE, METRIC_DOTNET_JIT_COMPILED_METHODS, METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS, METRIC_DOTNET_PROCESS_CPU_COUNT, METRIC_DOTNET_PROCESS_CPU_TIME, METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET, METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH, METRIC_DOTNET_THREAD_POOL_THREAD_COUNT, METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT, METRIC_DOTNET_TIMER_COUNT, METRIC_HTTP_CLIENT_REQUEST_DURATION, METRIC_HTTP_SERVER_REQUEST_DURATION, METRIC_JVM_CLASS_COUNT, METRIC_JVM_CLASS_LOADED, METRIC_JVM_CLASS_UNLOADED, METRIC_JVM_CPU_COUNT, METRIC_JVM_CPU_RECENT_UTILIZATION, METRIC_JVM_CPU_TIME, METRIC_JVM_GC_DURATION, METRIC_JVM_MEMORY_COMMITTED, METRIC_JVM_MEMORY_LIMIT, METRIC_JVM_MEMORY_USED, METRIC_JVM_MEMORY_USED_AFTER_LAST_GC, METRIC_JVM_THREAD_COUNT, METRIC_KESTREL_ACTIVE_CONNECTIONS, METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES, METRIC_KESTREL_CONNECTION_DURATION, METRIC_KESTREL_QUEUED_CONNECTIONS, METRIC_KESTREL_QUEUED_REQUESTS, METRIC_KESTREL_REJECTED_CONNECTIONS, METRIC_KESTREL_TLS_HANDSHAKE_DURATION, METRIC_KESTREL_UPGRADED_CONNECTIONS, METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS, METRIC_SIGNALR_SERVER_CONNECTION_DURATION };
324
+ export { METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS, METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES, METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS, METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS, METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION, METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE, METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS, METRIC_DB_CLIENT_OPERATION_DURATION, METRIC_DOTNET_ASSEMBLY_COUNT, METRIC_DOTNET_EXCEPTIONS, METRIC_DOTNET_GC_COLLECTIONS, METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED, METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE, METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE, METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE, METRIC_DOTNET_GC_PAUSE_TIME, METRIC_DOTNET_JIT_COMPILATION_TIME, METRIC_DOTNET_JIT_COMPILED_IL_SIZE, METRIC_DOTNET_JIT_COMPILED_METHODS, METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS, METRIC_DOTNET_PROCESS_CPU_COUNT, METRIC_DOTNET_PROCESS_CPU_TIME, METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET, METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH, METRIC_DOTNET_THREAD_POOL_THREAD_COUNT, METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT, METRIC_DOTNET_TIMER_COUNT, METRIC_HTTP_CLIENT_REQUEST_DURATION, METRIC_HTTP_SERVER_REQUEST_DURATION, METRIC_JVM_CLASS_COUNT, METRIC_JVM_CLASS_LOADED, METRIC_JVM_CLASS_UNLOADED, METRIC_JVM_CPU_COUNT, METRIC_JVM_CPU_RECENT_UTILIZATION, METRIC_JVM_CPU_TIME, METRIC_JVM_GC_DURATION, METRIC_JVM_MEMORY_COMMITTED, METRIC_JVM_MEMORY_LIMIT, METRIC_JVM_MEMORY_USED, METRIC_JVM_MEMORY_USED_AFTER_LAST_GC, METRIC_JVM_THREAD_COUNT, METRIC_KESTREL_ACTIVE_CONNECTIONS, METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES, METRIC_KESTREL_CONNECTION_DURATION, METRIC_KESTREL_QUEUED_CONNECTIONS, METRIC_KESTREL_QUEUED_REQUESTS, METRIC_KESTREL_REJECTED_CONNECTIONS, METRIC_KESTREL_TLS_HANDSHAKE_DURATION, METRIC_KESTREL_UPGRADED_CONNECTIONS, METRIC_RPC_CLIENT_CALL_DURATION, METRIC_RPC_SERVER_CALL_DURATION, METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS, METRIC_SIGNALR_SERVER_CONNECTION_DURATION };
311
325
 
312
326
  //# sourceMappingURL=stable_metrics.mjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/semantic-conventions",
3
- "version": "1.44.0",
3
+ "version": "1.45.0",
4
4
  "description": "OpenTelemetry semantic conventions",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",
@@ -54,5 +54,5 @@
54
54
  },
55
55
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions",
56
56
  "sideEffects": false,
57
- "gitHead": "70253d9c560f2a5d431e404365d4b3d25ddfc464"
57
+ "gitHead": "ee94b842fd734e23064539c5f8069e0af0e92b9a"
58
58
  }
@@ -615,6 +615,7 @@ class Command {
615
615
  commandInstance: this,
616
616
  ...smithyContext,
617
617
  ...(options?.metricsRecorder === undefined ? {} : { metricsRecorder: options.metricsRecorder }),
618
+ ...(options?.abortSignal === undefined ? {} : { abortSignal: options.abortSignal }),
618
619
  },
619
620
  };
620
621
  const { requestHandler } = configuration;
@@ -1,6 +1,7 @@
1
1
  const { NoOpLogger, normalizeProvider } = require("@smithy/core/client");
2
2
  const { HttpResponse, HttpRequest } = require("@smithy/core/protocols");
3
3
  const { parseRfc7231DateTime, v4 } = require("@smithy/core/serde");
4
+ const { SMITHY_CONTEXT_KEY } = require("@smithy/types");
4
5
  const { hasOwn } = require("@smithy/core/transport");
5
6
 
6
7
  const isStreamingPayload = (request) => request?.body instanceof ReadableStream;
@@ -80,6 +81,29 @@ function isNodeJsHttp2TransientError(error) {
80
81
  return error.code === "ERR_HTTP2_STREAM_ERROR" && error.message.includes("NGHTTP2_REFUSED_STREAM");
81
82
  }
82
83
 
84
+ const race = (promise, signal) => {
85
+ if (!signal) {
86
+ return promise;
87
+ }
88
+ let cleanup = () => { };
89
+ const aborted = new Promise((_, reject) => {
90
+ const handler = () => reject(createAbortError());
91
+ if (signal.aborted) {
92
+ handler();
93
+ }
94
+ else if (typeof signal.addEventListener === "function") {
95
+ signal.addEventListener("abort", handler, { once: true });
96
+ cleanup = () => signal.removeEventListener("abort", handler);
97
+ }
98
+ else {
99
+ signal.onabort = handler;
100
+ }
101
+ });
102
+ return Promise.race([promise, aborted]).finally(cleanup);
103
+ };
104
+ const createAbortError = () => Object.assign(new Error("Request aborted"), { name: "AbortError" });
105
+ const isAbortError = (error) => typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
106
+
83
107
  const DEFAULT_RETRY_DELAY_BASE = 100;
84
108
  const MAXIMUM_RETRY_DELAY = 20 * 1000;
85
109
  const THROTTLING_RETRY_DELAY_BASE = 500;
@@ -158,9 +182,11 @@ function bindRetryMiddleware(isStreamingPayload) {
158
182
  return (options) => (next, context) => async (args) => {
159
183
  let retryStrategy = await options.retryStrategy();
160
184
  const maxAttempts = await options.maxAttempts();
185
+ const abortSignal = context[SMITHY_CONTEXT_KEY]?.abortSignal;
161
186
  if (isRetryStrategyV2(retryStrategy)) {
162
187
  retryStrategy = retryStrategy;
163
- let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : ""));
188
+ const retryTokenScope = (context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "");
189
+ let retryToken = await race(retryStrategy.acquireInitialRetryToken(retryTokenScope), abortSignal);
164
190
  let lastError = new Error();
165
191
  let attempts = 0;
166
192
  let totalRetryDelay = 0;
@@ -188,9 +214,12 @@ function bindRetryMiddleware(isStreamingPayload) {
188
214
  throw lastError;
189
215
  }
190
216
  try {
191
- retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
217
+ retryToken = await race(retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo), abortSignal);
192
218
  }
193
- catch (ignoredRefreshError) {
219
+ catch (refreshError) {
220
+ if (abortSignal?.aborted && isAbortError(refreshError)) {
221
+ throw refreshError;
222
+ }
194
223
  if (!lastError.$metadata) {
195
224
  lastError.$metadata = {};
196
225
  }
@@ -202,7 +231,7 @@ function bindRetryMiddleware(isStreamingPayload) {
202
231
  const delay = retryToken.getRetryDelay();
203
232
  totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
204
233
  if (delay > 0) {
205
- await cooldown(delay);
234
+ await race(new Promise((resolve) => setTimeout(resolve, delay)), abortSignal);
206
235
  }
207
236
  }
208
237
  }
@@ -216,7 +245,6 @@ function bindRetryMiddleware(isStreamingPayload) {
216
245
  }
217
246
  };
218
247
  }
219
- const cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
220
248
  const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" &&
221
249
  typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" &&
222
250
  typeof retryStrategy.recordSuccess !== "undefined";
@@ -2,6 +2,7 @@ const { Readable } = require("node:stream");
2
2
  const { NoOpLogger, normalizeProvider } = require("@smithy/core/client");
3
3
  const { HttpResponse, HttpRequest } = require("@smithy/core/protocols");
4
4
  const { parseRfc7231DateTime, v4 } = require("@smithy/core/serde");
5
+ const { SMITHY_CONTEXT_KEY } = require("@smithy/types");
5
6
  const { hasOwn } = require("@smithy/core/transport");
6
7
 
7
8
  const isStreamingPayload = (request) => request?.body instanceof Readable ||
@@ -82,6 +83,29 @@ function isNodeJsHttp2TransientError(error) {
82
83
  return error.code === "ERR_HTTP2_STREAM_ERROR" && error.message.includes("NGHTTP2_REFUSED_STREAM");
83
84
  }
84
85
 
86
+ const race = (promise, signal) => {
87
+ if (!signal) {
88
+ return promise;
89
+ }
90
+ let cleanup = () => { };
91
+ const aborted = new Promise((_, reject) => {
92
+ const handler = () => reject(createAbortError());
93
+ if (signal.aborted) {
94
+ handler();
95
+ }
96
+ else if (typeof signal.addEventListener === "function") {
97
+ signal.addEventListener("abort", handler, { once: true });
98
+ cleanup = () => signal.removeEventListener("abort", handler);
99
+ }
100
+ else {
101
+ signal.onabort = handler;
102
+ }
103
+ });
104
+ return Promise.race([promise, aborted]).finally(cleanup);
105
+ };
106
+ const createAbortError = () => Object.assign(new Error("Request aborted"), { name: "AbortError" });
107
+ const isAbortError = (error) => typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
108
+
85
109
  const DEFAULT_RETRY_DELAY_BASE = 100;
86
110
  const MAXIMUM_RETRY_DELAY = 20 * 1000;
87
111
  const THROTTLING_RETRY_DELAY_BASE = 500;
@@ -160,9 +184,11 @@ function bindRetryMiddleware(isStreamingPayload) {
160
184
  return (options) => (next, context) => async (args) => {
161
185
  let retryStrategy = await options.retryStrategy();
162
186
  const maxAttempts = await options.maxAttempts();
187
+ const abortSignal = context[SMITHY_CONTEXT_KEY]?.abortSignal;
163
188
  if (isRetryStrategyV2(retryStrategy)) {
164
189
  retryStrategy = retryStrategy;
165
- let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : ""));
190
+ const retryTokenScope = (context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "");
191
+ let retryToken = await race(retryStrategy.acquireInitialRetryToken(retryTokenScope), abortSignal);
166
192
  let lastError = new Error();
167
193
  let attempts = 0;
168
194
  let totalRetryDelay = 0;
@@ -190,9 +216,12 @@ function bindRetryMiddleware(isStreamingPayload) {
190
216
  throw lastError;
191
217
  }
192
218
  try {
193
- retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
219
+ retryToken = await race(retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo), abortSignal);
194
220
  }
195
- catch (ignoredRefreshError) {
221
+ catch (refreshError) {
222
+ if (abortSignal?.aborted && isAbortError(refreshError)) {
223
+ throw refreshError;
224
+ }
196
225
  if (!lastError.$metadata) {
197
226
  lastError.$metadata = {};
198
227
  }
@@ -204,7 +233,7 @@ function bindRetryMiddleware(isStreamingPayload) {
204
233
  const delay = retryToken.getRetryDelay();
205
234
  totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
206
235
  if (delay > 0) {
207
- await cooldown(delay);
236
+ await race(new Promise((resolve) => setTimeout(resolve, delay)), abortSignal);
208
237
  }
209
238
  }
210
239
  }
@@ -218,7 +247,6 @@ function bindRetryMiddleware(isStreamingPayload) {
218
247
  }
219
248
  };
220
249
  }
221
- const cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
222
250
  const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" &&
223
251
  typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" &&
224
252
  typeof retryStrategy.recordSuccess !== "undefined";
@@ -28,6 +28,7 @@ export class Command {
28
28
  commandInstance: this,
29
29
  ...smithyContext,
30
30
  ...(options?.metricsRecorder === undefined ? {} : { metricsRecorder: options.metricsRecorder }),
31
+ ...(options?.abortSignal === undefined ? {} : { abortSignal: options.abortSignal }),
31
32
  },
32
33
  };
33
34
  const { requestHandler } = configuration;
@@ -1,7 +1,9 @@
1
1
  import { NoOpLogger } from "@smithy/core/client";
2
2
  import { HttpRequest } from "@smithy/core/protocols";
3
3
  import { v4 } from "@smithy/core/serde";
4
+ import { SMITHY_CONTEXT_KEY } from "@smithy/types";
4
5
  import { isServerError, isThrottlingError, isTransientError, } from "../service-error-classification/service-error-classification";
6
+ import { isAbortError, race } from "../util-retry/race";
5
7
  import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "../util-retry/constants";
6
8
  import { parseRetryAfterHeader } from "./parseRetryAfterHeader";
7
9
  import { asSdkError } from "./util";
@@ -9,9 +11,11 @@ export function bindRetryMiddleware(isStreamingPayload) {
9
11
  return (options) => (next, context) => async (args) => {
10
12
  let retryStrategy = await options.retryStrategy();
11
13
  const maxAttempts = await options.maxAttempts();
14
+ const abortSignal = context[SMITHY_CONTEXT_KEY]?.abortSignal;
12
15
  if (isRetryStrategyV2(retryStrategy)) {
13
16
  retryStrategy = retryStrategy;
14
- let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : ""));
17
+ const retryTokenScope = (context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "");
18
+ let retryToken = await race(retryStrategy.acquireInitialRetryToken(retryTokenScope), abortSignal);
15
19
  let lastError = new Error();
16
20
  let attempts = 0;
17
21
  let totalRetryDelay = 0;
@@ -39,9 +43,12 @@ export function bindRetryMiddleware(isStreamingPayload) {
39
43
  throw lastError;
40
44
  }
41
45
  try {
42
- retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
46
+ retryToken = await race(retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo), abortSignal);
43
47
  }
44
- catch (ignoredRefreshError) {
48
+ catch (refreshError) {
49
+ if (abortSignal?.aborted && isAbortError(refreshError)) {
50
+ throw refreshError;
51
+ }
45
52
  if (!lastError.$metadata) {
46
53
  lastError.$metadata = {};
47
54
  }
@@ -53,7 +60,7 @@ export function bindRetryMiddleware(isStreamingPayload) {
53
60
  const delay = retryToken.getRetryDelay();
54
61
  totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
55
62
  if (delay > 0) {
56
- await cooldown(delay);
63
+ await race(new Promise((resolve) => setTimeout(resolve, delay)), abortSignal);
57
64
  }
58
65
  }
59
66
  }
@@ -67,7 +74,6 @@ export function bindRetryMiddleware(isStreamingPayload) {
67
74
  }
68
75
  };
69
76
  }
70
- const cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
71
77
  const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" &&
72
78
  typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" &&
73
79
  typeof retryStrategy.recordSuccess !== "undefined";
@@ -0,0 +1,22 @@
1
+ export const race = (promise, signal) => {
2
+ if (!signal) {
3
+ return promise;
4
+ }
5
+ let cleanup = () => { };
6
+ const aborted = new Promise((_, reject) => {
7
+ const handler = () => reject(createAbortError());
8
+ if (signal.aborted) {
9
+ handler();
10
+ }
11
+ else if (typeof signal.addEventListener === "function") {
12
+ signal.addEventListener("abort", handler, { once: true });
13
+ cleanup = () => signal.removeEventListener("abort", handler);
14
+ }
15
+ else {
16
+ signal.onabort = handler;
17
+ }
18
+ });
19
+ return Promise.race([promise, aborted]).finally(cleanup);
20
+ };
21
+ const createAbortError = () => Object.assign(new Error("Request aborted"), { name: "AbortError" });
22
+ export const isAbortError = (error) => typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.38.1",
3
+ "version": "3.39.0",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -224,7 +224,7 @@
224
224
  }
225
225
  },
226
226
  "dependencies": {
227
- "@smithy/types": "^4.19.0",
227
+ "@smithy/types": "^4.20.0",
228
228
  "tslib": "^2.6.2"
229
229
  },
230
230
  "devDependencies": {
@@ -7,15 +7,17 @@ function createRequest(url, requestOptions) {
7
7
  }
8
8
 
9
9
  function requestTimeout(timeoutInMs = 0) {
10
- return new Promise((resolve, reject) => {
10
+ let timeoutId;
11
+ const promise = new Promise((resolve, reject) => {
11
12
  if (timeoutInMs) {
12
- setTimeout(() => {
13
+ timeoutId = setTimeout(() => {
13
14
  const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
14
15
  timeoutError.name = "TimeoutError";
15
16
  reject(timeoutError);
16
17
  }, timeoutInMs);
17
18
  }
18
19
  });
20
+ return { promise, cancel: () => clearTimeout(timeoutId) };
19
21
  }
20
22
 
21
23
  const keepAliveSupport = {
@@ -95,6 +97,7 @@ class FetchHttpHandler {
95
97
  Object.assign(requestOptions, this.config.requestInit(request));
96
98
  }
97
99
  let removeSignalEventListener = () => { };
100
+ const timeout = requestTimeout(requestTimeoutInMs);
98
101
  const fetchRequest = createRequest(url, requestOptions);
99
102
  const raceOfPromises = [
100
103
  fetchFn(fetchRequest).then((response) => {
@@ -123,7 +126,7 @@ class FetchHttpHandler {
123
126
  }),
124
127
  };
125
128
  }),
126
- requestTimeout(requestTimeoutInMs),
129
+ timeout.promise,
127
130
  ];
128
131
  if (abortSignal) {
129
132
  raceOfPromises.push(new Promise((resolve, reject) => {
@@ -141,7 +144,10 @@ class FetchHttpHandler {
141
144
  }
142
145
  }));
143
146
  }
144
- return Promise.race(raceOfPromises).finally(removeSignalEventListener);
147
+ return Promise.race(raceOfPromises).finally(() => {
148
+ timeout.cancel();
149
+ removeSignalEventListener();
150
+ });
145
151
  }
146
152
  updateHttpClientConfig(key, value) {
147
153
  this.config = undefined;