autotel 4.2.5 → 5.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 (387) hide show
  1. package/README.md +125 -103
  2. package/dist/analysis.cjs +87 -0
  3. package/dist/analysis.cjs.map +1 -0
  4. package/dist/analysis.d.cts +87 -0
  5. package/dist/analysis.d.cts.map +1 -0
  6. package/dist/analysis.d.ts +87 -0
  7. package/dist/analysis.d.ts.map +1 -0
  8. package/dist/analysis.js +85 -0
  9. package/dist/analysis.js.map +1 -0
  10. package/dist/{attribute-redacting-processor-DtTS9xxh.d.ts → attribute-redacting-processor-Pk7lAzWd.d.cts} +13 -8
  11. package/dist/attribute-redacting-processor-Pk7lAzWd.d.cts.map +1 -0
  12. package/dist/{attribute-redacting-processor-DtTS9xxh.d.cts → attribute-redacting-processor-Pk7lAzWd.d.ts} +13 -8
  13. package/dist/attribute-redacting-processor-Pk7lAzWd.d.ts.map +1 -0
  14. package/dist/attribute-redacting-processor.cjs +4 -4
  15. package/dist/attribute-redacting-processor.cjs.map +1 -1
  16. package/dist/attribute-redacting-processor.d.cts +1 -1
  17. package/dist/attribute-redacting-processor.d.ts +1 -1
  18. package/dist/attribute-redacting-processor.js +4 -4
  19. package/dist/attribute-redacting-processor.js.map +1 -1
  20. package/dist/attributes.d.cts +1 -1
  21. package/dist/attributes.d.ts +1 -1
  22. package/dist/auto.cjs +1 -1
  23. package/dist/auto.cjs.map +1 -1
  24. package/dist/auto.d.cts +1 -1
  25. package/dist/auto.d.ts +1 -1
  26. package/dist/auto.js +1 -1
  27. package/dist/auto.js.map +1 -1
  28. package/dist/business-baggage.d.cts +2 -3
  29. package/dist/business-baggage.d.cts.map +1 -1
  30. package/dist/business-baggage.d.ts +2 -3
  31. package/dist/business-baggage.d.ts.map +1 -1
  32. package/dist/{canonical-log-line-processor-xvjMgtpF.d.cts → canonical-log-line-processor-B4WgG-VS.d.cts} +2 -3
  33. package/dist/canonical-log-line-processor-B4WgG-VS.d.cts.map +1 -0
  34. package/dist/{canonical-log-line-processor-BcRuAdRk.d.ts → canonical-log-line-processor-CL_J7gb5.d.ts} +2 -3
  35. package/dist/canonical-log-line-processor-CL_J7gb5.d.ts.map +1 -0
  36. package/dist/{canonical-log-line-processor-CcrDi6TO.cjs → canonical-log-line-processor-DOjb6Kxy.cjs} +5 -5
  37. package/dist/canonical-log-line-processor-DOjb6Kxy.cjs.map +1 -0
  38. package/dist/{canonical-log-line-processor-FLezvFCB.js → canonical-log-line-processor-mKABvGP0.js} +5 -5
  39. package/dist/canonical-log-line-processor-mKABvGP0.js.map +1 -0
  40. package/dist/config.d.cts +12 -7
  41. package/dist/config.d.cts.map +1 -1
  42. package/dist/config.d.ts +12 -7
  43. package/dist/config.d.ts.map +1 -1
  44. package/dist/correlation-id.cjs +1 -1
  45. package/dist/correlation-id.d.cts +0 -1
  46. package/dist/correlation-id.d.cts.map +1 -1
  47. package/dist/correlation-id.d.ts +0 -1
  48. package/dist/correlation-id.d.ts.map +1 -1
  49. package/dist/correlation-id.js +1 -1
  50. package/dist/db.d.cts.map +1 -1
  51. package/dist/db.d.ts.map +1 -1
  52. package/dist/decorators.cjs +1 -1
  53. package/dist/decorators.cjs.map +1 -1
  54. package/dist/decorators.d.cts +1 -2
  55. package/dist/decorators.d.cts.map +1 -1
  56. package/dist/decorators.d.ts +1 -2
  57. package/dist/decorators.d.ts.map +1 -1
  58. package/dist/decorators.js +1 -1
  59. package/dist/decorators.js.map +1 -1
  60. package/dist/{define-event-CreknLm3.d.ts → define-event-B2z1SBe7.d.ts} +2 -3
  61. package/dist/define-event-B2z1SBe7.d.ts.map +1 -0
  62. package/dist/{define-event-HZRizPwz.d.cts → define-event-CGG048HE.d.cts} +2 -3
  63. package/dist/define-event-CGG048HE.d.cts.map +1 -0
  64. package/dist/diagnostics.cjs +10 -1
  65. package/dist/diagnostics.cjs.map +1 -1
  66. package/dist/diagnostics.d.cts +0 -1
  67. package/dist/diagnostics.d.cts.map +1 -1
  68. package/dist/diagnostics.d.ts +0 -1
  69. package/dist/diagnostics.d.ts.map +1 -1
  70. package/dist/diagnostics.js +10 -1
  71. package/dist/diagnostics.js.map +1 -1
  72. package/dist/drain-pipeline.d.cts +12 -5
  73. package/dist/drain-pipeline.d.cts.map +1 -1
  74. package/dist/drain-pipeline.d.ts +12 -5
  75. package/dist/drain-pipeline.d.ts.map +1 -1
  76. package/dist/enrichers.d.cts.map +1 -1
  77. package/dist/enrichers.d.ts.map +1 -1
  78. package/dist/{event-rzA1X5h3.cjs → event-CwIpFdoY.cjs} +3 -3
  79. package/dist/event-CwIpFdoY.cjs.map +1 -0
  80. package/dist/{event-BEm5IJ8U.js → event-pLMF5b3d.js} +4 -4
  81. package/dist/event-pLMF5b3d.js.map +1 -0
  82. package/dist/{event-subscriber-D1XLkPzi.d.ts → event-subscriber-CWh8sTGh.d.cts} +2 -2
  83. package/dist/event-subscriber-CWh8sTGh.d.cts.map +1 -0
  84. package/dist/{event-subscriber-D1XLkPzi.d.cts → event-subscriber-CWh8sTGh.d.ts} +2 -2
  85. package/dist/event-subscriber-CWh8sTGh.d.ts.map +1 -0
  86. package/dist/event-subscriber.d.cts +1 -1
  87. package/dist/event-subscriber.d.ts +1 -1
  88. package/dist/{event-testing-CfFs3to2.d.ts → event-testing-CA2mIx1E.d.ts} +2 -3
  89. package/dist/event-testing-CA2mIx1E.d.ts.map +1 -0
  90. package/dist/{event-testing-BqRnI0z4.d.cts → event-testing-D0qWfqAy.d.cts} +2 -3
  91. package/dist/event-testing-D0qWfqAy.d.cts.map +1 -0
  92. package/dist/event-testing.d.cts +1 -1
  93. package/dist/event-testing.d.ts +1 -1
  94. package/dist/event.cjs +1 -1
  95. package/dist/event.d.cts +3 -4
  96. package/dist/event.d.cts.map +1 -1
  97. package/dist/event.d.ts +3 -4
  98. package/dist/event.d.ts.map +1 -1
  99. package/dist/event.js +1 -1
  100. package/dist/exporters.d.cts +0 -4
  101. package/dist/exporters.d.cts.map +1 -1
  102. package/dist/exporters.d.ts +0 -4
  103. package/dist/exporters.d.ts.map +1 -1
  104. package/dist/{filtering-span-processor-B8R8B7Uk.d.ts → filtering-span-processor-BpDagWNa.d.cts} +1 -2
  105. package/dist/filtering-span-processor-BpDagWNa.d.cts.map +1 -0
  106. package/dist/{filtering-span-processor-B8R8B7Uk.d.cts → filtering-span-processor-BpDagWNa.d.ts} +1 -2
  107. package/dist/filtering-span-processor-BpDagWNa.d.ts.map +1 -0
  108. package/dist/filtering-span-processor.d.cts +1 -1
  109. package/dist/filtering-span-processor.d.ts +1 -1
  110. package/dist/functional-Bit6noRu.js +840 -0
  111. package/dist/functional-Bit6noRu.js.map +1 -0
  112. package/dist/functional-Cj7PSItS.cjs +890 -0
  113. package/dist/functional-Cj7PSItS.cjs.map +1 -0
  114. package/dist/functional.cjs +2 -2
  115. package/dist/functional.d.cts +79 -130
  116. package/dist/functional.d.cts.map +1 -1
  117. package/dist/functional.d.ts +79 -130
  118. package/dist/functional.d.ts.map +1 -1
  119. package/dist/functional.js +2 -2
  120. package/dist/http.cjs +5 -5
  121. package/dist/http.cjs.map +1 -1
  122. package/dist/http.d.cts +4 -5
  123. package/dist/http.d.cts.map +1 -1
  124. package/dist/http.d.ts +4 -5
  125. package/dist/http.d.ts.map +1 -1
  126. package/dist/http.js +5 -5
  127. package/dist/http.js.map +1 -1
  128. package/dist/{index-eKuioqT1.d.cts → index-BPcxVucm.d.cts} +2 -3
  129. package/dist/index-BPcxVucm.d.cts.map +1 -0
  130. package/dist/{index-Ck06vlW2.d.ts → index-DolOVX6F.d.ts} +2 -3
  131. package/dist/index-DolOVX6F.d.ts.map +1 -0
  132. package/dist/index.cjs +10 -15
  133. package/dist/index.cjs.map +1 -1
  134. package/dist/index.d.cts +14 -14
  135. package/dist/index.d.cts.map +1 -1
  136. package/dist/index.d.ts +14 -14
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +11 -16
  139. package/dist/index.js.map +1 -1
  140. package/dist/{init-BxJEJ9Tn.cjs → init-B2uvZReD.cjs} +19 -10
  141. package/dist/init-B2uvZReD.cjs.map +1 -0
  142. package/dist/{init-B7u-DjxM.d.ts → init-CTyqG9qR.d.ts} +24 -17
  143. package/dist/init-CTyqG9qR.d.ts.map +1 -0
  144. package/dist/{init-BvBB45-T.js → init-CdEWjhvl.js} +20 -11
  145. package/dist/init-CdEWjhvl.js.map +1 -0
  146. package/dist/{init-DSrRmVnz.d.cts → init-a4yPDYqC.d.cts} +24 -17
  147. package/dist/init-a4yPDYqC.d.cts.map +1 -0
  148. package/dist/instrumentation.cjs +7 -13
  149. package/dist/instrumentation.cjs.map +1 -1
  150. package/dist/instrumentation.d.cts +0 -1
  151. package/dist/instrumentation.d.cts.map +1 -1
  152. package/dist/instrumentation.d.ts +0 -1
  153. package/dist/instrumentation.d.ts.map +1 -1
  154. package/dist/instrumentation.js +8 -14
  155. package/dist/instrumentation.js.map +1 -1
  156. package/dist/{logger-BauSUhUv.d.ts → logger-CN4xpzMd.d.cts} +1 -2
  157. package/dist/logger-CN4xpzMd.d.cts.map +1 -0
  158. package/dist/{logger-BauSUhUv.d.cts → logger-CN4xpzMd.d.ts} +1 -2
  159. package/dist/logger-CN4xpzMd.d.ts.map +1 -0
  160. package/dist/logger-D3Ej3DII.js.map +1 -1
  161. package/dist/logger-thMPLpOG.cjs.map +1 -1
  162. package/dist/logger.d.cts +1 -1
  163. package/dist/logger.d.ts +1 -1
  164. package/dist/messaging-adapters.cjs.map +1 -1
  165. package/dist/messaging-adapters.d.cts +0 -1
  166. package/dist/messaging-adapters.d.cts.map +1 -1
  167. package/dist/messaging-adapters.d.ts +0 -1
  168. package/dist/messaging-adapters.d.ts.map +1 -1
  169. package/dist/messaging-adapters.js.map +1 -1
  170. package/dist/messaging-testing.d.cts +0 -1
  171. package/dist/messaging-testing.d.cts.map +1 -1
  172. package/dist/messaging-testing.d.ts +0 -1
  173. package/dist/messaging-testing.d.ts.map +1 -1
  174. package/dist/messaging.cjs +27 -10
  175. package/dist/messaging.cjs.map +1 -1
  176. package/dist/messaging.d.cts +6 -7
  177. package/dist/messaging.d.cts.map +1 -1
  178. package/dist/messaging.d.ts +6 -7
  179. package/dist/messaging.d.ts.map +1 -1
  180. package/dist/messaging.js +27 -10
  181. package/dist/messaging.js.map +1 -1
  182. package/dist/metric-helpers.d.cts +0 -1
  183. package/dist/metric-helpers.d.cts.map +1 -1
  184. package/dist/metric-helpers.d.ts +0 -1
  185. package/dist/metric-helpers.d.ts.map +1 -1
  186. package/dist/{metric-testing-DXdK3-Q3.d.ts → metric-testing-CWm6UhaR.d.ts} +2 -3
  187. package/dist/metric-testing-CWm6UhaR.d.ts.map +1 -0
  188. package/dist/{metric-testing-MxvzChDp.d.cts → metric-testing-CpvP3ZIa.d.cts} +2 -3
  189. package/dist/metric-testing-CpvP3ZIa.d.cts.map +1 -0
  190. package/dist/metric-testing.d.cts +1 -1
  191. package/dist/metric-testing.d.ts +1 -1
  192. package/dist/metric.d.cts +3 -4
  193. package/dist/metric.d.cts.map +1 -1
  194. package/dist/metric.d.ts +3 -4
  195. package/dist/metric.d.ts.map +1 -1
  196. package/dist/parse-error.d.cts.map +1 -1
  197. package/dist/parse-error.d.ts.map +1 -1
  198. package/dist/processors.cjs +1 -1
  199. package/dist/processors.d.cts +1 -1
  200. package/dist/processors.d.ts +1 -1
  201. package/dist/processors.js +1 -1
  202. package/dist/register.d.cts +1 -1
  203. package/dist/register.d.ts +1 -1
  204. package/dist/{sampling-DfYhDJij.d.cts → sampling-BR9fkSwx.d.cts} +127 -10
  205. package/dist/sampling-BR9fkSwx.d.cts.map +1 -0
  206. package/dist/{sampling-CR0Va1VB.d.ts → sampling-CP3e7-Yr.d.ts} +127 -10
  207. package/dist/sampling-CP3e7-Yr.d.ts.map +1 -0
  208. package/dist/sampling.cjs +160 -12
  209. package/dist/sampling.cjs.map +1 -1
  210. package/dist/sampling.d.cts +2 -2
  211. package/dist/sampling.d.ts +2 -2
  212. package/dist/sampling.js +157 -13
  213. package/dist/sampling.js.map +1 -1
  214. package/dist/security-schema.d.cts +9 -4
  215. package/dist/security-schema.d.cts.map +1 -1
  216. package/dist/security-schema.d.ts +9 -4
  217. package/dist/security-schema.d.ts.map +1 -1
  218. package/dist/semantic-conventions-FhSxv-bK.d.cts.map +1 -1
  219. package/dist/semantic-conventions-FhSxv-bK.d.ts.map +1 -1
  220. package/dist/semantic-conventions.cjs.map +1 -1
  221. package/dist/semantic-conventions.js.map +1 -1
  222. package/dist/semantic-helpers.cjs +85 -304
  223. package/dist/semantic-helpers.cjs.map +1 -1
  224. package/dist/semantic-helpers.d.cts +21 -12
  225. package/dist/semantic-helpers.d.cts.map +1 -1
  226. package/dist/semantic-helpers.d.ts +21 -12
  227. package/dist/semantic-helpers.d.ts.map +1 -1
  228. package/dist/semantic-helpers.js +85 -304
  229. package/dist/semantic-helpers.js.map +1 -1
  230. package/dist/slo.cjs +225 -0
  231. package/dist/slo.cjs.map +1 -0
  232. package/dist/slo.d.cts +97 -0
  233. package/dist/slo.d.cts.map +1 -0
  234. package/dist/slo.d.ts +97 -0
  235. package/dist/slo.d.ts.map +1 -0
  236. package/dist/slo.js +223 -0
  237. package/dist/slo.js.map +1 -0
  238. package/dist/{span-name-normalizer-8ZOGJuwv.d.ts → span-name-normalizer-CN1-8C76.d.cts} +1 -2
  239. package/dist/span-name-normalizer-CN1-8C76.d.cts.map +1 -0
  240. package/dist/{span-name-normalizer-8ZOGJuwv.d.cts → span-name-normalizer-CN1-8C76.d.ts} +1 -2
  241. package/dist/span-name-normalizer-CN1-8C76.d.ts.map +1 -0
  242. package/dist/span-name-normalizer.cjs.map +1 -1
  243. package/dist/span-name-normalizer.d.cts +1 -1
  244. package/dist/span-name-normalizer.d.ts +1 -1
  245. package/dist/span-name-normalizer.js.map +1 -1
  246. package/dist/tail-sampling-processor.d.cts +0 -1
  247. package/dist/tail-sampling-processor.d.cts.map +1 -1
  248. package/dist/tail-sampling-processor.d.ts +0 -1
  249. package/dist/tail-sampling-processor.d.ts.map +1 -1
  250. package/dist/test-span-collector.cjs +13 -1
  251. package/dist/test-span-collector.cjs.map +1 -1
  252. package/dist/test-span-collector.d.cts +8 -1
  253. package/dist/test-span-collector.d.cts.map +1 -1
  254. package/dist/test-span-collector.d.ts +8 -1
  255. package/dist/test-span-collector.d.ts.map +1 -1
  256. package/dist/test-span-collector.js +13 -1
  257. package/dist/test-span-collector.js.map +1 -1
  258. package/dist/testing.cjs +76 -11
  259. package/dist/testing.cjs.map +1 -1
  260. package/dist/testing.d.cts +30 -5
  261. package/dist/testing.d.cts.map +1 -1
  262. package/dist/testing.d.ts +30 -5
  263. package/dist/testing.d.ts.map +1 -1
  264. package/dist/testing.js +73 -12
  265. package/dist/testing.js.map +1 -1
  266. package/dist/{trace-context-Cijqoi6e.d.ts → trace-context-IuyoPyNq.d.cts} +9 -9
  267. package/dist/trace-context-IuyoPyNq.d.cts.map +1 -0
  268. package/dist/{trace-context-Cijqoi6e.d.cts → trace-context-IuyoPyNq.d.ts} +9 -9
  269. package/dist/trace-context-IuyoPyNq.d.ts.map +1 -0
  270. package/dist/trace-factory-validation-BjVAinz6.js +13 -0
  271. package/dist/trace-factory-validation-BjVAinz6.js.map +1 -0
  272. package/dist/trace-factory-validation-Dc8epn87.cjs +19 -0
  273. package/dist/trace-factory-validation-Dc8epn87.cjs.map +1 -0
  274. package/dist/trace-helpers.cjs +7 -7
  275. package/dist/trace-helpers.cjs.map +1 -1
  276. package/dist/trace-helpers.d.cts +6 -7
  277. package/dist/trace-helpers.d.cts.map +1 -1
  278. package/dist/trace-helpers.d.ts +6 -7
  279. package/dist/trace-helpers.d.ts.map +1 -1
  280. package/dist/trace-helpers.js +7 -7
  281. package/dist/trace-helpers.js.map +1 -1
  282. package/dist/tracer-provider.cjs +27 -0
  283. package/dist/tracer-provider.cjs.map +1 -1
  284. package/dist/tracer-provider.d.cts +19 -2
  285. package/dist/tracer-provider.d.cts.map +1 -1
  286. package/dist/tracer-provider.d.ts +19 -2
  287. package/dist/tracer-provider.d.ts.map +1 -1
  288. package/dist/tracer-provider.js +27 -1
  289. package/dist/tracer-provider.js.map +1 -1
  290. package/dist/{track-D7O7oIZa.js → track-BBcxEJEC.js} +7 -12
  291. package/dist/track-BBcxEJEC.js.map +1 -0
  292. package/dist/{track-eovhCJ-I.cjs → track-BI6dmZ2X.cjs} +6 -17
  293. package/dist/track-BI6dmZ2X.cjs.map +1 -0
  294. package/dist/validate.cjs.map +1 -1
  295. package/dist/validate.d.cts +1 -2
  296. package/dist/validate.d.cts.map +1 -1
  297. package/dist/validate.d.ts +1 -2
  298. package/dist/validate.d.ts.map +1 -1
  299. package/dist/validate.js.map +1 -1
  300. package/dist/validation-attributes.d.cts +17 -8
  301. package/dist/validation-attributes.d.cts.map +1 -1
  302. package/dist/validation-attributes.d.ts +17 -8
  303. package/dist/validation-attributes.d.ts.map +1 -1
  304. package/dist/webhook.cjs +5 -4
  305. package/dist/webhook.cjs.map +1 -1
  306. package/dist/webhook.d.cts +4 -4
  307. package/dist/webhook.d.cts.map +1 -1
  308. package/dist/webhook.d.ts +4 -4
  309. package/dist/webhook.d.ts.map +1 -1
  310. package/dist/webhook.js +5 -4
  311. package/dist/webhook.js.map +1 -1
  312. package/dist/workflow-distributed.cjs +5 -5
  313. package/dist/workflow-distributed.cjs.map +1 -1
  314. package/dist/workflow-distributed.d.cts +25 -15
  315. package/dist/workflow-distributed.d.cts.map +1 -1
  316. package/dist/workflow-distributed.d.ts +25 -15
  317. package/dist/workflow-distributed.d.ts.map +1 -1
  318. package/dist/workflow-distributed.js +5 -5
  319. package/dist/workflow-distributed.js.map +1 -1
  320. package/dist/workflow.cjs +24 -30
  321. package/dist/workflow.cjs.map +1 -1
  322. package/dist/workflow.d.cts +11 -6
  323. package/dist/workflow.d.cts.map +1 -1
  324. package/dist/workflow.d.ts +11 -6
  325. package/dist/workflow.d.ts.map +1 -1
  326. package/dist/workflow.js +24 -30
  327. package/dist/workflow.js.map +1 -1
  328. package/dist/yaml-config.d.cts +2 -3
  329. package/dist/yaml-config.d.cts.map +1 -1
  330. package/dist/yaml-config.d.ts +2 -3
  331. package/dist/yaml-config.d.ts.map +1 -1
  332. package/package.json +23 -14
  333. package/skills/analyze-traces/SKILL.md +42 -13
  334. package/skills/autotel-core/SKILL.md +24 -17
  335. package/skills/autotel-events/SKILL.md +1 -1
  336. package/skills/autotel-frameworks/SKILL.md +41 -6
  337. package/skills/autotel-instrumentation/SKILL.md +14 -9
  338. package/skills/autotel-request-logging/SKILL.md +19 -14
  339. package/skills/autotel-structured-errors/SKILL.md +2 -2
  340. package/skills/build-audit-trails/SKILL.md +11 -11
  341. package/skills/build-audit-trails/references/audit-queries.md +3 -3
  342. package/skills/debug-missing-spans/SKILL.md +12 -12
  343. package/skills/migrate-to-autotel/SKILL.md +20 -20
  344. package/skills/review-otel-patterns/SKILL.md +44 -42
  345. package/skills/review-otel-patterns/references/code-review.md +4 -4
  346. package/skills/review-otel-patterns/references/processor-pipeline.md +3 -3
  347. package/skills/review-otel-patterns/references/structured-errors.md +1 -1
  348. package/skills/review-otel-patterns/references/wide-spans.md +2 -2
  349. package/skills/tune-sampling/SKILL.md +91 -16
  350. package/dist/attribute-redacting-processor-DtTS9xxh.d.cts.map +0 -1
  351. package/dist/attribute-redacting-processor-DtTS9xxh.d.ts.map +0 -1
  352. package/dist/canonical-log-line-processor-BcRuAdRk.d.ts.map +0 -1
  353. package/dist/canonical-log-line-processor-CcrDi6TO.cjs.map +0 -1
  354. package/dist/canonical-log-line-processor-FLezvFCB.js.map +0 -1
  355. package/dist/canonical-log-line-processor-xvjMgtpF.d.cts.map +0 -1
  356. package/dist/define-event-CreknLm3.d.ts.map +0 -1
  357. package/dist/define-event-HZRizPwz.d.cts.map +0 -1
  358. package/dist/event-BEm5IJ8U.js.map +0 -1
  359. package/dist/event-rzA1X5h3.cjs.map +0 -1
  360. package/dist/event-subscriber-D1XLkPzi.d.cts.map +0 -1
  361. package/dist/event-subscriber-D1XLkPzi.d.ts.map +0 -1
  362. package/dist/event-testing-BqRnI0z4.d.cts.map +0 -1
  363. package/dist/event-testing-CfFs3to2.d.ts.map +0 -1
  364. package/dist/filtering-span-processor-B8R8B7Uk.d.cts.map +0 -1
  365. package/dist/filtering-span-processor-B8R8B7Uk.d.ts.map +0 -1
  366. package/dist/functional-BCtxvYir.cjs +0 -1315
  367. package/dist/functional-BCtxvYir.cjs.map +0 -1
  368. package/dist/functional-CrAq8Az8.js +0 -1265
  369. package/dist/functional-CrAq8Az8.js.map +0 -1
  370. package/dist/index-Ck06vlW2.d.ts.map +0 -1
  371. package/dist/index-eKuioqT1.d.cts.map +0 -1
  372. package/dist/init-B7u-DjxM.d.ts.map +0 -1
  373. package/dist/init-BvBB45-T.js.map +0 -1
  374. package/dist/init-BxJEJ9Tn.cjs.map +0 -1
  375. package/dist/init-DSrRmVnz.d.cts.map +0 -1
  376. package/dist/logger-BauSUhUv.d.cts.map +0 -1
  377. package/dist/logger-BauSUhUv.d.ts.map +0 -1
  378. package/dist/metric-testing-DXdK3-Q3.d.ts.map +0 -1
  379. package/dist/metric-testing-MxvzChDp.d.cts.map +0 -1
  380. package/dist/sampling-CR0Va1VB.d.ts.map +0 -1
  381. package/dist/sampling-DfYhDJij.d.cts.map +0 -1
  382. package/dist/span-name-normalizer-8ZOGJuwv.d.cts.map +0 -1
  383. package/dist/span-name-normalizer-8ZOGJuwv.d.ts.map +0 -1
  384. package/dist/trace-context-Cijqoi6e.d.cts.map +0 -1
  385. package/dist/trace-context-Cijqoi6e.d.ts.map +0 -1
  386. package/dist/track-D7O7oIZa.js.map +0 -1
  387. package/dist/track-eovhCJ-I.cjs.map +0 -1
