autotel 5.0.0 → 6.0.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 (85) hide show
  1. package/dist/auto.cjs +1 -1
  2. package/dist/auto.js +1 -1
  3. package/dist/correlation-id.cjs +9 -9
  4. package/dist/correlation-id.js +1 -1
  5. package/dist/decorators.cjs +2 -2
  6. package/dist/decorators.cjs.map +1 -1
  7. package/dist/decorators.js +1 -1
  8. package/dist/event.cjs +4 -4
  9. package/dist/event.js +1 -1
  10. package/dist/{functional-Bit6noRu.js → functional-BnDUxnSl.js} +2 -4
  11. package/dist/{functional-Bit6noRu.js.map → functional-BnDUxnSl.js.map} +1 -1
  12. package/dist/{functional-Cj7PSItS.cjs → functional-DcLBuCPz.cjs} +12 -14
  13. package/dist/{functional-Cj7PSItS.cjs.map → functional-DcLBuCPz.cjs.map} +1 -1
  14. package/dist/functional.cjs +1 -1
  15. package/dist/functional.js +1 -1
  16. package/dist/http.cjs +2 -2
  17. package/dist/http.cjs.map +1 -1
  18. package/dist/http.js +1 -1
  19. package/dist/index.cjs +23 -164
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +2 -2
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +4 -145
  26. package/dist/index.js.map +1 -1
  27. package/dist/init-C3RApHKJ.cjs +3371 -0
  28. package/dist/init-C3RApHKJ.cjs.map +1 -0
  29. package/dist/{init-CTyqG9qR.d.ts → init-D6n2diBy.d.ts} +21 -2
  30. package/dist/init-D6n2diBy.d.ts.map +1 -0
  31. package/dist/init-R-gSEXkJ.js +3190 -0
  32. package/dist/init-R-gSEXkJ.js.map +1 -0
  33. package/dist/{init-a4yPDYqC.d.cts → init-XzXzrarP.d.cts} +21 -2
  34. package/dist/init-XzXzrarP.d.cts.map +1 -0
  35. package/dist/instrumentation.cjs +1 -1
  36. package/dist/instrumentation.js +1 -1
  37. package/dist/messaging.cjs +1 -1
  38. package/dist/messaging.js +1 -1
  39. package/dist/semantic-helpers.cjs +1 -1
  40. package/dist/semantic-helpers.js +1 -1
  41. package/dist/webhook.cjs +1 -1
  42. package/dist/webhook.js +1 -1
  43. package/dist/workflow-distributed.cjs +1 -1
  44. package/dist/workflow-distributed.js +1 -1
  45. package/dist/workflow.cjs +1 -1
  46. package/dist/workflow.js +1 -1
  47. package/dist/yaml-config.d.cts +1 -1
  48. package/dist/yaml-config.d.ts +1 -1
  49. package/package.json +2 -3
  50. package/dist/event-CwIpFdoY.cjs +0 -778
  51. package/dist/event-CwIpFdoY.cjs.map +0 -1
  52. package/dist/event-pLMF5b3d.js +0 -761
  53. package/dist/event-pLMF5b3d.js.map +0 -1
  54. package/dist/init-B2uvZReD.cjs +0 -1120
  55. package/dist/init-B2uvZReD.cjs.map +0 -1
  56. package/dist/init-CTyqG9qR.d.ts.map +0 -1
  57. package/dist/init-CdEWjhvl.js +0 -1043
  58. package/dist/init-CdEWjhvl.js.map +0 -1
  59. package/dist/init-a4yPDYqC.d.cts.map +0 -1
  60. package/dist/operation-context-CKBoA4Qy.js +0 -59
  61. package/dist/operation-context-CKBoA4Qy.js.map +0 -1
  62. package/dist/operation-context-hzKbTKnt.cjs +0 -72
  63. package/dist/operation-context-hzKbTKnt.cjs.map +0 -1
  64. package/dist/track-BBcxEJEC.js +0 -1110
  65. package/dist/track-BBcxEJEC.js.map +0 -1
  66. package/dist/track-BI6dmZ2X.cjs +0 -1207
  67. package/dist/track-BI6dmZ2X.cjs.map +0 -1
  68. package/skills/analyze-traces/SKILL.md +0 -209
  69. package/skills/autotel-core/SKILL.md +0 -166
  70. package/skills/autotel-events/SKILL.md +0 -84
  71. package/skills/autotel-frameworks/SKILL.md +0 -125
  72. package/skills/autotel-instrumentation/SKILL.md +0 -150
  73. package/skills/autotel-request-logging/SKILL.md +0 -99
  74. package/skills/autotel-structured-errors/SKILL.md +0 -125
  75. package/skills/build-audit-trails/SKILL.md +0 -460
  76. package/skills/build-audit-trails/references/audit-queries.md +0 -73
  77. package/skills/build-audit-trails/references/framework-wiring.md +0 -196
  78. package/skills/debug-missing-spans/SKILL.md +0 -250
  79. package/skills/migrate-to-autotel/SKILL.md +0 -269
  80. package/skills/review-otel-patterns/SKILL.md +0 -540
  81. package/skills/review-otel-patterns/references/code-review.md +0 -76
  82. package/skills/review-otel-patterns/references/processor-pipeline.md +0 -205
  83. package/skills/review-otel-patterns/references/structured-errors.md +0 -102
  84. package/skills/review-otel-patterns/references/wide-spans.md +0 -85
  85. package/skills/tune-sampling/SKILL.md +0 -290
