autotel 3.0.0 → 3.0.4
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.
- package/README.md +21 -4
- package/dist/attribute-redacting-processor.cjs +8 -8
- package/dist/attribute-redacting-processor.d.cts +10 -1
- package/dist/attribute-redacting-processor.d.ts +10 -1
- package/dist/attribute-redacting-processor.js +1 -1
- package/dist/attributes.cjs +21 -21
- package/dist/attributes.js +2 -2
- package/dist/auto.cjs +3 -3
- package/dist/auto.js +2 -2
- package/dist/{chunk-IUDXKLS4.js → chunk-34X3TKHA.js} +3 -3
- package/dist/{chunk-IUDXKLS4.js.map → chunk-34X3TKHA.js.map} +1 -1
- package/dist/{chunk-3QMFLJHJ.js → chunk-4LF6FV2V.js} +3 -3
- package/dist/{chunk-3QMFLJHJ.js.map → chunk-4LF6FV2V.js.map} +1 -1
- package/dist/{chunk-L7JDUDJD.cjs → chunk-AAYCDHH6.cjs} +7 -7
- package/dist/{chunk-L7JDUDJD.cjs.map → chunk-AAYCDHH6.cjs.map} +1 -1
- package/dist/{chunk-DWOBIBLY.cjs → chunk-AY2SY3MO.cjs} +5 -5
- package/dist/{chunk-DWOBIBLY.cjs.map → chunk-AY2SY3MO.cjs.map} +1 -1
- package/dist/{chunk-563EL6O6.cjs → chunk-BPO2PQ3T.cjs} +12 -8
- package/dist/chunk-BPO2PQ3T.cjs.map +1 -0
- package/dist/{chunk-ZSABTI3C.cjs → chunk-DAZ7EGR4.cjs} +17 -17
- package/dist/{chunk-ZSABTI3C.cjs.map → chunk-DAZ7EGR4.cjs.map} +1 -1
- package/dist/{chunk-ER43K7ES.js → chunk-DDXIUZEG.js} +3 -3
- package/dist/{chunk-ER43K7ES.js.map → chunk-DDXIUZEG.js.map} +1 -1
- package/dist/{chunk-JKIMEPI2.cjs → chunk-DQ2SUROF.cjs} +4 -4
- package/dist/{chunk-JKIMEPI2.cjs.map → chunk-DQ2SUROF.cjs.map} +1 -1
- package/dist/{chunk-DAAJLUTO.js → chunk-F3TNRW2P.js} +6 -5
- package/dist/chunk-F3TNRW2P.js.map +1 -0
- package/dist/{chunk-7HNQYHK4.js → chunk-HBLWOI6P.js} +3 -3
- package/dist/{chunk-7HNQYHK4.js.map → chunk-HBLWOI6P.js.map} +1 -1
- package/dist/{chunk-TDNKIHKT.js → chunk-JVWJDHDB.js} +13 -4
- package/dist/chunk-JVWJDHDB.js.map +1 -0
- package/dist/{chunk-CJ4PD2TZ.cjs → chunk-KKGM42RQ.cjs} +13 -13
- package/dist/{chunk-CJ4PD2TZ.cjs.map → chunk-KKGM42RQ.cjs.map} +1 -1
- package/dist/{chunk-KHGA4OST.cjs → chunk-LMFPZHI4.cjs} +5 -5
- package/dist/{chunk-KHGA4OST.cjs.map → chunk-LMFPZHI4.cjs.map} +1 -1
- package/dist/{chunk-CMNGGTQL.cjs → chunk-NXLRY2CE.cjs} +13 -4
- package/dist/chunk-NXLRY2CE.cjs.map +1 -0
- package/dist/{chunk-4DAG3RFS.js → chunk-OM4OSBOP.js} +4 -4
- package/dist/{chunk-4DAG3RFS.js.map → chunk-OM4OSBOP.js.map} +1 -1
- package/dist/{chunk-MOK3E54E.cjs → chunk-WSGAHSZQ.cjs} +34 -33
- package/dist/chunk-WSGAHSZQ.cjs.map +1 -0
- package/dist/{chunk-QG3U5ONP.js → chunk-Z7VAOK5X.js} +3 -3
- package/dist/{chunk-QG3U5ONP.js.map → chunk-Z7VAOK5X.js.map} +1 -1
- package/dist/{chunk-W35FVJBC.js → chunk-ZDPIWKWD.js} +9 -5
- package/dist/chunk-ZDPIWKWD.js.map +1 -0
- package/dist/correlation-id.cjs +11 -11
- package/dist/correlation-id.js +3 -3
- package/dist/decorators.cjs +5 -5
- package/dist/decorators.js +4 -4
- package/dist/event.cjs +7 -7
- package/dist/event.js +4 -4
- package/dist/functional.cjs +11 -11
- package/dist/functional.d.cts +20 -17
- package/dist/functional.d.ts +20 -17
- package/dist/functional.js +4 -4
- package/dist/http.cjs +4 -4
- package/dist/http.js +3 -3
- package/dist/index.cjs +226 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -3
- package/dist/index.d.ts +67 -3
- package/dist/index.js +138 -15
- package/dist/index.js.map +1 -1
- package/dist/instrumentation.cjs +9 -9
- package/dist/instrumentation.js +2 -2
- package/dist/messaging.cjs +8 -8
- package/dist/messaging.js +5 -5
- package/dist/semantic-helpers.cjs +9 -9
- package/dist/semantic-helpers.js +5 -5
- package/dist/webhook.cjs +6 -6
- package/dist/webhook.js +4 -4
- package/dist/workflow-distributed.cjs +6 -6
- package/dist/workflow-distributed.js +4 -4
- package/dist/workflow.cjs +9 -9
- package/dist/workflow.js +5 -5
- package/package.json +43 -45
- package/skills/analyze-traces/SKILL.md +178 -0
- package/skills/autotel-core/SKILL.md +0 -7
- package/skills/autotel-events/SKILL.md +0 -6
- package/skills/autotel-frameworks/SKILL.md +0 -9
- package/skills/autotel-instrumentation/SKILL.md +0 -7
- package/skills/autotel-request-logging/SKILL.md +0 -8
- package/skills/autotel-structured-errors/SKILL.md +0 -7
- package/skills/build-audit-trails/SKILL.md +302 -0
- package/skills/debug-missing-spans/SKILL.md +248 -0
- package/skills/migrate-to-autotel/SKILL.md +268 -0
- package/skills/review-otel-patterns/SKILL.md +488 -0
- package/skills/review-otel-patterns/references/code-review.md +75 -0
- package/skills/review-otel-patterns/references/processor-pipeline.md +205 -0
- package/skills/review-otel-patterns/references/structured-errors.md +102 -0
- package/skills/review-otel-patterns/references/wide-spans.md +85 -0
- package/skills/tune-sampling/SKILL.md +210 -0
- package/src/attribute-redacting-processor.test.ts +6 -4
- package/src/attribute-redacting-processor.ts +11 -2
- package/src/drain-toolkit.test.ts +113 -0
- package/src/drain-toolkit.ts +129 -0
- package/src/enricher-toolkit.test.ts +67 -0
- package/src/enricher-toolkit.ts +79 -0
- package/src/functional.test.ts +18 -0
- package/src/functional.ts +32 -20
- package/src/index.ts +19 -0
- package/src/redact-values.test.ts +24 -10
- package/src/redact-values.ts +9 -2
- package/src/request-logger.test.ts +91 -0
- package/src/request-logger.ts +36 -2
- package/src/structured-error.test.ts +4 -1
- package/bin/intent.js +0 -6
- package/dist/chunk-563EL6O6.cjs.map +0 -1
- package/dist/chunk-CMNGGTQL.cjs.map +0 -1
- package/dist/chunk-DAAJLUTO.js.map +0 -1
- package/dist/chunk-MOK3E54E.cjs.map +0 -1
- package/dist/chunk-TDNKIHKT.js.map +0 -1
- package/dist/chunk-W35FVJBC.js.map +0 -1
- package/src/package-manifest.test.ts +0 -24
package/dist/functional.d.ts
CHANGED
|
@@ -335,29 +335,32 @@ interface SpanOptions {
|
|
|
335
335
|
* Useful for adding tracing to specific code blocks without wrapping
|
|
336
336
|
* the entire function. Supports both synchronous and asynchronous functions.
|
|
337
337
|
*
|
|
338
|
+
* Mirrors `trace()`: pass a span name as the first argument for the common
|
|
339
|
+
* case, or full `SpanOptions` when you need to attach attributes.
|
|
340
|
+
*
|
|
338
341
|
* @example
|
|
339
342
|
* ```typescript
|
|
340
|
-
* //
|
|
341
|
-
* async
|
|
342
|
-
* await
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
343
|
+
* // Name shorthand
|
|
344
|
+
* await span('payment.charge', async (span) => {
|
|
345
|
+
* await chargeCustomer(order);
|
|
346
|
+
* })
|
|
347
|
+
*
|
|
348
|
+
* // Full options when attributes are needed
|
|
349
|
+
* await span(
|
|
350
|
+
* { name: 'payment.charge', attributes: { amount: order.total } },
|
|
351
|
+
* async (span) => {
|
|
346
352
|
* await chargeCustomer(order);
|
|
347
|
-
* }
|
|
348
|
-
*
|
|
353
|
+
* },
|
|
354
|
+
* )
|
|
349
355
|
*
|
|
350
|
-
* // Sync
|
|
351
|
-
*
|
|
352
|
-
* return
|
|
353
|
-
*
|
|
354
|
-
* attributes: { itemCount: items.length }
|
|
355
|
-
* }, (span) => {
|
|
356
|
-
* return items.reduce((sum, item) => sum + item.price, 0);
|
|
357
|
-
* })
|
|
358
|
-
* }
|
|
356
|
+
* // Sync
|
|
357
|
+
* const total = span('calculateTotal', (span) => {
|
|
358
|
+
* return items.reduce((sum, item) => sum + item.price, 0);
|
|
359
|
+
* })
|
|
359
360
|
* ```
|
|
360
361
|
*/
|
|
362
|
+
declare function span<T = unknown>(name: string, fn: (span: Span) => T): T;
|
|
363
|
+
declare function span<T = unknown>(name: string, fn: (span: Span) => Promise<T>): Promise<T>;
|
|
361
364
|
declare function span<T = unknown>(options: SpanOptions, fn: (span: Span) => T): T;
|
|
362
365
|
declare function span<T = unknown>(options: SpanOptions, fn: (span: Span) => Promise<T>): Promise<T>;
|
|
363
366
|
/**
|
package/dist/functional.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { ctx, instrument, span, trace, withBaggage, withNewContext, withTracing } from './chunk-
|
|
1
|
+
export { ctx, instrument, span, trace, withBaggage, withNewContext, withTracing } from './chunk-F3TNRW2P.js';
|
|
2
2
|
import './chunk-DSMSIVTG.js';
|
|
3
3
|
import './chunk-SEO6NAQT.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-Z7VAOK5X.js';
|
|
5
|
+
import './chunk-ZDPIWKWD.js';
|
|
6
6
|
import './chunk-3SDILILG.js';
|
|
7
7
|
import './chunk-A4E5AQFK.js';
|
|
8
8
|
import './chunk-WGWSHJ2N.js';
|
|
9
9
|
import './chunk-GYR5K654.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-JVWJDHDB.js';
|
|
11
11
|
import './chunk-6UQRVUN3.js';
|
|
12
12
|
import './chunk-3QXBFGKP.js';
|
|
13
13
|
import './chunk-33WTKH7X.js';
|
package/dist/http.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkKKGM42RQ_cjs = require('./chunk-KKGM42RQ.cjs');
|
|
4
|
+
require('./chunk-BPO2PQ3T.cjs');
|
|
5
5
|
require('./chunk-OC6X2VIN.cjs');
|
|
6
6
|
require('./chunk-CEAQK2QY.cjs');
|
|
7
7
|
require('./chunk-ZNMBW67B.cjs');
|
|
8
8
|
require('./chunk-IOYFAFHJ.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-NXLRY2CE.cjs');
|
|
10
10
|
require('./chunk-CU6IDACR.cjs');
|
|
11
11
|
require('./chunk-6S5RUKU3.cjs');
|
|
12
12
|
require('./chunk-YS6C2YJE.cjs');
|
|
@@ -177,7 +177,7 @@ function extractStatusCode(result) {
|
|
|
177
177
|
return void 0;
|
|
178
178
|
}
|
|
179
179
|
function injectTraceContext(headers = {}) {
|
|
180
|
-
const currentContext =
|
|
180
|
+
const currentContext = chunkKKGM42RQ_cjs.getActiveContextWithBaggage();
|
|
181
181
|
api.propagation.inject(currentContext, headers);
|
|
182
182
|
return headers;
|
|
183
183
|
}
|
package/dist/http.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getActiveContextWithBaggage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { getActiveContextWithBaggage } from './chunk-Z7VAOK5X.js';
|
|
2
|
+
import './chunk-ZDPIWKWD.js';
|
|
3
3
|
import './chunk-3SDILILG.js';
|
|
4
4
|
import './chunk-A4E5AQFK.js';
|
|
5
5
|
import './chunk-WGWSHJ2N.js';
|
|
6
6
|
import './chunk-GYR5K654.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-JVWJDHDB.js';
|
|
8
8
|
import './chunk-6UQRVUN3.js';
|
|
9
9
|
import './chunk-3QXBFGKP.js';
|
|
10
10
|
import './chunk-33WTKH7X.js';
|