@@ -1,17 +1,19 @@
1
1
  ---
2
2
  name: autotel-frameworks
3
3
  description: >
4
- Hono, Fastify, TanStack Start, Cloudflare Workers. Middleware and init; getRequestLogger() in handlers. Load when adding Autotel to a web framework.
4
+ Hono, Fastify, TanStack Start, Cloudflare Workers, NestJS, SvelteKit, Elysia, Nuxt. Middleware and init; getRequestLogger() in handlers. Load when adding Autotel to a web framework.
5
5
  ---
6
6
 
7
- # Autotel — Framework Integration
7
+ # Autotel: Framework Integration
8
8
 
9
9
  This skill builds on autotel-instrumentation. Read it first for init() and span creation.
10
10
 
11
- Use framework-specific middleware or wrappers to create a span per request; then call `getRequestLogger()` inside handlers. Each framework package (autotel-hono, autotel-tanstack, autotel-cloudflare) provides the glue.
11
+ Use framework-specific middleware or wrappers to create a span per request; then call `getRequestLogger()` inside handlers. Most frameworks use `autotel-adapters` subpaths (or a thin wrapper package like `autotel-hono`, `autotel-tanstack`, `autotel-cloudflare`, `autotel-nuxt`).
12
12
 
13
13
  When adding new request/exception events in framework handlers, prefer correlated logs (`getRequestLogger().info/warn/error`) instead of introducing new `span.addEvent()` usage.