@@ -212,6 +212,16 @@ interface AutotelDevtoolsConfig {
212
212
  verbose?: boolean;
213
213
  }
214
214
  //#endregion
215
+ //#region src/process-handlers.d.ts
216
+ interface ProcessHandlersConfig {
217
+ /** Signals that should trigger telemetry shutdown before process exit. Default: `['SIGTERM', 'SIGINT']`. */
218
+ signals?: NodeJS.Signals[];
219
+ /** Flush telemetry before exiting on uncaught exceptions or rejections. Default: `true`. */
220
+ fatalErrors?: boolean;
221
+ /** Maximum time to wait for telemetry shutdown before exiting. Default: 2000. */
222
+ shutdownTimeoutMs?: number;
223
+ }
224
+ //#endregion
215
225
  //#region src/init.d.ts
216
226
  type OtlpSignal = 'traces' | 'metrics' | 'logs';
217
227
  interface OtlpDestinationConfig {
@@ -238,6 +248,15 @@ interface OtlpDestinationConfig {
238
248
  interface AutotelConfig {
239
249
  /** Service name (required) */
240
250
  service: string;
251
+ /**
252
+ * Opt-in Node.js process handlers installed after telemetry is initialized.
253
+ *
254
+ * `true` (or `{}`) enables the defaults: flush-and-exit on SIGTERM/SIGINT
255
+ * and on fatal errors, bounded by a 2s shutdown timeout. Pass a config
256
+ * object to override individual defaults. Omit (or pass `false`) to leave
257
+ * process lifecycle management to the application.
258
+ */
259
+ processHandlers?: boolean | ProcessHandlersConfig;
241
260
  /**
242
261
  * Local developer UX for autotel-devtools.
243
262
  *
@@ -1215,5 +1234,5 @@ declare function init(cfg: AutotelConfig): void;
1215
1234
  */
1216
1235
  declare function isInitialized(): boolean;
1217
1236
  //#endregion
1218
- export { isLoggerLocked as a, createStringRedactor as c, isInitialized as i, OtlpSignal as n, lockLogger as o, init as r, StringRedactor as s, AutotelConfig as t };
1219
- //# sourceMappingURL=init-a4yPDYqC.d.cts.map
1237
+ export { isLoggerLocked as a, StringRedactor as c, isInitialized as i, createStringRedactor as l, OtlpSignal as n, lockLogger as o, init as r, ProcessHandlersConfig as s, AutotelConfig as t };
1238
+ //# sourceMappingURL=init-XzXzrarP.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-XzXzrarP.d.cts","names":[],"sources":["../src/validation.ts","../src/redact-values.ts","../src/events-config.ts","../src/devtools.ts","../src/process-handlers.ts","../src/init.ts"],"mappings":";;;;;;;;;;;;;;UAYiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,mBAAmB;;;;KCfT,kBAAkB;iBACd,qBACd,QAAQ,0BAA0B,0BACjC;;;;;;;;;;;;;;;;;;;;;;UCQc;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;KAMU,wCAAwC;;;;UAKnC;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;EAMA;;;;;;;;;;;;;;;;EAiBA,YAAY,eAAe;;;;;UAMZ;;;;;;;;;;;;;;;EAef;;;;;;;;;;;EAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BA,YAAY,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BjB,oBAAoB;;;;UCnLL;EACf;EACA;EACA;EACA;EACA;EACA;;;;UCFe;;EAEf,UAAU,OAAO;;EAEjB;;EAEA;;;;KCsIU;UAEK;;;;;;EAMf;;;;EAKA,UAAU;;;;EAKV;;;;;EAMA,UAAU;;UAyKK;;EAEf;;;;;;;;;EAUA,4BAA4B;;;;;;;;;;;;;;EAe5B,qBAAqB;;EAGrB,cAAc;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDrB,oBAAoB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B9C;IACE;IACA,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDZ;IACE;;IAEA,SAAS;;IAET;;IAEA;;IAEA,iBACE,8CAA8C;;IAGhD;;IAEA,aAAa;;;;;;IAMb,OAAO;;IAEP,QAAQ;;IAER,eAAe;;;;;IAKf;;;;;;;;;EAUF;;;;;;;EAQA;;;;;;;iBAwCc;;;;iBAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8QA,KAAK,KAAK;;;;iBAytBV"}
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_node_require = require('./node-require-PFqDihze.cjs');
3
- const require_init = require('./init-B2uvZReD.cjs');
3
+ const require_init = require('./init-C3RApHKJ.cjs');
4
4
  const require_tail_sampling_processor = require('./tail-sampling-processor.cjs');
5
5
  let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
6
6
  let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
@@ -1,5 +1,5 @@
1
1
  import { n as safeRequire, t as requireModule } from "./node-require-vROmTeJ8.js";
2
- import { i as getLogger } from "./init-CdEWjhvl.js";
2
+ import { n as getLogger } from "./init-R-gSEXkJ.js";
3
3
  import { TailSamplingSpanProcessor } from "./tail-sampling-processor.js";
4
4
  import { NodeSDK } from "@opentelemetry/sdk-node";
5
5
  import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_sampling = require('./sampling.cjs');
3
- const require_functional = require('./functional-Cj7PSItS.cjs');
3
+ const require_functional = require('./functional-DcLBuCPz.cjs');
4
4
  const require_correlated_events = require('./correlated-events-kSwLo3mi.cjs');
5
5
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
package/dist/messaging.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createLinkFromHeaders, extractLinksFromBatch } from "./sampling.js";
2
- import { c as withTracing } from "./functional-Bit6noRu.js";
2
+ import { c as withTracing } from "./functional-BnDUxnSl.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-Bzh5y-UB.js";
4
4
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
5
5
  import { SpanKind, context, propagation } from "@opentelemetry/api";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_functional = require('./functional-Cj7PSItS.cjs');
2
+ const require_functional = require('./functional-DcLBuCPz.cjs');
3
3
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
4
4
  let _opentelemetry_api = require("@opentelemetry/api");
5
5
 
@@ -1,4 +1,4 @@
1
- import { c as withTracing } from "./functional-Bit6noRu.js";
1
+ import { c as withTracing } from "./functional-BnDUxnSl.js";
2
2
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
3
3
  import { SpanKind } from "@opentelemetry/api";
4
4
 
package/dist/webhook.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_structured_error = require('./structured-error-CHg7DoIQ.cjs');
3
- const require_functional = require('./functional-Cj7PSItS.cjs');
3
+ const require_functional = require('./functional-DcLBuCPz.cjs');
4
4
  const require_correlated_events = require('./correlated-events-kSwLo3mi.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
6
6
 
package/dist/webhook.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as recordStructuredError } from "./structured-error-9--cxBay.js";
2
- import { c as withTracing } from "./functional-Bit6noRu.js";
2
+ import { c as withTracing } from "./functional-BnDUxnSl.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-Bzh5y-UB.js";
4
4
  import { SpanKind, trace } from "@opentelemetry/api";
5
5
 
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_functional = require('./functional-Cj7PSItS.cjs');
2
+ const require_functional = require('./functional-DcLBuCPz.cjs');
3
3
  const require_correlated_events = require('./correlated-events-kSwLo3mi.cjs');
4
4
  const require_business_baggage = require('./business-baggage.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,4 +1,4 @@
1
- import { c as withTracing } from "./functional-Bit6noRu.js";
1
+ import { c as withTracing } from "./functional-BnDUxnSl.js";
2
2
  import { t as emitCorrelatedEvent } from "./correlated-events-Bzh5y-UB.js";
3
3
  import { createSafeBaggageSchema } from "./business-baggage.js";
4
4
  import { SpanKind, context, propagation } from "@opentelemetry/api";
package/dist/workflow.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
3
3
  const require_trace_helpers = require('./trace-helpers.cjs');
4
- const require_functional = require('./functional-Cj7PSItS.cjs');
4
+ const require_functional = require('./functional-DcLBuCPz.cjs');
5
5
  const require_correlated_events = require('./correlated-events-kSwLo3mi.cjs');
6
6
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
7
7
  let node_async_hooks = require("node:async_hooks");
package/dist/workflow.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getActiveSpan } from "./trace-helpers.js";
2
- import { c as withTracing } from "./functional-Bit6noRu.js";
2
+ import { c as withTracing } from "./functional-BnDUxnSl.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-Bzh5y-UB.js";
4
4
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
5
5
  import * as nodeAsyncHooks from "node:async_hooks";
@@ -1,5 +1,5 @@
1
1
  import { h as SamplingPreset } from "./sampling-BR9fkSwx.cjs";
2
- import { n as OtlpSignal, t as AutotelConfig } from "./init-a4yPDYqC.cjs";
2
+ import { n as OtlpSignal, t as AutotelConfig } from "./init-XzXzrarP.cjs";
3
3
  //#region src/yaml-config.d.ts
4
4
  /**
5
5
  * YAML config structure
@@ -1,5 +1,5 @@
1
1
  import { h as SamplingPreset } from "./sampling-CP3e7-Yr.js";
2
- import { n as OtlpSignal, t as AutotelConfig } from "./init-CTyqG9qR.js";
2
+ import { n as OtlpSignal, t as AutotelConfig } from "./init-D6n2diBy.js";
3
3
  //#region src/yaml-config.d.ts
4
4
  /**
5
5
  * YAML config structure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Write Once, Observe Anywhere",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -256,8 +256,7 @@
256
256
  },
257
257
  "files": [
258
258
  "dist",
259
- "README.md",
260
- "skills"
259
+ "README.md"
261
260
  ],
262
261
  "keywords": [
263
262
  "opentelemetry",