autotel 7.7.0 → 7.8.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 (112) hide show
  1. package/dist/analysis.cjs +0 -1
  2. package/dist/{attribute-redacting-processor-CvBE0z1p.d.ts → attribute-redacting-processor-rkV_WL-k.d.ts} +2 -2
  3. package/dist/attribute-redacting-processor.cjs +1 -1
  4. package/dist/attribute-redacting-processor.d.ts +1 -1
  5. package/dist/{attributes-De9Fx0b4.js → attributes-CuGx6cOI.js} +21 -11
  6. package/dist/{attributes-DkptT2Ck.cjs → attributes-Ii3jDPsW.cjs} +23 -13
  7. package/dist/attributes.cjs +1 -1
  8. package/dist/attributes.d.ts +1 -1
  9. package/dist/attributes.js +1 -1
  10. package/dist/auto.cjs +2 -2
  11. package/dist/auto.js +1 -1
  12. package/dist/business-baggage.cjs +1 -1
  13. package/dist/{canonical-log-line-processor-Bvgb1lE4.cjs → canonical-log-line-processor-BU03jJeA.cjs} +1 -1
  14. package/dist/{canonical-log-line-processor-Yq4cXcD5.d.ts → canonical-log-line-processor-Bwrt_L4c.d.ts} +1 -1
  15. package/dist/{correlated-events-9RRdfyWR.cjs → correlated-events-DE_4A3oD.cjs} +1 -1
  16. package/dist/correlation-id.cjs +1 -1
  17. package/dist/correlation-id.js +1 -1
  18. package/dist/db.cjs +2 -2
  19. package/dist/db.js +1 -1
  20. package/dist/decorators.cjs +2 -2
  21. package/dist/decorators.d.cts +1 -1
  22. package/dist/decorators.d.ts +1 -1
  23. package/dist/decorators.js +1 -1
  24. package/dist/diagnostics.cjs +3 -3
  25. package/dist/diagnostics.js +1 -1
  26. package/dist/drain-pipeline.cjs +0 -1
  27. package/dist/enrichers.cjs +0 -1
  28. package/dist/event-testing.cjs +0 -1
  29. package/dist/event.cjs +1 -1
  30. package/dist/event.js +1 -1
  31. package/dist/evidence.cjs +0 -1
  32. package/dist/exception-fingerprint.cjs +1 -1
  33. package/dist/{filtering-span-processor-BpDagWNa.d.ts → filtering-span-processor-vkewzbqB.d.ts} +2 -2
  34. package/dist/filtering-span-processor.cjs +0 -1
  35. package/dist/filtering-span-processor.d.ts +1 -1
  36. package/dist/{functional-Cnga_Lnv.js → functional-CC2BFGAO.js} +9 -8
  37. package/dist/{functional-C4mjgtJb.d.cts → functional-DPZTpGh6.d.cts} +2 -2
  38. package/dist/{functional-DN_ztd9C.d.ts → functional-SeRUabkE.d.ts} +2 -2
  39. package/dist/{functional-CJI0HCVJ.cjs → functional-u5Qwjray.cjs} +5 -4
  40. package/dist/functional.cjs +1 -1
  41. package/dist/functional.d.cts +1 -1
  42. package/dist/functional.d.ts +1 -1
  43. package/dist/functional.js +1 -1
  44. package/dist/http.cjs +2 -2
  45. package/dist/http.js +1 -1
  46. package/dist/{index-o_6YjZhV.d.ts → index-B9aRLp6c.d.ts} +1 -1
  47. package/dist/index.cjs +10 -10
  48. package/dist/index.d.cts +3 -3
  49. package/dist/index.d.ts +10 -10
  50. package/dist/index.js +3 -3
  51. package/dist/{init-BYXDCfRL.cjs → init-21HWbm7_.cjs} +194 -39
  52. package/dist/{init-Dyq6WtsO.js → init-8SISAGdE.js} +190 -35
  53. package/dist/{init-WwjD-kQu.d.cts → init-COfMwKbc.d.cts} +38 -10
  54. package/dist/{init-CKSMbJUG.d.ts → init-CnoRlJqS.d.ts} +43 -15
  55. package/dist/instrumentation.cjs +9 -8
  56. package/dist/instrumentation.js +8 -7
  57. package/dist/{logger-CSdZkxbh.cjs → logger-DLjHQAus.cjs} +1 -1
  58. package/dist/logger.cjs +1 -1
  59. package/dist/messaging-adapters.cjs +1 -1
  60. package/dist/messaging-testing.cjs +0 -1
  61. package/dist/messaging.cjs +8 -7
  62. package/dist/messaging.js +5 -4
  63. package/dist/metric-testing.cjs +0 -1
  64. package/dist/{node-require-B_IVapV3.cjs → node-require-BPsB09eC.cjs} +2 -2
  65. package/dist/parse-error.cjs +1 -1
  66. package/dist/{policy-C4QcZnqv.d.ts → policy-DNw_0qUq.d.ts} +1 -1
  67. package/dist/policy.cjs +0 -0
  68. package/dist/policy.d.ts +1 -1
  69. package/dist/processors.cjs +1 -1
  70. package/dist/processors.d.ts +1 -1
  71. package/dist/register.cjs +1 -1
  72. package/dist/{registry-DIoklBz5.cjs → registry-B3ZJmUtU.cjs} +0 -1
  73. package/dist/{rolldown-runtime-C_NdSu1c.cjs → rolldown-runtime-C24Yb2bl.cjs} +1 -2
  74. package/dist/{sampling-DBng4Foa.d.ts → sampling-CZi7OM9u.d.ts} +13 -13
  75. package/dist/{sampling-Er217Mge.d.cts → sampling-DENUjT_8.d.cts} +13 -13
  76. package/dist/sampling.cjs +1 -1
  77. package/dist/sampling.d.cts +1 -1
  78. package/dist/sampling.d.ts +1 -1
  79. package/dist/sampling.js +1 -1
  80. package/dist/security-schema.cjs +0 -1
  81. package/dist/semantic-conventions.cjs +1 -1
  82. package/dist/semantic-helpers.cjs +3 -3
  83. package/dist/semantic-helpers.js +1 -1
  84. package/dist/{span-name-normalizer-CN1-8C76.d.ts → span-name-normalizer-DHcg1bSP.d.ts} +2 -2
  85. package/dist/span-name-normalizer.cjs +0 -1
  86. package/dist/span-name-normalizer.d.ts +1 -1
  87. package/dist/{stable-hash-C9F6xjzx.cjs → stable-hash-sLi1o4jj.cjs} +2 -2
  88. package/dist/{structured-error-BAXhglRE.cjs → structured-error-DynjWTTu.cjs} +1 -1
  89. package/dist/tail-sampling-processor.cjs +1 -1
  90. package/dist/tail-sampling-processor.d.ts +2 -2
  91. package/dist/tail-sampling-processor.js +1 -1
  92. package/dist/test-span-collector.cjs +1 -1
  93. package/dist/testing.cjs +16 -2
  94. package/dist/testing.d.ts +1 -1
  95. package/dist/testing.js +15 -1
  96. package/dist/{trace-factory-validation-Dc8epn87.cjs → trace-factory-validation-CHU1WcjK.cjs} +0 -1
  97. package/dist/trace-helpers.cjs +2 -2
  98. package/dist/tracer-provider.cjs +1 -1
  99. package/dist/validate.cjs +3 -3
  100. package/dist/validation-attributes.cjs +0 -1
  101. package/dist/{values-tm4bi0FF.cjs → values-AxGpgYBA.cjs} +0 -1
  102. package/dist/webhook.cjs +16 -13
  103. package/dist/webhook.js +14 -11
  104. package/dist/workflow-distributed.cjs +4 -6
  105. package/dist/workflow-distributed.js +2 -4
  106. package/dist/workflow.cjs +7 -6
  107. package/dist/workflow.js +3 -2
  108. package/dist/yaml-config.cjs +1 -1
  109. package/dist/yaml-config.d.cts +2 -2
  110. package/dist/yaml-config.d.ts +2 -2
  111. package/dist/yaml-config.js +1 -1
  112. package/package.json +420 -159