14
14
 
15
+ For custom HTTP frameworks, start from `autotel-adapters/toolkit` (`defineFrameworkIntegration`, `createMiddlewareLogger`, `finishResponse` for streaming, `waitUntil` on edge runtimes).
16
+
15
17
  ## Setup
16
18
 
17
19
  ### Hono
@@ -46,13 +48,43 @@ See packages/autotel-tanstack and apps/example-tanstack-start: middleware and en
46
48
 
47
49
  ### Cloudflare Workers
48
50
 
49
- See packages/autotel-cloudflare: init at top level, wrap the fetch handler so each request gets a span. Use `getRequestLogger()` or trace context inside the handler.
51
+ See packages/autotel-cloudflare: init at top level, wrap the fetch handler so each request gets a span. Use `getRequestLogger()` or trace context inside the handler. Pass `ctx.waitUntil` through adapter options so emit/drain completes after the response.
52
+
53
+ ### NestJS
54
+
55
+ Use `AutotelInterceptor` from `autotel-adapters/nestjs` and `useLogger()` in controllers/services (see apps/example-nestjs):
56
+
57
+ ```typescript
58
+ import { APP_INTERCEPTOR } from '@nestjs/core';
59
+ import { AutotelInterceptor } from 'autotel-adapters/nestjs';
60
+
61
+ @Module({
62
+ providers: [{ provide: APP_INTERCEPTOR, useClass: AutotelInterceptor }],
63
+ })
64
+ export class AppModule {}
65
+ ```
66
+
67
+ ### SvelteKit
68
+
69
+ Add `autotelHandle()` in `hooks.server.ts` from `autotel-adapters/sveltekit`; call `useLogger()` in `+server.ts` / server loads. Use `finishResponse` semantics for streaming routes (see toolkit `stream-response`).
70
+
71
+ ### Elysia
72
+
73
+ Wrap handlers with `withAutotelHandler()` from `autotel-adapters/elysia` (or the `autotel` alias); use `useLogger()` inside handlers (see apps/example-elysia).
74
+
75
+ ### Nuxt
76
+
77
+ Add the `autotel-nuxt` module for zero-config Nitro wiring; server code can use `useLogger()` via `autotel-adapters/nitro` re-exports from `autotel-nuxt/runtime/nitro`.
50
78
 
