autotel 7.7.1 → 7.9.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.
- package/dist/analysis.cjs +0 -1
- package/dist/{attribute-redacting-processor-CvBE0z1p.d.ts → attribute-redacting-processor-rkV_WL-k.d.ts} +2 -2
- package/dist/attribute-redacting-processor.cjs +1 -1
- package/dist/attribute-redacting-processor.d.ts +1 -1
- package/dist/{attributes-De9Fx0b4.js → attributes-CuGx6cOI.js} +21 -11
- package/dist/{attributes-DkptT2Ck.cjs → attributes-Ii3jDPsW.cjs} +23 -13
- package/dist/attributes.cjs +1 -1
- package/dist/attributes.d.ts +1 -1
- package/dist/attributes.js +1 -1
- package/dist/auto.cjs +2 -2
- package/dist/auto.js +1 -1
- package/dist/business-baggage.cjs +1 -1
- package/dist/{canonical-log-line-processor-Bvgb1lE4.cjs → canonical-log-line-processor-BU03jJeA.cjs} +1 -1
- package/dist/{canonical-log-line-processor-Yq4cXcD5.d.ts → canonical-log-line-processor-Bwrt_L4c.d.ts} +1 -1
- package/dist/{correlated-events-9RRdfyWR.cjs → correlated-events-DE_4A3oD.cjs} +1 -1
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.js +1 -1
- package/dist/db.cjs +1 -1
- package/dist/decorators.cjs +2 -2
- package/dist/decorators.d.cts +1 -1
- package/dist/decorators.d.ts +1 -1
- package/dist/decorators.js +1 -1
- package/dist/diagnostics.cjs +3 -3
- package/dist/diagnostics.js +1 -1
- package/dist/drain-pipeline.cjs +0 -1
- package/dist/enrichers.cjs +0 -1
- package/dist/event-testing.cjs +0 -1
- package/dist/event.cjs +1 -1
- package/dist/event.js +1 -1
- package/dist/evidence.cjs +0 -1
- package/dist/exception-fingerprint.cjs +1 -1
- package/dist/{filtering-span-processor-BpDagWNa.d.ts → filtering-span-processor-vkewzbqB.d.ts} +2 -2
- package/dist/filtering-span-processor.cjs +0 -1
- package/dist/filtering-span-processor.d.ts +1 -1
- package/dist/{functional-S9IJNlBn.js → functional-6QPJDqUW.js} +27 -29
- package/dist/{functional-C4mjgtJb.d.cts → functional-DPZTpGh6.d.cts} +2 -2
- package/dist/{functional-UIJ0CaTV.cjs → functional-DxHvvWc_.cjs} +19 -21
- package/dist/{functional-DN_ztd9C.d.ts → functional-SeRUabkE.d.ts} +2 -2
- package/dist/functional.cjs +1 -1
- package/dist/functional.d.cts +1 -1
- package/dist/functional.d.ts +1 -1
- package/dist/functional.js +1 -1
- package/dist/http.cjs +2 -2
- package/dist/http.js +1 -1
- package/dist/{index-o_6YjZhV.d.ts → index-B9aRLp6c.d.ts} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3 -3
- package/dist/{init-Dyq6WtsO.js → init-C-qfxo_u.js} +262 -36
- package/dist/{init-WwjD-kQu.d.cts → init-COfMwKbc.d.cts} +38 -10
- package/dist/{init-CKSMbJUG.d.ts → init-CnoRlJqS.d.ts} +43 -15
- package/dist/{init-BYXDCfRL.cjs → init-W_klPrYk.cjs} +277 -39
- package/dist/instrumentation.cjs +9 -8
- package/dist/instrumentation.js +8 -7
- package/dist/{logger-CSdZkxbh.cjs → logger-DLjHQAus.cjs} +1 -1
- package/dist/logger.cjs +1 -1
- package/dist/messaging-adapters.cjs +1 -1
- package/dist/messaging-testing.cjs +0 -1
- package/dist/messaging.cjs +8 -7
- package/dist/messaging.js +5 -4
- package/dist/metric-testing.cjs +0 -1
- package/dist/{node-require-B_IVapV3.cjs → node-require-BPsB09eC.cjs} +2 -2
- package/dist/parse-error.cjs +1 -1
- package/dist/{policy-C4QcZnqv.d.ts → policy-DNw_0qUq.d.ts} +1 -1
- package/dist/policy.cjs +0 -0
- package/dist/policy.d.ts +1 -1
- package/dist/processors.cjs +1 -1
- package/dist/processors.d.ts +1 -1
- package/dist/register.cjs +1 -1
- package/dist/{registry-DIoklBz5.cjs → registry-B3ZJmUtU.cjs} +0 -1
- package/dist/{rolldown-runtime-C_NdSu1c.cjs → rolldown-runtime-C24Yb2bl.cjs} +1 -2
- package/dist/{sampling-DBng4Foa.d.ts → sampling-CZi7OM9u.d.ts} +13 -13
- package/dist/{sampling-Er217Mge.d.cts → sampling-DENUjT_8.d.cts} +13 -13
- package/dist/sampling.cjs +1 -1
- package/dist/sampling.d.cts +1 -1
- package/dist/sampling.d.ts +1 -1
- package/dist/sampling.js +1 -1
- package/dist/security-schema.cjs +0 -1
- package/dist/semantic-conventions.cjs +1 -1
- package/dist/semantic-helpers.cjs +3 -3
- package/dist/semantic-helpers.js +1 -1
- package/dist/{span-name-normalizer-CN1-8C76.d.ts → span-name-normalizer-DHcg1bSP.d.ts} +2 -2
- package/dist/span-name-normalizer.cjs +0 -1
- package/dist/span-name-normalizer.d.ts +1 -1
- package/dist/{stable-hash-C9F6xjzx.cjs → stable-hash-sLi1o4jj.cjs} +2 -2
- package/dist/{structured-error-BAXhglRE.cjs → structured-error-DynjWTTu.cjs} +1 -1
- package/dist/tail-sampling-processor.cjs +1 -1
- package/dist/tail-sampling-processor.d.ts +2 -2
- package/dist/tail-sampling-processor.js +1 -1
- package/dist/test-span-collector.cjs +1 -1
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/{trace-factory-validation-Dc8epn87.cjs → trace-factory-validation-CHU1WcjK.cjs} +0 -1
- package/dist/trace-helpers.cjs +2 -2
- package/dist/tracer-provider.cjs +1 -1
- package/dist/validate.cjs +3 -3
- package/dist/validation-attributes.cjs +0 -1
- package/dist/{values-tm4bi0FF.cjs → values-AxGpgYBA.cjs} +0 -1
- package/dist/webhook.cjs +16 -13
- package/dist/webhook.js +14 -11
- package/dist/workflow-distributed.cjs +4 -6
- package/dist/workflow-distributed.js +2 -4
- package/dist/workflow.cjs +7 -6
- package/dist/workflow.js +3 -2
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.d.cts +2 -2
- package/dist/yaml-config.d.ts +2 -2
- package/dist/yaml-config.js +1 -1
- package/package.json +2 -1
package/dist/analysis.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadableSpan, Span, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
2
1
|
import { AttributeValue, Context } from "@opentelemetry/api";
|
|
2
|
+
import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
3
3
|
//#region src/attribute-redacting-processor.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Custom redactor function type
|
|
@@ -199,7 +199,7 @@ declare class AttributeRedactingProcessor implements SpanProcessor {
|
|
|
199
199
|
/**
|
|
200
200
|
* Pass through onStart unchanged - attributes aren't finalized yet
|
|
201
201
|
*/
|
|
202
|
-
onStart(span: Span, parentContext: Context): void;
|
|
202
|
+
onStart(span: Span$1, parentContext: Context): void;
|
|
203
203
|
/**
|
|
204
204
|
* Redact attributes and forward to wrapped processor
|
|
205
205
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AttributeRedactorPreset, c as REDACTOR_PATTERNS, d as builtinPatterns, f as createAttributeRedactor, i as AttributeRedactorFn, l as REDACTOR_PRESETS, m as normalizeAttributeRedactorConfig, n as AttributeRedactingProcessorOptions, o as BuiltinPatternName, p as createRedactedSpan, r as AttributeRedactorConfig, s as MaskFn, t as AttributeRedactingProcessor, u as ValuePatternConfig } from "./attribute-redacting-processor-
|
|
1
|
+
import { a as AttributeRedactorPreset, c as REDACTOR_PATTERNS, d as builtinPatterns, f as createAttributeRedactor, i as AttributeRedactorFn, l as REDACTOR_PRESETS, m as normalizeAttributeRedactorConfig, n as AttributeRedactingProcessorOptions, o as BuiltinPatternName, p as createRedactedSpan, r as AttributeRedactorConfig, s as MaskFn, t as AttributeRedactingProcessor, u as ValuePatternConfig } from "./attribute-redacting-processor-rkV_WL-k.js";
|
|
2
2
|
export { AttributeRedactingProcessor, AttributeRedactingProcessorOptions, AttributeRedactorConfig, AttributeRedactorFn, AttributeRedactorPreset, BuiltinPatternName, MaskFn, REDACTOR_PATTERNS, REDACTOR_PRESETS, ValuePatternConfig, builtinPatterns, createAttributeRedactor, createRedactedSpan, normalizeAttributeRedactorConfig };
|
|
@@ -447,8 +447,10 @@ function checkDeprecatedAttribute(key, policy = {}) {
|
|
|
447
447
|
const { warnDeprecated = true } = guardrails;
|
|
448
448
|
if (!warnDeprecated) return null;
|
|
449
449
|
const replacement = DEPRECATED_ATTRIBUTES.get(key) ?? null;
|
|
450
|
-
if (DEPRECATED_ATTRIBUTES.has(key))
|
|
451
|
-
|
|
450
|
+
if (DEPRECATED_ATTRIBUTES.has(key)) {
|
|
451
|
+
if (replacement === null) console.warn(`[autotel/attributes] Attribute "${key}" is deprecated and has no replacement. Remove or find a replacement in OpenTelemetry semantic conventions.`);
|
|
452
|
+
else console.warn(`[autotel/attributes] Attribute "${key}" is deprecated. Use "${replacement}" instead.`);
|
|
453
|
+
}
|
|
452
454
|
if (deprecatedWarnings[key]) console.warn(`[autotel/attributes] ${deprecatedWarnings[key]}`);
|
|
453
455
|
return replacement;
|
|
454
456
|
}
|
|
@@ -496,13 +498,16 @@ function safeSetAttributes(span, attrs, policy) {
|
|
|
496
498
|
//#endregion
|
|
497
499
|
//#region src/attributes/attachers.ts
|
|
498
500
|
function setUser(spanOrContext, data, guardrails) {
|
|
499
|
-
|
|
501
|
+
const attributes = attrs.user.data(data);
|
|
502
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
500
503
|
}
|
|
501
504
|
function setSession(spanOrContext, data, guardrails) {
|
|
502
|
-
|
|
505
|
+
const attributes = attrs.session.data(data);
|
|
506
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
503
507
|
}
|
|
504
508
|
function setDevice(spanOrContext, data, guardrails) {
|
|
505
|
-
|
|
509
|
+
const attributes = attrs.device.data(data);
|
|
510
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
506
511
|
}
|
|
507
512
|
function httpServer(spanOrContext, data, guardrails) {
|
|
508
513
|
const attributes = attrs.http.server(data);
|
|
@@ -510,10 +515,12 @@ function httpServer(spanOrContext, data, guardrails) {
|
|
|
510
515
|
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
511
516
|
}
|
|
512
517
|
function httpClient(spanOrContext, data, guardrails) {
|
|
513
|
-
|
|
518
|
+
const attributes = attrs.http.client(data);
|
|
519
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
514
520
|
}
|
|
515
521
|
function dbClient(spanOrContext, data, guardrails) {
|
|
516
|
-
|
|
522
|
+
const attributes = attrs.db.client.data(data);
|
|
523
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
517
524
|
}
|
|
518
525
|
/**
|
|
519
526
|
* Merge service attributes into a Resource and return a new Resource.
|
|
@@ -550,16 +557,19 @@ function identify(spanOrContext, data, guardrails) {
|
|
|
550
557
|
function request(spanOrContext, data, guardrails) {
|
|
551
558
|
const httpAttrs = attrs.http.server(data);
|
|
552
559
|
const networkAttrs = attrs.network.peerAddress(data.clientIp || "");
|
|
553
|
-
|
|
560
|
+
const merged = {
|
|
554
561
|
...httpAttrs,
|
|
555
562
|
...networkAttrs
|
|
556
|
-
}
|
|
563
|
+
};
|
|
564
|
+
safeSetAttributes(spanOrContext, merged, guardrails);
|
|
557
565
|
}
|
|
558
566
|
function setError(spanOrContext, data, guardrails) {
|
|
559
|
-
|
|
567
|
+
const attributes = attrs.error.data(data);
|
|
568
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
560
569
|
}
|
|
561
570
|
function setException(spanOrContext, data, guardrails) {
|
|
562
|
-
|
|
571
|
+
const attributes = attrs.exception.data(data);
|
|
572
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
563
573
|
}
|
|
564
574
|
|
|
565
575
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_values = require('./values-
|
|
1
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
2
2
|
const require_attribute_redacting_processor = require('./attribute-redacting-processor.cjs');
|
|
3
|
-
const require_registry = require('./registry-
|
|
3
|
+
const require_registry = require('./registry-B3ZJmUtU.cjs');
|
|
4
4
|
let _opentelemetry_resources = require("@opentelemetry/resources");
|
|
5
5
|
|
|
6
6
|
//#region src/attributes/builders.ts
|
|
@@ -447,8 +447,10 @@ function checkDeprecatedAttribute(key, policy = {}) {
|
|
|
447
447
|
const { warnDeprecated = true } = guardrails;
|
|
448
448
|
if (!warnDeprecated) return null;
|
|
449
449
|
const replacement = DEPRECATED_ATTRIBUTES.get(key) ?? null;
|
|
450
|
-
if (DEPRECATED_ATTRIBUTES.has(key))
|
|
451
|
-
|
|
450
|
+
if (DEPRECATED_ATTRIBUTES.has(key)) {
|
|
451
|
+
if (replacement === null) console.warn(`[autotel/attributes] Attribute "${key}" is deprecated and has no replacement. Remove or find a replacement in OpenTelemetry semantic conventions.`);
|
|
452
|
+
else console.warn(`[autotel/attributes] Attribute "${key}" is deprecated. Use "${replacement}" instead.`);
|
|
453
|
+
}
|
|
452
454
|
if (deprecatedWarnings[key]) console.warn(`[autotel/attributes] ${deprecatedWarnings[key]}`);
|
|
453
455
|
return replacement;
|
|
454
456
|
}
|
|
@@ -496,13 +498,16 @@ function safeSetAttributes(span, attrs, policy) {
|
|
|
496
498
|
//#endregion
|
|
497
499
|
//#region src/attributes/attachers.ts
|
|
498
500
|
function setUser(spanOrContext, data, guardrails) {
|
|
499
|
-
|
|
501
|
+
const attributes = attrs.user.data(data);
|
|
502
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
500
503
|
}
|
|
501
504
|
function setSession(spanOrContext, data, guardrails) {
|
|
502
|
-
|
|
505
|
+
const attributes = attrs.session.data(data);
|
|
506
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
503
507
|
}
|
|
504
508
|
function setDevice(spanOrContext, data, guardrails) {
|
|
505
|
-
|
|
509
|
+
const attributes = attrs.device.data(data);
|
|
510
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
506
511
|
}
|
|
507
512
|
function httpServer(spanOrContext, data, guardrails) {
|
|
508
513
|
const attributes = attrs.http.server(data);
|
|
@@ -510,10 +515,12 @@ function httpServer(spanOrContext, data, guardrails) {
|
|
|
510
515
|
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
511
516
|
}
|
|
512
517
|
function httpClient(spanOrContext, data, guardrails) {
|
|
513
|
-
|
|
518
|
+
const attributes = attrs.http.client(data);
|
|
519
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
514
520
|
}
|
|
515
521
|
function dbClient(spanOrContext, data, guardrails) {
|
|
516
|
-
|
|
522
|
+
const attributes = attrs.db.client.data(data);
|
|
523
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
517
524
|
}
|
|
518
525
|
/**
|
|
519
526
|
* Merge service attributes into a Resource and return a new Resource.
|
|
@@ -550,16 +557,19 @@ function identify(spanOrContext, data, guardrails) {
|
|
|
550
557
|
function request(spanOrContext, data, guardrails) {
|
|
551
558
|
const httpAttrs = attrs.http.server(data);
|
|
552
559
|
const networkAttrs = attrs.network.peerAddress(data.clientIp || "");
|
|
553
|
-
|
|
560
|
+
const merged = {
|
|
554
561
|
...httpAttrs,
|
|
555
562
|
...networkAttrs
|
|
556
|
-
}
|
|
563
|
+
};
|
|
564
|
+
safeSetAttributes(spanOrContext, merged, guardrails);
|
|
557
565
|
}
|
|
558
566
|
function setError(spanOrContext, data, guardrails) {
|
|
559
|
-
|
|
567
|
+
const attributes = attrs.error.data(data);
|
|
568
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
560
569
|
}
|
|
561
570
|
function setException(spanOrContext, data, guardrails) {
|
|
562
|
-
|
|
571
|
+
const attributes = attrs.exception.data(data);
|
|
572
|
+
safeSetAttributes(spanOrContext, attributes, guardrails);
|
|
563
573
|
}
|
|
564
574
|
|
|
565
575
|
//#endregion
|
package/dist/attributes.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_attributes = require('./attributes-
|
|
2
|
+
const require_attributes = require('./attributes-Ii3jDPsW.cjs');
|
|
3
3
|
|
|
4
4
|
exports.attrs = require_attributes.attrs;
|
|
5
5
|
exports.autoRedactPII = require_attributes.autoRedactPII;
|
package/dist/attributes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ExceptionAttrs, B as PeerAttrs, C as CloudAttrs, D as DeploymentAttrs, E as DBAttrs, F as HTTPServerAttrs, G as SessionAttrs, H as RPCAttrs, I as K8sAttrs, J as URLAttrs, K as TLSAttrs, L as MessagingAttrs, M as FeatureFlagAttrs, N as GraphQLAttrs, O as DeviceAttrs, P as HTTPClientAttrs, R as NetworkAttrs, S as ClientAttrs, T as ContainerAttrs, U as ServerAddressAttrs, V as ProcessAttrs, W as ServiceAttrs, Y as UserAttrs, _ as autoRedactPII, a as httpClient, b as validateAttribute, c as mergeServiceResource, d as setError, f as setException, g as AttributePolicy, h as AttributeGuardrails, i as dbClient, j as FaaSAttrs, k as ErrorAttrs, l as request, m as setUser, n as safeSetAttributes, o as httpServer, p as setSession, q as ThreadAttrs, r as transaction, s as identify, t as mergeAttrs, u as setDevice, v as checkDeprecatedAttribute, w as CodeAttrs, x as attrs, y as defaultGuardrails, z as OTelAttrs } from "./index-
|
|
1
|
+
import { A as ExceptionAttrs, B as PeerAttrs, C as CloudAttrs, D as DeploymentAttrs, E as DBAttrs, F as HTTPServerAttrs, G as SessionAttrs, H as RPCAttrs, I as K8sAttrs, J as URLAttrs, K as TLSAttrs, L as MessagingAttrs, M as FeatureFlagAttrs, N as GraphQLAttrs, O as DeviceAttrs, P as HTTPClientAttrs, R as NetworkAttrs, S as ClientAttrs, T as ContainerAttrs, U as ServerAddressAttrs, V as ProcessAttrs, W as ServiceAttrs, Y as UserAttrs, _ as autoRedactPII, a as httpClient, b as validateAttribute, c as mergeServiceResource, d as setError, f as setException, g as AttributePolicy, h as AttributeGuardrails, i as dbClient, j as FaaSAttrs, k as ErrorAttrs, l as request, m as setUser, n as safeSetAttributes, o as httpServer, p as setSession, q as ThreadAttrs, r as transaction, s as identify, t as mergeAttrs, u as setDevice, v as checkDeprecatedAttribute, w as CodeAttrs, x as attrs, y as defaultGuardrails, z as OTelAttrs } from "./index-B9aRLp6c.js";
|
|
2
2
|
export { type AttributeGuardrails, type AttributePolicy, type ClientAttrs, type CloudAttrs, type CodeAttrs, type ContainerAttrs, type DBAttrs, type DeploymentAttrs, type DeviceAttrs, type ErrorAttrs, type ExceptionAttrs, type FaaSAttrs, type FeatureFlagAttrs, type GraphQLAttrs, type HTTPClientAttrs, type HTTPServerAttrs, type K8sAttrs, type MessagingAttrs, type NetworkAttrs, type OTelAttrs, type PeerAttrs, type ProcessAttrs, type RPCAttrs, type ServerAddressAttrs, type ServiceAttrs, type SessionAttrs, type TLSAttrs, type ThreadAttrs, type URLAttrs, type UserAttrs, attrs, autoRedactPII, checkDeprecatedAttribute, dbClient, defaultGuardrails, httpClient, httpServer, identify, mergeAttrs, mergeServiceResource, request, safeSetAttributes, setDevice, setError, setException, setSession, setUser, transaction, validateAttribute };
|
package/dist/attributes.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as defaultGuardrails, a as identify, c as setDevice, d as setSession, f as setUser, g as checkDeprecatedAttribute, h as autoRedactPII, i as httpServer, l as setError, m as safeSetAttributes, n as dbClient, o as mergeServiceResource, p as mergeAttrs, r as httpClient, s as request, t as transaction, u as setException, v as validateAttribute, y as attrs } from "./attributes-
|
|
1
|
+
import { _ as defaultGuardrails, a as identify, c as setDevice, d as setSession, f as setUser, g as checkDeprecatedAttribute, h as autoRedactPII, i as httpServer, l as setError, m as safeSetAttributes, n as dbClient, o as mergeServiceResource, p as mergeAttrs, r as httpClient, s as request, t as transaction, u as setException, v as validateAttribute, y as attrs } from "./attributes-CuGx6cOI.js";
|
|
2
2
|
|
|
3
3
|
export { attrs, autoRedactPII, checkDeprecatedAttribute, dbClient, defaultGuardrails, httpClient, httpServer, identify, mergeAttrs, mergeServiceResource, request, safeSetAttributes, setDevice, setError, setException, setSession, setUser, transaction, validateAttribute };
|
package/dist/auto.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('./rolldown-runtime-
|
|
2
|
-
const require_init = require('./init-
|
|
1
|
+
const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
|
|
2
|
+
const require_init = require('./init-W_klPrYk.cjs');
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
node_module = require_rolldown_runtime.__toESM(node_module, 1);
|
|
5
5
|
let import_in_the_middle = require("import-in-the-middle");
|
package/dist/auto.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
4
4
|
|
|
5
5
|
//#region src/business-baggage.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
2
2
|
import { s as Logger } from "./logger-S1Fgl0g3.js";
|
|
3
|
-
import { ReadableSpan, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
4
3
|
import { AttributeValue } from "@opentelemetry/api";
|
|
4
|
+
import { ReadableSpan, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
5
5
|
//#region src/processors/canonical-log-line-processor.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Function to redact sensitive attribute values
|
package/dist/correlation-id.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_init = require('./init-
|
|
2
|
+
const require_init = require('./init-W_klPrYk.cjs');
|
|
3
3
|
|
|
4
4
|
exports.CORRELATION_ID_BAGGAGE_KEY = require_init.CORRELATION_ID_BAGGAGE_KEY;
|
|
5
5
|
exports.generateCorrelationId = require_init.generateCorrelationId;
|
package/dist/correlation-id.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as generateCorrelationId, Q as CORRELATION_ID_BAGGAGE_KEY, at as setCorrelationIdInBaggage, et as getCorrelationId, it as setCorrelationId, nt as getOrCreateCorrelationId, rt as runWithCorrelationId, tt as getCorrelationStorage } from "./init-C-qfxo_u.js";
|
|
2
2
|
|
|
3
3
|
export { CORRELATION_ID_BAGGAGE_KEY, generateCorrelationId, getCorrelationId, getCorrelationStorage, getOrCreateCorrelationId, runWithCorrelationId, setCorrelationId, setCorrelationIdInBaggage };
|
package/dist/db.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
const require_config = require('./config.cjs');
|
|
4
4
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
5
5
|
|
package/dist/decorators.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_init = require('./init-W_klPrYk.cjs');
|
|
3
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
4
|
const require_config = require('./config.cjs');
|
|
4
|
-
const require_init = require('./init-BYXDCfRL.cjs');
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
6
6
|
|
|
7
7
|
//#region src/decorators.ts
|
package/dist/decorators.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
|
|
2
|
-
import { h as TracingOptions } from "./functional-
|
|
2
|
+
import { h as TracingOptions } from "./functional-DPZTpGh6.cjs";
|
|
3
3
|
//#region src/decorators.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Options for @Trace method decorator
|
package/dist/decorators.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TraceContext } from "./trace-context-CqCblIQE.js";
|
|
2
|
-
import { h as TracingOptions } from "./functional-
|
|
2
|
+
import { h as TracingOptions } from "./functional-SeRUabkE.js";
|
|
3
3
|
//#region src/decorators.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Options for @Trace method decorator
|
package/dist/decorators.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { G as createTraceContext } from "./init-C-qfxo_u.js";
|
|
1
2
|
import { y as splitNameOrOptions } from "./values-xBtdXtjA.js";
|
|
2
3
|
import { getConfig } from "./config.js";
|
|
3
|
-
import { U as createTraceContext } from "./init-Dyq6WtsO.js";
|
|
4
4
|
import { SpanStatusCode } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/decorators.ts
|
package/dist/diagnostics.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
3
|
-
const require_node_require = require('./node-require-
|
|
4
|
-
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
|
+
const require_node_require = require('./node-require-BPsB09eC.cjs');
|
|
5
4
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
6
5
|
let _opentelemetry_api_logs = require("@opentelemetry/api-logs");
|
|
6
|
+
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
7
7
|
|
|
8
8
|
//#region src/diagnostics/channel.ts
|
|
9
9
|
/**
|
package/dist/diagnostics.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { l as asString } from "./values-xBtdXtjA.js";
|
|
2
2
|
import { n as safeRequire } from "./node-require-CkK_xzL-.js";
|
|
3
|
-
import { ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_SCHEME, ATTR_USER_AGENT_ORIGINAL } from "@opentelemetry/semantic-conventions";
|
|
4
3
|
import { SpanKind, SpanStatusCode, context, defaultTextMapGetter, defaultTextMapSetter, propagation, trace } from "@opentelemetry/api";
|
|
5
4
|
import { SeverityNumber, logs } from "@opentelemetry/api-logs";
|
|
5
|
+
import { ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, ATTR_URL_PATH, ATTR_URL_SCHEME, ATTR_USER_AGENT_ORIGINAL } from "@opentelemetry/semantic-conventions";
|
|
6
6
|
|
|
7
7
|
//#region src/diagnostics/channel.ts
|
|
8
8
|
/**
|
package/dist/drain-pipeline.cjs
CHANGED
package/dist/enrichers.cjs
CHANGED
package/dist/event-testing.cjs
CHANGED
package/dist/event.cjs
CHANGED
package/dist/event.js
CHANGED
package/dist/evidence.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/exception-fingerprint.ts
|
|
5
5
|
/** Attribute the fingerprint is written to. */
|
package/dist/{filtering-span-processor-BpDagWNa.d.ts → filtering-span-processor-vkewzbqB.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReadableSpan, Span, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
2
1
|
import { Context } from "@opentelemetry/api";
|
|
2
|
+
import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
3
3
|
//#region src/filtering-span-processor.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Predicate function for filtering spans
|
|
@@ -44,7 +44,7 @@ declare class FilteringSpanProcessor implements SpanProcessor {
|
|
|
44
44
|
/**
|
|
45
45
|
* Pass through onStart - we need spans to start so child spans work
|
|
46
46
|
*/
|
|
47
|
-
onStart(span: Span, parentContext: Context): void;
|
|
47
|
+
onStart(span: Span$1, parentContext: Context): void;
|
|
48
48
|
/**
|
|
49
49
|
* Apply filter predicate on span end
|
|
50
50
|
* If filter returns false, span is dropped (not forwarded)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-
|
|
1
|
+
import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-vkewzbqB.js";
|
|
2
2
|
export { FilteringSpanProcessor, FilteringSpanProcessorOptions, SpanFilterPredicate };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as AUTOTEL_SAMPLING_TAIL_KEEP, E as AUTOTEL_SAMPLING_TAIL_EVALUATED, G as createTraceContext, J as getContextStorage, R as debugCaptureRequested, T as AUTOTEL_SAMPLING_RATE, V as isForceKept, X as getEventQueue, Y as hasExplicitSpanStatus, b as getRequestSpanIn, h as runInOperationContext, i as getSdk, k as AlwaysSampler, n as getConfiguredSampler, q as getActiveContextWithBaggage, t as getConfig, x as rememberRequestAttributes } from "./init-C-qfxo_u.js";
|
|
2
|
+
import { l as asString, m as isDevelopment } from "./values-xBtdXtjA.js";
|
|
2
3
|
import { getForceFlushableProvider } from "./tracer-provider.js";
|
|
3
|
-
import { getConfig } from "./config.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getConfig as getConfig$1 } from "./config.js";
|
|
5
|
+
import { a as flattenToAttributes } from "./structured-error-Y9y-1Pae.js";
|
|
5
6
|
import { evidenceAttribute } from "./evidence.js";
|
|
6
7
|
import { setSpanName } from "./trace-helpers.js";
|
|
7
|
-
import { SpanStatusCode, context,
|
|
8
|
+
import { SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
8
9
|
import * as nodeFs from "node:fs";
|
|
9
10
|
import * as nodeUrl from "node:url";
|
|
10
11
|
|
|
@@ -205,7 +206,7 @@ function getSpanName(options, fn, variableName) {
|
|
|
205
206
|
const fnName = variableName || inferFunctionName(fn) || "anonymous";
|
|
206
207
|
if (options.serviceName) return `${options.serviceName}.${fnName}`;
|
|
207
208
|
if (fnName !== "anonymous") return fnName;
|
|
208
|
-
const initConfig = getConfig
|
|
209
|
+
const initConfig = getConfig();
|
|
209
210
|
if (isDevelopment() && !unknownSpanNameWarningEmitted && initConfig?.logger?.warn) {
|
|
210
211
|
unknownSpanNameWarningEmitted = true;
|
|
211
212
|
initConfig.logger.warn({}, "[autotel] Span name resolved to \"unknown\". Use instrument({ key: \"operation.name\", fn }) for a reusable named wrapper.");
|
|
@@ -324,7 +325,7 @@ function finalizeThrownSpan(error, isError, finalizeContext) {
|
|
|
324
325
|
span.end();
|
|
325
326
|
}
|
|
326
327
|
function createRootTelemetryFlusher(options, isRootSpan) {
|
|
327
|
-
const initConfig = getConfig
|
|
328
|
+
const initConfig = getConfig();
|
|
328
329
|
const shouldFlush = options.flushOnRootSpanEnd ?? initConfig?.flushOnRootSpanEnd ?? true;
|
|
329
330
|
const shouldFlushSpans = initConfig?.forceFlushOnShutdown ?? false;
|
|
330
331
|
return async () => {
|
|
@@ -334,7 +335,7 @@ function createRootTelemetryFlusher(options, isRootSpan) {
|
|
|
334
335
|
if (queue && queue.size() > 0) await queue.flush();
|
|
335
336
|
if (shouldFlushSpans) await getForceFlushableProvider(getSdk())?.forceFlush();
|
|
336
337
|
} catch (error) {
|
|
337
|
-
getConfig
|
|
338
|
+
getConfig()?.logger?.error?.({ err: error instanceof Error ? error : void 0 }, `[autotel] Auto-flush failed${error instanceof Error ? "" : `: ${String(error)}`}`);
|
|
338
339
|
}
|
|
339
340
|
};
|
|
340
341
|
}
|
|
@@ -346,7 +347,7 @@ function runWithTraceContextStorage(fn) {
|
|
|
346
347
|
/** Used when neither the wrapper nor `init()` chose a sampler. */
|
|
347
348
|
const FALLBACK_SAMPLER = new AlwaysSampler();
|
|
348
349
|
function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
349
|
-
const { meter } = getConfig();
|
|
350
|
+
const { meter } = getConfig$1();
|
|
350
351
|
const resolveSampler = () => options.sampler ?? getConfiguredSampler() ?? FALLBACK_SAMPLER;
|
|
351
352
|
const spanName = getSpanName(options, fnFactory, variableName);
|
|
352
353
|
const callCounter = options.withMetrics ? meter.createCounter(`${spanName}.calls`, {
|
|
@@ -376,7 +377,7 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
376
377
|
const spanOptions = {};
|
|
377
378
|
if (options.startNewRoot) spanOptions.root = true;
|
|
378
379
|
if (options.spanKind !== void 0) spanOptions.kind = options.spanKind;
|
|
379
|
-
const { tracer } = getConfig();
|
|
380
|
+
const { tracer } = getConfig$1();
|
|
380
381
|
return tracer.startActiveSpan(spanName, spanOptions, getActiveContextWithBaggage(), (span) => runInOperationContext(spanName, () => runWithTraceContextStorage(() => {
|
|
381
382
|
let shouldKeepSpan = true;
|
|
382
383
|
setSpanName(span, spanName);
|
|
@@ -645,22 +646,6 @@ function createCtxProxy(resolve) {
|
|
|
645
646
|
}
|
|
646
647
|
const ctx = createCtxProxy(getCtxValue);
|
|
647
648
|
/**
|
|
648
|
-
* The key `@opentelemetry/core` publishes RPC metadata under. `createContextKey`
|
|
649
|
-
* is `Symbol.for`, so this reads exactly what `instrumentation-http` (and every
|
|
650
|
-
* framework instrumentation that renames the route) wrote, without taking a
|
|
651
|
-
* dependency on core.
|
|
652
|
-
*/
|
|
653
|
-
const RPC_METADATA_KEY = createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
654
|
-
/**
|
|
655
|
-
* The span the current request is being recorded on, or the active span when
|
|
656
|
-
* there is no request - a queue consumer or a cron job has none, and an
|
|
657
|
-
* attribute belongs somewhere real rather than nowhere.
|
|
658
|
-
*/
|
|
659
|
-
function getRequestSpan() {
|
|
660
|
-
const requestSpan = readProperty(context.active().getValue(RPC_METADATA_KEY), "span");
|
|
661
|
-
return isFunction(readProperty(requestSpan, "spanContext")) ? requestSpan : trace.getActiveSpan();
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
649
|
* The ambient {@link ctx}, aimed at the **request** span rather than at
|
|
665
650
|
* whatever span the calling code happens to be inside.
|
|
666
651
|
*
|
|
@@ -683,8 +668,21 @@ function getRequestSpan() {
|
|
|
683
668
|
* ```
|
|
684
669
|
*/
|
|
685
670
|
const requestCtx = createCtxProxy(() => {
|
|
686
|
-
const span =
|
|
687
|
-
|
|
671
|
+
const span = getRequestSpanIn() ?? trace.getActiveSpan();
|
|
672
|
+
if (!span) return null;
|
|
673
|
+
return {
|
|
674
|
+
...createTraceContext(span),
|
|
675
|
+
setAttribute: (key, value) => {
|
|
676
|
+
const attrs = flattenToAttributes({ [key]: value });
|
|
677
|
+
span.setAttributes(attrs);
|
|
678
|
+
rememberRequestAttributes(span, attrs);
|
|
679
|
+
},
|
|
680
|
+
setAttributes: (attrs) => {
|
|
681
|
+
const flattened = flattenToAttributes(attrs);
|
|
682
|
+
span.setAttributes(flattened);
|
|
683
|
+
rememberRequestAttributes(span, flattened);
|
|
684
|
+
}
|
|
685
|
+
};
|
|
688
686
|
});
|
|
689
687
|
function traceImpl(fnOrNameOrOptions, maybeFn) {
|
|
690
688
|
if (typeof fnOrNameOrOptions === "function") return wrapPlainWithTracing(fnOrNameOrOptions, {});
|
|
@@ -770,7 +768,7 @@ function instrument(options) {
|
|
|
770
768
|
}
|
|
771
769
|
function span(nameOrOptions, fn) {
|
|
772
770
|
const options = typeof nameOrOptions === "string" ? { name: nameOrOptions } : nameOrOptions;
|
|
773
|
-
const tracer = getConfig().tracer;
|
|
771
|
+
const tracer = getConfig$1().tracer;
|
|
774
772
|
const { name, attributes, spanKind } = options;
|
|
775
773
|
const executeSpan = (span) => {
|
|
776
774
|
return runInOperationContext(name, () => {
|
|
@@ -838,7 +836,7 @@ function span(nameOrOptions, fn) {
|
|
|
838
836
|
*/
|
|
839
837
|
async function withNewContext(options) {
|
|
840
838
|
const { fn } = options;
|
|
841
|
-
return getConfig().tracer.startActiveSpan("root", { root: true }, async (span) => {
|
|
839
|
+
return getConfig$1().tracer.startActiveSpan("root", { root: true }, async (span) => {
|
|
842
840
|
try {
|
|
843
841
|
const result = await fn();
|
|
844
842
|
span.setStatus({ code: SpanStatusCode.OK });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
|
|
2
|
-
import { m as Sampler } from "./sampling-
|
|
2
|
+
import { m as Sampler$1 } from "./sampling-DENUjT_8.cjs";
|
|
3
3
|
import { Attributes, Span, SpanKind } from "@opentelemetry/api";
|
|
4
4
|
//#region src/functional-wrapper.d.ts
|
|
5
5
|
type WrappedFunction<TArgs extends unknown[], TReturn> = (...args: TArgs) => TReturn | Promise<TReturn>;
|
|
@@ -28,7 +28,7 @@ interface TracingOptions<TArgs extends unknown[] = unknown[], TReturn = unknown>
|
|
|
28
28
|
* Sampling strategy.
|
|
29
29
|
* @default AlwaysSampler
|
|
30
30
|
*/
|
|
31
|
-
sampler?: Sampler;
|
|
31
|
+
sampler?: Sampler$1;
|
|
32
32
|
/**
|
|
33
33
|
* Enable call and duration metrics.
|
|
34
34
|
* @default false
|