package/dist/webhook.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as recordStructuredError } from "./structured-error-Y9y-1Pae.js";
2
- import { l as withTracing } from "./functional-Cnga_Lnv.js";
2
+ import { l as withTracing } from "./functional-CC2BFGAO.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-BfpH5uS-.js";
4
4
  import { SpanKind, trace } from "@opentelemetry/api";
5
5
 
@@ -149,7 +149,7 @@ var InMemoryTraceContextStore = class {
149
149
  * ```
150
150
  */
151
151
  function createParkingLot(config) {
152
- const { store, defaultTTLMs = 1440 * 60 * 1e3, keyPrefix = "parkingLot:", autoDeleteOnRetrieve = true, onMiss } = config;
152
+ const { store, defaultTTLMs = 864e5, keyPrefix = "parkingLot:", autoDeleteOnRetrieve = true, onMiss } = config;
153
153
  /**
154
154
  * Get current span context from active context
155
155
  */
@@ -178,15 +178,18 @@ function createParkingLot(config) {
178
178
  };
179
179
  await store.save(fullKey, storedContext);
180
180
  const activeSpan = trace.getActiveSpan();
181
- if (activeSpan) emitCorrelatedEvent({
182
- setAttribute: (k, v) => activeSpan.setAttribute(k, v),
183
- setAttributes: (a) => activeSpan.setAttributes(a),
184
- addEvent: (n, a) => activeSpan.addEvent(n, a)
185
- }, "trace_context_parked", {
186
- "parking_lot.correlation_key": correlationKey,
187
- "parking_lot.ttl_ms": defaultTTLMs,
188
- ...metadata && Object.fromEntries(Object.entries(metadata).map(([k, v]) => [`parking_lot.metadata.${k}`, v]))
189
- });
181
+ if (activeSpan) {
182
+ const parkAttrs = {
183
+ "parking_lot.correlation_key": correlationKey,
184
+ "parking_lot.ttl_ms": defaultTTLMs,
185
+ ...metadata && Object.fromEntries(Object.entries(metadata).map(([k, v]) => [`parking_lot.metadata.${k}`, v]))
186
+ };
187
+ emitCorrelatedEvent({
188
+ setAttribute: (k, v) => activeSpan.setAttribute(k, v),
189
+ setAttributes: (a) => activeSpan.setAttributes(a),
190
+ addEvent: (n, a) => activeSpan.addEvent(n, a)
191
+ }, "trace_context_parked", parkAttrs);
192
+ }
190
193
  return correlationKey;
191
194
  },
192
195
  async retrieve(correlationKey) {
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_values = require('./values-tm4bi0FF.cjs');
3
- const require_functional = require('./functional-CJI0HCVJ.cjs');
4
- const require_correlated_events = require('./correlated-events-9RRdfyWR.cjs');
2
+ const require_values = require('./values-AxGpgYBA.cjs');
3
+ const require_functional = require('./functional-u5Qwjray.cjs');
4
+ const require_correlated_events = require('./correlated-events-DE_4A3oD.cjs');
5
5
  const require_business_baggage = require('./business-baggage.cjs');
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
7
7
 
@@ -507,9 +507,7 @@ function parseWorkflowFromBaggage(baggageHeader) {
507
507
  case "workflow.initiatedBy":
508
508
  values.initiatedBy = decodedValue;
509
509
  break;
510
- case "workflow.startedAt":
511
- values.startedAt = decodedValue;
512
- break;
510
+ case "workflow.startedAt": values.startedAt = decodedValue;
513
511
  }
514
512
  }
515
513
  return Object.keys(values).length > 0 ? values : null;
@@ -1,5 +1,5 @@
1
1
  import { h as isFunction, x as toError } from "./values-xBtdXtjA.js";
2
- import { l as withTracing } from "./functional-Cnga_Lnv.js";
2
+ import { l as withTracing } from "./functional-CC2BFGAO.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-BfpH5uS-.js";
4
4
  import { createSafeBaggageSchema } from "./business-baggage.js";
5
5
  import { SpanKind, context, propagation } from "@opentelemetry/api";
@@ -506,9 +506,7 @@ function parseWorkflowFromBaggage(baggageHeader) {
506
506
  case "workflow.initiatedBy":
507
507
  values.initiatedBy = decodedValue;
508
508
  break;
509
- case "workflow.startedAt":
510
- values.startedAt = decodedValue;
511
- break;
509
+ case "workflow.startedAt": values.startedAt = decodedValue;
512
510
  }
513
511
  }
514
512
  return Object.keys(values).length > 0 ? values : null;
package/dist/workflow.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
3
- const require_values = require('./values-tm4bi0FF.cjs');
4
- const require_functional = require('./functional-CJI0HCVJ.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
3
+ const require_values = require('./values-AxGpgYBA.cjs');
4
+ const require_functional = require('./functional-u5Qwjray.cjs');
5
5
  const require_trace_helpers = require('./trace-helpers.cjs');
6
- const require_correlated_events = require('./correlated-events-9RRdfyWR.cjs');
7
- const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
6
+ const require_correlated_events = require('./correlated-events-DE_4A3oD.cjs');
7
+ const require_trace_factory_validation = require('./trace-factory-validation-CHU1WcjK.cjs');
8
8
  let node_async_hooks = require("node:async_hooks");
9
9
  node_async_hooks = require_rolldown_runtime.__toESM(node_async_hooks, 1);
10
10
 
@@ -159,7 +159,8 @@ function traceStep(config) {
159
159
  assertNamedConfig("traceStep", config);
160
160
  return ((handler) => {
161
161
  if (!require_values.isFunction(handler)) throw new TypeError("traceStep(config)(handler): handler must be a function");
162
- return require_functional.withTracing({ name: `step.${config.name}` })((baseCtx) => {
162
+ const spanName = `step.${config.name}`;
163
+ return require_functional.withTracing({ name: spanName })((baseCtx) => {
163
164
  return async (...args) => {
164
165
  const workflowCtx = workflowContextStorage.getStore() ?? null;
165
166
  const ctx = createStepContext(baseCtx, config, workflowCtx);
package/dist/workflow.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { b as toAttributeValue, g as nonEmptyString, h as isFunction, l as asString, s as asRecord, x as toError } from "./values-xBtdXtjA.js";
2
- import { l as withTracing } from "./functional-Cnga_Lnv.js";
2
+ import { l as withTracing } from "./functional-CC2BFGAO.js";
3
3
  import { getActiveSpan } from "./trace-helpers.js";
4
4
  import { t as emitCorrelatedEvent } from "./correlated-events-BfpH5uS-.js";
5
5
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
@@ -156,7 +156,8 @@ function traceStep(config) {
156
156
  assertNamedConfig("traceStep", config);
157
157
  return ((handler) => {
158
158
  if (!isFunction(handler)) throw new TypeError("traceStep(config)(handler): handler must be a function");
159
- return withTracing({ name: `step.${config.name}` })((baseCtx) => {
159
+ const spanName = `step.${config.name}`;
160
+ return withTracing({ name: spanName })((baseCtx) => {
160
161
  return async (...args) => {
161
162
  const workflowCtx = workflowContextStorage.getStore() ?? null;
162
163
  const ctx = createStepContext(baseCtx, config, workflowCtx);
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-BYXDCfRL.cjs');
2
+ const require_init = require('./init-21HWbm7_.cjs');
3
3
 
4
4
  exports.hasYamlConfig = require_init.hasYamlConfig;
5
5
  exports.loadYamlConfig = require_init.loadYamlConfig;
@@ -1,5 +1,5 @@
1
- import { g as SamplingPreset } from "./sampling-Er217Mge.cjs";
2
- import { a as AutotelConfig, o as OtlpSignal } from "./init-WwjD-kQu.cjs";
1
+ import { g as SamplingPreset } from "./sampling-DENUjT_8.cjs";
2
+ import { a as AutotelConfig, o as OtlpSignal } from "./init-COfMwKbc.cjs";
3
3
  //#region src/yaml-config.d.ts
4
4
  /** A value as a YAML document carries it: scalars, sequences, mappings. */
5
5
  type YamlValue = string | number | boolean | null | YamlValue[] | YamlMapping;
@@ -1,5 +1,5 @@
1
- import { g as SamplingPreset } from "./sampling-DBng4Foa.js";
2
- import { a as AutotelConfig, o as OtlpSignal } from "./init-CKSMbJUG.js";
1
+ import { g as SamplingPreset } from "./sampling-CZi7OM9u.js";
2
+ import { a as AutotelConfig, o as OtlpSignal } from "./init-CnoRlJqS.js";
3
3
  //#region src/yaml-config.d.ts
4
4
  /** A value as a YAML document carries it: scalars, sequences, mappings. */
5
5
  type YamlValue = string | number | boolean | null | YamlValue[] | YamlMapping;
@@ -1,3 +1,3 @@
1
- import { _ as loadYamlConfig, g as hasYamlConfig, v as loadYamlConfigFromFile } from "./init-Dyq6WtsO.js";
1
+ import { _ as loadYamlConfig, g as hasYamlConfig, v as loadYamlConfigFromFile } from "./init-8SISAGdE.js";
2
2
 
3
3
  export { hasYamlConfig, loadYamlConfig, loadYamlConfigFromFile };