51
79
  ## Core Patterns
52
80
 
53
81
  **Register middleware before routes:** Middleware creates the span; getRequestLogger() needs that active span.
54
82
 
55
- **Framework-specific packages:** autotel-hono, autotel-tanstack, autotel-cloudflare. Install the package for your framework and follow its README or CLAUDE.md.
83
+ **Framework-specific packages:** autotel-hono, autotel-tanstack, autotel-cloudflare, autotel-nuxt. Adapter subpaths: autotel-adapters/{express,fastify,next,nitro,nestjs,sveltekit,elysia,...}. Install the package for your framework and follow its README or CLAUDE.md.
84
+
85
+ **Streaming responses:** defer `emitNow` until the body finishes via adapter `finishResponse` / toolkit `bindStreamingResponseLifecycle`.
86
+
87
+ **Edge drain:** pass `waitUntil` (Cloudflare `ExecutionContext`, etc.) so async emit/drain does not block the response.
56
88
 
57
89
  ## Common Mistakes
58
90
 
@@ -87,4 +119,7 @@ Source: packages/autotel-hono, docs/AGENT-GUIDE.md
87
119
 
88
120
  Targets autotel v2.23.x.
89
121
 
90
- See also: autotel-instrumentation/SKILL.md — init and spans. autotel-request-logging/SKILL.md — request logger usage.
122
+ See also:
123
+
124
+ - `autotel-instrumentation/SKILL.md` for init and spans
125
+ - `autotel-request-logging/SKILL.md` for request logger usage
@@ -4,7 +4,7 @@ description: >
4
4
  trace(), span(), instrument(), init(). Factory vs direct pattern, name inference. Sync init; use node-require for optional deps. Load when wrapping handlers or functions with spans.
5
5
  ---
6
6
 
7
- # Autotel — Instrumentation
7
+ # Autotel: Instrumentation
8
8
 
9
9
  Wrap functions and handlers with `trace()`, `span()`, or `instrument()`. Call `init()` once at app startup. Keep init synchronous; use `safeRequire`/`requireModule` for optional dependencies.
10
10
 
@@ -13,7 +13,7 @@ For new event emission, prefer correlated logs (OTel Logs API path) over adding
13
13
  ## Setup
14
14
 
15
15
  ```typescript
16
- import { init, trace } from 'autotel';
16
+ import { init, trace, withTracing } from 'autotel';
17
17
 
18
18
  init({ service: 'my-app' });
19
19
 
@@ -25,12 +25,14 @@ const handler = trace(async (req: Request) => {
25
25
  With span context (attributes, request logger):
26
26
 
27
27
  ```typescript
28
- const handler = trace((ctx) => async (req: Request) => {
29
- ctx.setAttribute('http.route', '/api/checkout');
30
- const log = getRequestLogger(ctx);
31
- log.set({ path: req.url });
32
- return processRequest(req);
33
- });
28
+ const handler = withTracing({ name: 'http.request' })(
29
+ (ctx) => async (req: Request) => {
30
+ ctx.setAttribute('http.route', '/api/checkout');
31
+ const log = getRequestLogger(ctx);
32
+ log.set({ path: req.url });
33
+ return processRequest(req);
34
+ },
35
+ );
34
36
  ```
35
37
 
36
38
  ## Core Patterns
@@ -142,4 +144,7 @@ Source: packages/autotel/package.json exports
142
144
 
143
145
  Targets autotel v2.23.x.
144
146
 
145
- See also: autotel-core/SKILL.md — when to use what. autotel-request-logging/SKILL.md — getRequestLogger requires active span.
147
+ See also:
148
+
149
+ - `autotel-core/SKILL.md` for when to use what
150
+ - `autotel-request-logging/SKILL.md`, since `getRequestLogger` requires an active span
@@ -4,33 +4,35 @@ description: >
4
4
  getRequestLogger(), set(), info/warn/error, emitNow(). One snapshot per request; requires active span. Use when adding request-scoped context or replacing scattered console.log.
5
5
  ---
6
6
 
7
- # Autotel — Request Logging
7
+ # Autotel: Request Logging
8
8
 
9
9
  This skill builds on autotel-instrumentation. Read it first for init and span creation.
10
10
 
11
- Accumulate context with `getRequestLogger(ctx)`, `.set()`, and `.info()`/`.warn()`/`.error()`. Call `.emitNow()` (or rely on middleware) to emit one snapshot per request. Request logger requires an active span — use inside `trace()` or framework middleware.
11
+ Accumulate context with `getRequestLogger(ctx)`, `.set()`, and `.info()`/`.warn()`/`.error()`. Call `.emitNow()` (or rely on middleware) to emit one snapshot per request. Request logger requires an active span. Use inside `trace()` or framework middleware.
12
12
 
13
13
  Preferred event model: treat request logger emissions as the default way to capture request-correlated events in new code. If a backend still expects span-event rendering, keep compatibility at export/processor level rather than adding new `span.addEvent()` calls in application code.
14
14
 
15
15
  ## Setup
16
16
 
17
17
  ```typescript
18
- import { init, trace, getRequestLogger } from 'autotel';
18
+ import { init, withTracing, getRequestLogger } from 'autotel';
19
19
 
20
20
  init({ service: 'my-app' });
21
21
 
22
- const handler = trace((ctx) => async (req: Request, res: Response) => {
23
- const log = getRequestLogger(ctx);
24
- log.set({ method: req.method, path: req.url });
22
+ const handler = withTracing({ name: 'http.request' })(
23
+ (ctx) => async (req: Request, res: Response) => {
24
+ const log = getRequestLogger(ctx);
25
+ log.set({ method: req.method, path: req.url });
25
26
 
26
- const user = await getAuth(req);
27
- log.set({ user: { id: user.id } });
27
+ const user = await getAuth(req);
28
+ log.set({ user: { id: user.id } });
28
29
 
29
- const result = await doWork(req);
30
- log.set({ result: { id: result.id } });
31
- log.emitNow();
32
- return res.json(result);
33
- });
30
+ const result = await doWork(req);
31
+ log.set({ result: { id: result.id } });
32
+ log.emitNow();
33
+ return res.json(result);
34
+ },
35
+ );
34
36
  ```
35
37
 
36
38
  When the framework creates the span (e.g. Hono middleware), call `getRequestLogger()` with no args:
@@ -91,4 +93,7 @@ Source: packages/autotel/src/request-logger.ts
91
93
 
92
94
  Targets autotel v2.23.x.
93
95
 
94
- See also: autotel-instrumentation/SKILL.md — creating the span. autotel-structured-errors/SKILL.md — use .error() to record errors in the snapshot.
96
+ See also:
97
+
98
+ - `autotel-instrumentation/SKILL.md` for creating the span
99
+ - `autotel-structured-errors/SKILL.md`, which uses `.error()` to record errors in the snapshot
@@ -4,7 +4,7 @@ description: >
4
4
  createStructuredError, parseError, recordStructuredError. API errors with message, why, fix, link; client parsing for UI. Use in API routes and client catch blocks.
5
5
  ---
6
6
 
7
- # Autotel — Structured Errors
7
+ # Autotel: Structured Errors
8
8
 
9
9
  Throw errors with `createStructuredError({ message, why?, fix?, link?, status?, cause? })` in API routes and services. On the client, use `parseError(caught)` to get `message`, `status`, `why`, `fix`, `link` for toasts and UI.
10
10
 
@@ -122,4 +122,4 @@ Source: docs/AGENT-GUIDE.md
122
122
 
123
123
  Targets autotel v2.23.x.
124
124
 
125
- See also: autotel-request-logging/SKILL.md — use .error() to record errors in the request snapshot.
125
+ See also: autotel-request-logging/SKILL.md. Use .error() to record errors in the request snapshot.
@@ -17,9 +17,9 @@ license: MIT
17
17
 
18
18
  # Build audit trails
19
19
 
20
- An _audit trail_ is a record of who did what to which resource, when, and whether it was permitted — durable, tamper-evident, and admissible. Operational telemetry (latency, errors, span shapes) is for engineers; audit trails are for compliance, security, and forensics. They overlap technically but differ on every other axis.
20
+ An _audit trail_ is a record of who did what to which resource, when, and whether it was permitted. Durable, tamper-evident, and admissible. Operational telemetry (latency, errors, span shapes) is for engineers; audit trails are for compliance, security, and forensics. They overlap technically but differ on every other axis.
21
21
 
22
- autotel lets you express both with the same primitive — a span — but you should keep them on **separate processors** so an audit event never gets dropped by sampling, never gets redacted by a debug rule, and never goes to the same backend as your ops data.
22
+ autotel lets you express both with the same primitive, a span, but you should keep them on **separate processors** so an audit event never gets dropped by sampling, never gets redacted by a debug rule, and never goes to the same backend as your ops data.
23
23
 
24
24
  ## When to use
25
25
 
@@ -251,14 +251,14 @@ Verify on the read side: recompute the HMAC over the same sorted attribute set (
251
251
 
252
252
  For multi-tenant or extra-strict (HIPAA), use Ed25519 with per-environment keys and rotate.
253
253
 
254
- ## Step 5: Redaction — what stays and what goes
254
+ ## Step 5: Redaction: what stays and what goes
255
255
 
256
256
  | Field | In audit span? | Notes |
257
257
  | ------------------------ | -------------- | ------------------------------------------------------------------------------------- |
258
258
  | `enduser.id` | ✅ | Internal user id; never the email |
259
259
  | `audit.resource.id` | ✅ | Required for forensics |
260
260
  | `client.address` | ✅ | Last-octet redaction acceptable for IPv4 |
261
- | Free-form payload bodies | ❌ | Never inline raw input — link by id (`audit.evidence.id`) |
261
+ | Free-form payload bodies | ❌ | Never inline raw input: link by id (`audit.evidence.id`) |
262
262
  | Secret values | ❌ | Use `audit.action=secret.read` + `audit.resource.id=sec_abc`, never the secret itself |
263
263
  | Authorization headers | ❌ | Token names ok (`bearer.*`), values never |
264
264
 
@@ -356,7 +356,7 @@ app.post('/secrets/:id/read', async (c) => {
356
356
 
357
357
  ### Cloudflare Workers
358
358
 
359
- `audit()` from inside `defineWorkerFetch` — `ctx.waitUntil` makes sure the audit span is exported before the response returns:
359
+ `audit()` from inside `defineWorkerFetch`. `ctx.waitUntil` makes sure the audit span is exported before the response returns:
360
360
 
361
361
  ```typescript
362
362
  export default defineWorkerFetch(
@@ -452,9 +452,9 @@ To query the trail (denials, per-actor history, tamper detection) across Honeyco
452
452
 
453
453
  ## Glossary
454
454
 
455
- - **Audit span** — an OpenTelemetry span that records who did what to which resource, marked `audit` / `autotel.audit` so it is routed and retained separately from ops telemetry.
456
- - **Force-keep** — opting a span out of tail sampling so it is always exported; `forceKeepAuditEvent()` sets the autotel tail-keep flags.
457
- - **Denial** — an authorization decision that blocked an action; recorded with `audit.outcome = 'deny'` and a reason. Logging denials is as important as logging successes.
458
- - **Hash-chain** — linking each audit record to the hash of the previous one so removing or reordering records is detectable.
459
- - **Crypto-shredding** — satisfying an erasure request by destroying the per-subject encryption key rather than deleting the immutable record.
460
- - **Append-only store** — a backend that rejects updates and deletes (S3 Object Lock, immutable bucket, WORM storage), the destination for audit spans.
455
+ - **Audit span**: an OpenTelemetry span that records who did what to which resource, marked `audit` / `autotel.audit` so it is routed and retained separately from ops telemetry.
456
+ - **Force-keep**: opting a span out of tail sampling so it is always exported; `forceKeepAuditEvent()` sets the autotel tail-keep flags.
457
+ - **Denial**: an authorization decision that blocked an action; recorded with `audit.outcome = 'deny'` and a reason. Logging denials is as important as logging successes.
458
+ - **Hash-chain**: linking each audit record to the hash of the previous one so removing or reordering records is detectable.
459
+ - **Crypto-shredding**: satisfying an erasure request by destroying the per-subject encryption key rather than deleting the immutable record.
460
+ - **Append-only store**: a backend that rejects updates and deletes (S3 Object Lock, immutable bucket, WORM storage), the destination for audit spans.
@@ -8,7 +8,7 @@ Run these against the **audit backend** (the append-only one), not your ops back
8
8
 
9
9
  A spike in denials is a security signal (credential stuffing, privilege probing).
10
10
 
11
- - **Honeycomb** — filter `autotel.audit = true` AND `audit.outcome = deny`, group by `audit.action` and `enduser.id`, visualize `COUNT`.
11
+ - **Honeycomb**: filter `autotel.audit = true` AND `audit.outcome = deny`, group by `audit.action` and `enduser.id`, visualize `COUNT`.
12
12
  - **Grafana Tempo (TraceQL)**:
13
13
  ```
14
14
  { span.autotel.audit = true && span.audit.outcome = "deny" }
@@ -22,7 +22,7 @@ A spike in denials is a security signal (credential stuffing, privilege probing)
22
22
 
23
23
  Answer "everything user X did" for an access review or incident.
24
24
 
25
- - **Honeycomb** — filter `enduser.id = "usr_42"`, group by `audit.action`, `audit.resource.type`, order by timestamp.
25
+ - **Honeycomb**: filter `enduser.id = "usr_42"`, group by `audit.action`, `audit.resource.type`, order by timestamp.
26
26
  - **TraceQL**:
27
27
  ```
28
28
  { span.enduser.id = "usr_42" && span.autotel.audit = true }
@@ -49,7 +49,7 @@ Answer "everyone who accessed secret `sec_abc`".
49
49
 
50
50
  Confirm sensitive actions are actually being recorded. Group audit spans by `audit.action` and compare against your list of auditable actions. An action that never appears is either never exercised or never audited; both deserve a look.
51
51
 
52
- - **Honeycomb** — group by `audit.action`, `COUNT`, over 30 days.
52
+ - **Honeycomb**: group by `audit.action`, `COUNT`, over 30 days.
53
53
 
54
54
  ## Detect tampering or missing signatures
55
55
 
@@ -18,7 +18,7 @@ When a span you expect isn't in the backend, the cause is somewhere in this chai
18
18
  code → SDK init → head sampler → processor → exporter → network → backend ingest → backend index
19
19
  ```
20
20
 
21
- This skill walks each link in order with a quick check you can run. Don't skip steps — the cause is rarely where you'd guess.
21
+ This skill walks each link in order with a quick check you can run. Don't skip steps. The cause is rarely where you'd guess.
22
22
 
23
23
  ## Step 0: Reproduce locally with the pretty exporter
24
24
 
@@ -31,7 +31,7 @@ init({
31
31
  });
32
32
  ```
33
33
 
34
- If you see the span in stdout, the SDK + sampler are fine — skip to "exporter / network". If you don't, keep reading.
34
+ If you see the span in stdout, the SDK + sampler are fine. Skip to "exporter / network". If you don't, keep reading.
35
35
 
36
36
  ## Step 1: Is the SDK actually initialised?
37
37
 
@@ -60,9 +60,9 @@ console.log('[autotel-debug] sampling:', getActiveConfig()?.sampling);
60
60
 
61
61
  Common gotchas:
62
62
 
63
- - `sampling.rates: { server: 5 }` — 5 % means 95 % of spans never start.
63
+ - `sampling.rates: { server: 5 }`: 5 % means 95 % of spans never start.
64
64
  - Inheriting `OTEL_TRACES_SAMPLER_ARG=0.01` from the environment via the OTel default sampler.
65
- - Your test happens to hit the unsampled branch — instrument with `sampling: { rates: { server: 100 } }` while reproducing.
65
+ - Your test happens to hit the unsampled branch: instrument with `sampling: { rates: { server: 100 } }` while reproducing.
66
66
 
67
67
  To force sampling for one request, send a `traceparent` with the sampled flag set:
68
68
 
@@ -72,13 +72,13 @@ traceparent: 00-<traceid>-<spanid>-01
72
72
 
73
73
  (`-01` at the end = sampled.) autotel's parent-based sampler will respect it.
74
74
 
75
- ## Step 3: Cloudflare Workers — `ctx.waitUntil`
75
+ ## Step 3: Cloudflare Workers: `ctx.waitUntil`
76
76
 
77
77
  The single biggest cause of missing spans on the edge: **the response returned before the exporter flushed**.
78
78
 
79
79
  If you're using `addEventListener('fetch', …)` or a hand-rolled `fetch` in a module worker without wiring `ctx.waitUntil(…)` to the export call, async drains drop silently.
80
80
 
81
- Fix — switch to `defineWorkerFetch` or `wrapModule`, both of which wire `waitUntil` automatically:
81
+ Fix. Switch to `defineWorkerFetch` or `wrapModule`, both of which wire `waitUntil` automatically:
82
82
 
83
83
  ```typescript
84
84
  import { defineWorkerFetch } from 'autotel-cloudflare';
@@ -164,16 +164,16 @@ curl -v -X POST $OTLP_ENDPOINT \
164
164
  -d '{"resourceSpans":[]}'
165
165
  ```
166
166
 
167
- Should return `200`. If it doesn't, the problem is between you and the Collector — not autotel.
167
+ Should return `200`. If it doesn't, the problem is between you and the Collector. Not autotel.
168
168
 
169
169
  For Cloudflare Workers, run `wrangler tail` and look for `OTLPExporter` errors.
170
170
 
171
- ## Step 7: Backend ingest — silent rejection
171
+ ## Step 7: Backend ingest: silent rejection
172
172
 
173
173
  Some backends accept the request with a 200 but drop the events:
174
174
 
175
175
  - **Honeycomb**: dataset must exist _and_ the API key must have write access to it. Mismatched key/dataset → silent drop.
176
- - **Datadog**: check `service` is set (resource attribute `service.name`) — they ignore spans without it.
176
+ - **Datadog**: check `service` is set (resource attribute `service.name`): they ignore spans without it.
177
177
  - **Sentry**: SDK version mismatch on envelope → 200 but events disappear.
178
178
  - **Grafana Cloud Tempo**: spans without `service.name` go to a fallback service called `unknown_service`.
179
179
 
@@ -219,9 +219,9 @@ Don't conclude the span is missing until you've waited > 2× the expected lag.
219
219
 
220
220
  Some spans land, some don't:
221
221
 
222
- - **Trace context broken between services** — outbound HTTP calls aren't propagating `traceparent`. Confirm autotel's global fetch instrumentation is on (`instrumentation.instrumentGlobalFetch: true`, default).
223
- - **Async boundary loses context** — a `setTimeout` / queue callback ran outside the AsyncLocalStorage scope. Wrap with `trace()` or use `context.with()`.
224
- - **Cross-runtime call** — Node service → Workers → browser; verify `traceparent` arrives at each leg via response headers / network panel.
222
+ - **Trace context broken between services**: outbound HTTP calls aren't propagating `traceparent`. Confirm autotel's global fetch instrumentation is on (`instrumentation.instrumentGlobalFetch: true`, default).
223
+ - **Async boundary loses context**: a `setTimeout` / queue callback ran outside the AsyncLocalStorage scope. Wrap with `trace()` or use `context.with()`.
224
+ - **Cross-runtime call**: Node service → Workers → browser; verify `traceparent` arrives at each leg via response headers / network panel.
225
225
 
226
226
  ## When the SDK itself crashes
227
227
 
@@ -12,7 +12,7 @@ license: MIT
12
12
 
13
13
  # Migrate to autotel
14
14
 
15
- Replacing tracing in a live service is risky — you can lose data, change span shapes, or break dashboards your on-call team relies on. This skill covers the safe paths from each major source, what to change in your code, and how to verify the cutover before turning the old stack off.
15
+ Replacing tracing in a live service is risky. You can lose data, change span shapes, or break dashboards your on-call team relies on. This skill covers the safe paths from each major source, what to change in your code, and how to verify the cutover before turning the old stack off.
16
16
 
17
17
  ## Choose your starting point
18
18
 
@@ -34,11 +34,11 @@ Replacing tracing in a live service is risky — you can lose data, change span
34
34
  4. **Disable the old stack.** Remove old SDK imports + processors; redeploy.
35
35
  5. **Decommission.** Remove old packages from `package.json` and lock files; archive old dashboards.
36
36
 
37
- Don't compress this into a single PR. The riskiest step is "disable old stack" — keep it last.
37
+ Don't compress this into a single PR. The riskiest step is "disable old stack". Keep it last.
38
38
 
39
39
  ## From raw `@opentelemetry/sdk-node`
40
40
 
41
- The smoothest migration. autotel layers on top of OTel — your span attributes, propagators, and exporters can stay.
41
+ The smoothest migration. autotel layers on top of OTel. Your span attributes, propagators, and exporters can stay.
42
42
 
43
43
  ### Drop-in init
44
44
 
@@ -76,15 +76,15 @@ init({
76
76
 
77
77
  ### What you gain immediately
78
78
 
79
- - `useLogger().set({ … })` flattens onto the active span — no more `span.setAttribute('user.id', id)` boilerplate.
80
- - `attributeRedactor: 'default'` — PII masking for free in production.
79
+ - `useLogger().set({ … })` flattens onto the active span: no more `span.setAttribute('user.id', id)` boilerplate.
80
+ - `attributeRedactor: 'default'`: PII masking for free in production.
81
81
  - `destinations: [...]` for straightforward OTLP multi-backend fan-out.
82
82
  - Cloudflare Workers + Edge support out of the box (`defineWorkerFetch`).
83
83
 
84
84
  ### What stays the same
85
85
 
86
86
  - Your propagator (`W3CTraceContextPropagator` is the default).
87
- - Your exporters — pass them via `spanProcessors` if you want to keep custom ones.
87
+ - Your exporters: pass them via `spanProcessors` if you want to keep custom ones.
88
88
  - Your resource attributes.
89
89
 
90
90
  ## From Sentry performance tracing
@@ -148,7 +148,7 @@ Datadog APM uses its own format and proprietary tracer. The migration path is OT
148
148
 
149
149
  ### Step 1: Stop importing `dd-trace`
150
150
 
151
- `dd-trace` patches every supported library on import — keeping it in the bundle while autotel runs causes double-instrumentation. Remove `import 'dd-trace'` (or the `--require dd-trace/init` arg).
151
+ `dd-trace` patches every supported library on import. Keeping it in the bundle while autotel runs causes double-instrumentation. Remove `import 'dd-trace'` (or the `--require dd-trace/init` arg).
152
152
 
153
153
  ### Step 2: Point autotel at Datadog OTLP intake
154
154
 
@@ -166,7 +166,7 @@ For the EU site use `datadoghq.eu`; for US3 / US5 see Datadog's region matrix.
166
166
 
167
167
  ### Step 3: Map Datadog span tags
168
168
 
169
- Datadog uses `service`, `resource`, `operation` — OTel uses `service.name`, `http.route`, span name. autotel handles the conversion automatically when exporting via `dd-api-key`. If you have custom Datadog tags in dashboards, rename them in code:
169
+ Datadog uses `service`, `resource`, `operation`. OTel uses `service.name`, `http.route`, span name. autotel handles the conversion automatically when exporting via `dd-api-key`. If you have custom Datadog tags in dashboards, rename them in code:
170
170
 
171
171
  | Datadog tag | OTel attribute |
172
172
  | ----------- | --------------------------- |
@@ -185,7 +185,7 @@ Datadog uses `service`, `resource`, `operation` — OTel uses `service.name`, `h
185
185
 
186
186
  ## From New Relic Node agent
187
187
 
188
- New Relic's agent is invasive — it patches Node internals. Plan a maintenance window for the cutover.
188
+ New Relic's agent is invasive. It patches Node internals. Plan a maintenance window for the cutover.
189
189
 
190
190
  ### Step 1: Remove `--require newrelic`
191
191
 
@@ -214,7 +214,7 @@ For EU: `https://otlp.eu01.nr-data.net/v1/traces`.
214
214
 
215
215
  ## From Honeycomb Beelines
216
216
 
217
- Beelines for Node was Honeycomb's pre-OTel SDK. Migration is straightforward — Honeycomb supports OTLP natively.
217
+ Beelines for Node was Honeycomb's pre-OTel SDK. Migration is straightforward. Honeycomb supports OTLP natively.
218
218
 
219
219
  ```typescript
220
220
  init({
@@ -234,7 +234,7 @@ init({
234
234
 
235
235
  Both are deprecated; the migration is "rewrite the tracer setup, leave call sites alone." OpenTracing's `Tracer.startSpan` and OpenCensus's `tracer.startRootSpan` shapes are similar enough that a script can replace them with `trace()` calls in most files.
236
236
 
237
- For libraries you don't control that still use OpenTracing, the OTel project ships a [shim](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing) — wire it once, then migrate at your own pace.
237
+ For libraries you don't control that still use OpenTracing, the OTel project ships a [shim](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing). Wire it once, then migrate at your own pace.
238
238
 
239
239
  ## From unstructured logging
240
240
 
@@ -249,21 +249,21 @@ See [`review-otel-patterns`](../review-otel-patterns/SKILL.md) for the framework
249
249
 
250
250
  ## Verifying the cutover
251
251
 
252
- | Check | How |
253
- | --------------------------- | --------------------------------------------------------------------------------------------- |
254
- | **Span volume matches** | Compare `count(spans)` per route over 24h; should be within ±5 % |
255
- | **p99 latency unchanged** | Histograms on both backends |
256
- | **Error rate unchanged** | `count(spans where status=error)` |
257
- | **Trace correlation works** | Pick 10 random `traceId`s; confirm cross-service spans resolve |
258
- | **Bundle size acceptable** | `pnpm bundle-size` — moving from heavy agents (New Relic, Datadog) often _shrinks_ the bundle |
252
+ | Check | How |
253
+ | --------------------------- | -------------------------------------------------------------------------------------------- |
254
+ | **Span volume matches** | Compare `count(spans)` per route over 24h; should be within ±5 % |
255
+ | **p99 latency unchanged** | Histograms on both backends |
256
+ | **Error rate unchanged** | `count(spans where status=error)` |
257
+ | **Trace correlation works** | Pick 10 random `traceId`s; confirm cross-service spans resolve |
258
+ | **Bundle size acceptable** | `pnpm bundle-size`: moving from heavy agents (New Relic, Datadog) often _shrinks_ the bundle |
259
259
 
260
260
  ## Anti-patterns
261
261
 
262
262
  | Anti-pattern | Fix |
263
263
  | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
264
- | Both old SDK and autotel running on the same library | Pick one — double-instrumentation duplicates spans |
264
+ | Both old SDK and autotel running on the same library | Pick one: double-instrumentation duplicates spans |
265
265
  | Removing the old SDK in the same PR as adding autotel | Run both side-by-side for 24–48 h first |
266
266
  | Changing span names during migration | Preserve names; rename in a separate PR after dashboards re-pointed |
267
267
  | No metric snapshot before cutover | Take p50/p95/p99 + error-rate baselines first |
268
- | Migrating prod before staging | Always staging first — at least 24 h |
268
+ | Migrating prod before staging | Always staging first: at least 24 h |
269
269
  | Trusting the old vendor agent's auto-instrumentation list | autotel's targeted instrumentations (`autotel-drizzle`, `autotel-mongoose`, …) are faster and tighter; expect to add a couple |