autotel 7.9.0 → 7.10.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 (158) hide show
  1. package/README.md +14 -0
  2. package/dist/analysis.cjs +1 -1
  3. package/dist/analysis.d.cts +6 -7
  4. package/dist/analysis.d.ts +6 -7
  5. package/dist/analysis.js +1 -1
  6. package/dist/attributes.d.cts +1 -1
  7. package/dist/attributes.d.ts +1 -1
  8. package/dist/auto.cjs +1 -1
  9. package/dist/auto.js +1 -1
  10. package/dist/business-baggage.d.cts +12 -13
  11. package/dist/business-baggage.d.ts +12 -13
  12. package/dist/{canonical-log-line-processor-Bwrt_L4c.d.ts → canonical-log-line-processor-DDGzm-wi.d.ts} +1 -1
  13. package/dist/{canonical-log-line-processor-C0Z_N4oL.d.cts → canonical-log-line-processor-DLeAQjgb.d.cts} +1 -1
  14. package/dist/channel-BobQKsZd.js +64 -0
  15. package/dist/channel-D0eaVqn3.cjs +81 -0
  16. package/dist/config.d.cts +7 -7
  17. package/dist/config.d.ts +7 -7
  18. package/dist/correlation-id.cjs +1 -1
  19. package/dist/correlation-id.d.cts +9 -10
  20. package/dist/correlation-id.d.ts +9 -10
  21. package/dist/correlation-id.js +1 -1
  22. package/dist/db.d.cts +18 -19
  23. package/dist/db.d.ts +18 -19
  24. package/dist/decorators.cjs +1 -1
  25. package/dist/decorators.d.cts +7 -7
  26. package/dist/decorators.d.ts +7 -7
  27. package/dist/decorators.js +1 -1
  28. package/dist/diagnostics.cjs +10 -70
  29. package/dist/diagnostics.d.cts +6 -6
  30. package/dist/diagnostics.d.ts +6 -6
  31. package/dist/diagnostics.js +1 -61
  32. package/dist/drain-pipeline.d.cts +4 -5
  33. package/dist/drain-pipeline.d.ts +4 -5
  34. package/dist/enrichers.d.cts +7 -8
  35. package/dist/enrichers.d.ts +7 -8
  36. package/dist/event.cjs +1 -1
  37. package/dist/event.d.cts +6 -6
  38. package/dist/event.d.ts +6 -6
  39. package/dist/event.js +1 -1
  40. package/dist/evidence.d.cts +13 -14
  41. package/dist/evidence.d.ts +13 -14
  42. package/dist/exception-fingerprint.d.cts +10 -11
  43. package/dist/exception-fingerprint.d.ts +10 -11
  44. package/dist/exporters.d.cts +2 -2
  45. package/dist/exporters.d.ts +2 -2
  46. package/dist/feature-flags.d.cts +23 -24
  47. package/dist/feature-flags.d.ts +23 -24
  48. package/dist/{filtering-span-processor-vkewzbqB.d.ts → filtering-span-processor-BDGe1myy.d.ts} +1 -1
  49. package/dist/{filtering-span-processor-BpDagWNa.d.cts → filtering-span-processor-BYvLMiNz.d.cts} +1 -1
  50. package/dist/filtering-span-processor.cjs +3 -3
  51. package/dist/filtering-span-processor.d.cts +1 -1
  52. package/dist/filtering-span-processor.d.ts +1 -1
  53. package/dist/filtering-span-processor.js +3 -3
  54. package/dist/{functional-SeRUabkE.d.ts → functional-CbcInXMJ.d.ts} +1 -1
  55. package/dist/{functional-DxHvvWc_.cjs → functional-CjZT7Jur.cjs} +3 -3
  56. package/dist/{functional-6QPJDqUW.js → functional-DHn-xGtR.js} +3 -3
  57. package/dist/{functional-DPZTpGh6.d.cts → functional-j8Joyrwd.d.cts} +1 -1
  58. package/dist/functional.cjs +1 -1
  59. package/dist/functional.d.cts +1 -1
  60. package/dist/functional.d.ts +1 -1
  61. package/dist/functional.js +1 -1
  62. package/dist/http.cjs +1 -1
  63. package/dist/http.d.cts +6 -7
  64. package/dist/http.d.ts +6 -7
  65. package/dist/http.js +1 -1
  66. package/dist/{index-B9aRLp6c.d.ts → index-DAH41w0W.d.ts} +4 -4
  67. package/dist/{index-8bFU4kmd.d.cts → index-DVPsz3DK.d.cts} +4 -4
  68. package/dist/index.cjs +3 -2
  69. package/dist/index.d.cts +38 -38
  70. package/dist/index.d.ts +38 -38
  71. package/dist/index.js +4 -4
  72. package/dist/{init-COfMwKbc.d.cts → init-BtYaU5n9.d.cts} +18 -4
  73. package/dist/{init-CnoRlJqS.d.ts → init-DUIFqRRS.d.ts} +18 -4
  74. package/dist/{init-C-qfxo_u.js → init-rVPOUqng.js} +98 -8
  75. package/dist/{init-W_klPrYk.cjs → init-zb68UvOW.cjs} +97 -6
  76. package/dist/instrumentation.cjs +1 -1
  77. package/dist/instrumentation.d.cts +4 -5
  78. package/dist/instrumentation.d.ts +4 -5
  79. package/dist/instrumentation.js +1 -1
  80. package/dist/{logger-S1Fgl0g3.d.cts → logger-C9UT1aZ_.d.cts} +4 -4
  81. package/dist/{logger-S1Fgl0g3.d.ts → logger-C9UT1aZ_.d.ts} +4 -4
  82. package/dist/logger.d.cts +1 -1
  83. package/dist/logger.d.ts +1 -1
  84. package/dist/messaging-adapters.d.cts +10 -11
  85. package/dist/messaging-adapters.d.ts +10 -11
  86. package/dist/messaging-testing.d.cts +19 -20
  87. package/dist/messaging-testing.d.ts +19 -20
  88. package/dist/messaging.cjs +2 -2
  89. package/dist/messaging.d.cts +23 -24
  90. package/dist/messaging.d.ts +23 -24
  91. package/dist/messaging.js +2 -2
  92. package/dist/metric-helpers.d.cts +6 -7
  93. package/dist/metric-helpers.d.ts +6 -7
  94. package/dist/metric.d.cts +7 -7
  95. package/dist/metric.d.ts +7 -7
  96. package/dist/parse-error.d.cts +3 -4
  97. package/dist/parse-error.d.ts +3 -4
  98. package/dist/policy.cjs +0 -0
  99. package/dist/policy.js +0 -0
  100. package/dist/processors.d.cts +1 -1
  101. package/dist/processors.d.ts +1 -1
  102. package/dist/{sampling-CZi7OM9u.d.ts → sampling-B_8orhSB.d.ts} +1 -1
  103. package/dist/{sampling-DENUjT_8.d.cts → sampling-Dud4XU2m.d.cts} +1 -1
  104. package/dist/sampling.cjs +1 -1
  105. package/dist/sampling.d.cts +1 -1
  106. package/dist/sampling.d.ts +1 -1
  107. package/dist/sampling.js +1 -1
  108. package/dist/security-schema.d.cts +30 -31
  109. package/dist/security-schema.d.ts +30 -31
  110. package/dist/semantic-conventions-yG0X2AsN.d.cts +31 -0
  111. package/dist/semantic-conventions-yG0X2AsN.d.ts +31 -0
  112. package/dist/semantic-conventions.d.cts +1 -1
  113. package/dist/semantic-conventions.d.ts +1 -1
  114. package/dist/semantic-helpers.cjs +1 -1
  115. package/dist/semantic-helpers.d.cts +10 -11
  116. package/dist/semantic-helpers.d.ts +10 -11
  117. package/dist/semantic-helpers.js +1 -1
  118. package/dist/slo.d.cts +12 -13
  119. package/dist/slo.d.ts +12 -13
  120. package/dist/tail-sampling-processor.cjs +1 -1
  121. package/dist/tail-sampling-processor.d.cts +2 -3
  122. package/dist/tail-sampling-processor.d.ts +2 -3
  123. package/dist/tail-sampling-processor.js +1 -1
  124. package/dist/test-span-collector.d.cts +4 -5
  125. package/dist/test-span-collector.d.ts +4 -5
  126. package/dist/testing.d.cts +18 -18
  127. package/dist/testing.d.ts +18 -18
  128. package/dist/trace-helpers.d.cts +15 -16
  129. package/dist/trace-helpers.d.ts +15 -16
  130. package/dist/tracer-provider.cjs +21 -1
  131. package/dist/tracer-provider.d.cts +16 -6
  132. package/dist/tracer-provider.d.ts +16 -6
  133. package/dist/tracer-provider.js +22 -3
  134. package/dist/validate.cjs +8 -7
  135. package/dist/validate.d.cts +12 -12
  136. package/dist/validate.d.ts +12 -12
  137. package/dist/validate.js +8 -7
  138. package/dist/validation-attributes.d.cts +14 -15
  139. package/dist/validation-attributes.d.ts +14 -15
  140. package/dist/webhook.cjs +1 -1
  141. package/dist/webhook.d.cts +11 -12
  142. package/dist/webhook.d.ts +11 -12
  143. package/dist/webhook.js +1 -1
  144. package/dist/workflow-distributed.cjs +1 -1
  145. package/dist/workflow-distributed.d.cts +26 -27
  146. package/dist/workflow-distributed.d.ts +26 -27
  147. package/dist/workflow-distributed.js +1 -1
  148. package/dist/workflow.cjs +1 -1
  149. package/dist/workflow.d.cts +11 -12
  150. package/dist/workflow.d.ts +11 -12
  151. package/dist/workflow.js +1 -1
  152. package/dist/yaml-config.cjs +1 -1
  153. package/dist/yaml-config.d.cts +9 -10
  154. package/dist/yaml-config.d.ts +9 -10
  155. package/dist/yaml-config.js +1 -1
  156. package/package.json +15 -21
  157. package/dist/semantic-conventions-FhSxv-bK.d.cts +0 -31
  158. package/dist/semantic-conventions-FhSxv-bK.d.ts +0 -31
@@ -1,3 +1,3 @@
1
- import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-C0Z_N4oL.cjs";
1
+ import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-DLeAQjgb.cjs";
2
2
  import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
  export { BatchSpanProcessor, type CanonicalLogLineOptions, CanonicalLogLineProcessor, SimpleSpanProcessor };
@@ -1,3 +1,3 @@
1
- import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-Bwrt_L4c.js";
1
+ import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-DDGzm-wi.js";
2
2
  import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
  export { BatchSpanProcessor, type CanonicalLogLineOptions, CanonicalLogLineProcessor, SimpleSpanProcessor };
@@ -1,5 +1,5 @@
1
1
  import { t as UnknownRecord } from "./values-CeMH-mYG.js";
2
- import { s as Logger } from "./logger-S1Fgl0g3.js";
2
+ import { s as Logger } from "./logger-C9UT1aZ_.js";
3
3
  import { Attributes, Link } from "@opentelemetry/api";
4
4
  //#region src/sampling.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
2
- import { s as Logger } from "./logger-S1Fgl0g3.cjs";
2
+ import { s as Logger } from "./logger-C9UT1aZ_.cjs";
3
3
  import { Attributes, Link } from "@opentelemetry/api";
4
4
  //#region src/sampling.d.ts
5
5
  /**
package/dist/sampling.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-W_klPrYk.cjs');
2
+ const require_init = require('./init-zb68UvOW.cjs');
3
3
 
4
4
  exports.AUTOTEL_DEBUG_BAGGAGE_KEY = require_init.AUTOTEL_DEBUG_BAGGAGE_KEY;
5
5
  exports.AUTOTEL_SAMPLING_RATE = require_init.AUTOTEL_SAMPLING_RATE;
@@ -1,2 +1,2 @@
1
- import { C as markForceKept, S as isForceKept, T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, c as DeterministicSampler, d as NeverSampler, f as OperationResult, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, l as FeatureFlagSampler, m as Sampler, n as AUTOTEL_SAMPLING_RATE, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, s as CompositeSampler, t as AUTOTEL_DEBUG_BAGGAGE_KEY, u as KeyTargetRateSampler, v as createLinkFromHeaders, w as resolveSamplingPreset, x as hashUnitInterval, y as debugCaptureRequested } from "./sampling-DENUjT_8.cjs";
1
+ import { C as markForceKept, S as isForceKept, T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, c as DeterministicSampler, d as NeverSampler, f as OperationResult, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, l as FeatureFlagSampler, m as Sampler, n as AUTOTEL_SAMPLING_RATE, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, s as CompositeSampler, t as AUTOTEL_DEBUG_BAGGAGE_KEY, u as KeyTargetRateSampler, v as createLinkFromHeaders, w as resolveSamplingPreset, x as hashUnitInterval, y as debugCaptureRequested } from "./sampling-Dud4XU2m.cjs";
2
2
  export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_RATE, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, CompositeSampler, DeterministicSampler, FeatureFlagSampler, KeyTargetRateSampler, NeverSampler, OperationResult, RandomSampler, Sampler, SamplingContext, SamplingPreset, UserIdSampler, createLinkFromHeaders, debugCaptureRequested, extractLinksFromBatch, hashUnitInterval, isForceKept, markForceKept, resolveSamplingPreset, samplingPresets };
@@ -1,2 +1,2 @@
1
- import { C as markForceKept, S as isForceKept, T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, c as DeterministicSampler, d as NeverSampler, f as OperationResult, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, l as FeatureFlagSampler, m as Sampler, n as AUTOTEL_SAMPLING_RATE, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, s as CompositeSampler, t as AUTOTEL_DEBUG_BAGGAGE_KEY, u as KeyTargetRateSampler, v as createLinkFromHeaders, w as resolveSamplingPreset, x as hashUnitInterval, y as debugCaptureRequested } from "./sampling-CZi7OM9u.js";
1
+ import { C as markForceKept, S as isForceKept, T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, c as DeterministicSampler, d as NeverSampler, f as OperationResult, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, l as FeatureFlagSampler, m as Sampler, n as AUTOTEL_SAMPLING_RATE, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, s as CompositeSampler, t as AUTOTEL_DEBUG_BAGGAGE_KEY, u as KeyTargetRateSampler, v as createLinkFromHeaders, w as resolveSamplingPreset, x as hashUnitInterval, y as debugCaptureRequested } from "./sampling-B_8orhSB.js";
2
2
  export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_RATE, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, CompositeSampler, DeterministicSampler, FeatureFlagSampler, KeyTargetRateSampler, NeverSampler, OperationResult, RandomSampler, Sampler, SamplingContext, SamplingPreset, UserIdSampler, createLinkFromHeaders, debugCaptureRequested, extractLinksFromBatch, hashUnitInterval, isForceKept, markForceKept, resolveSamplingPreset, samplingPresets };
package/dist/sampling.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as CompositeSampler, B as hashUnitInterval, D as AUTOTEL_SAMPLING_TAIL_KEEP, E as AUTOTEL_SAMPLING_TAIL_EVALUATED, F as RandomSampler, H as markForceKept, I as UserIdSampler, L as createLinkFromHeaders, M as FeatureFlagSampler, N as KeyTargetRateSampler, O as AdaptiveSampler, P as NeverSampler, R as debugCaptureRequested, T as AUTOTEL_SAMPLING_RATE, U as resolveSamplingPreset, V as isForceKept, W as samplingPresets, j as DeterministicSampler, k as AlwaysSampler, w as AUTOTEL_DEBUG_BAGGAGE_KEY, z as extractLinksFromBatch } from "./init-C-qfxo_u.js";
1
+ import { A as CompositeSampler, B as hashUnitInterval, D as AUTOTEL_SAMPLING_TAIL_KEEP, E as AUTOTEL_SAMPLING_TAIL_EVALUATED, F as RandomSampler, H as markForceKept, I as UserIdSampler, L as createLinkFromHeaders, M as FeatureFlagSampler, N as KeyTargetRateSampler, O as AdaptiveSampler, P as NeverSampler, R as debugCaptureRequested, T as AUTOTEL_SAMPLING_RATE, U as resolveSamplingPreset, V as isForceKept, W as samplingPresets, j as DeterministicSampler, k as AlwaysSampler, w as AUTOTEL_DEBUG_BAGGAGE_KEY, z as extractLinksFromBatch } from "./init-rVPOUqng.js";
2
2
 
3
3
  export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_RATE, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, CompositeSampler, DeterministicSampler, FeatureFlagSampler, KeyTargetRateSampler, NeverSampler, RandomSampler, UserIdSampler, createLinkFromHeaders, debugCaptureRequested, extractLinksFromBatch, hashUnitInterval, isForceKept, markForceKept, resolveSamplingPreset, samplingPresets };
@@ -10,59 +10,58 @@
10
10
  * browser bundles (devtools widget) and anything else that only needs
11
11
  * the constants, without pulling in the OpenTelemetry SDK.
12
12
  */
13
- type SecuritySeverity = 'info' | 'warning' | 'error' | 'critical';
13
+ export type SecuritySeverity = 'info' | 'warning' | 'error' | 'critical';
14
14
  /** All severities, lowest first. */
15
- declare const SECURITY_SEVERITIES: readonly SecuritySeverity[];
15
+ export declare const SECURITY_SEVERITIES: readonly SecuritySeverity[];
16
16
  /** Numeric rank per severity for threshold comparisons. */
17
- declare const SECURITY_SEVERITY_RANK: Record<SecuritySeverity, number>;
17
+ export declare const SECURITY_SEVERITY_RANK: Record<SecuritySeverity, number>;
18
18
  /**
19
19
  * Parse an untrusted value (span attribute, event payload field) into a
20
20
  * severity, falling back when it is missing or malformed.
21
21
  */
22
- declare function parseSecuritySeverity(value: unknown, fallback?: SecuritySeverity): SecuritySeverity;
22
+ export declare function parseSecuritySeverity(value: unknown, fallback?: SecuritySeverity): SecuritySeverity;
23
23
  /** `true` when `severity` meets or exceeds `min`. */
24
- declare function securitySeverityAtLeast(severity: SecuritySeverity, min: SecuritySeverity): boolean;
24
+ export declare function securitySeverityAtLeast(severity: SecuritySeverity, min: SecuritySeverity): boolean;
25
25
  /** The higher-ranked of two severities (e.g. escalate failures to ≥ error). */
26
- declare function escalateSecuritySeverity(severity: SecuritySeverity, floor: SecuritySeverity): SecuritySeverity;
26
+ export declare function escalateSecuritySeverity(severity: SecuritySeverity, floor: SecuritySeverity): SecuritySeverity;
27
27
  /**
28
28
  * Span attribute keys of the security schema. Emitters and consumers must
29
29
  * reference these instead of re-typing the strings.
30
30
  */
31
- declare const SECURITY_ATTR: {
31
+ export declare const SECURITY_ATTR: {
32
32
  /** Marker set on every span carrying a security event. */
33
- readonly marker: "autotel.security";
33
+ readonly marker: 'autotel.security';
34
34
  /** Set when the event was force-kept through tail sampling. */
35
- readonly forceKeep: "autotel.security.force_keep";
36
- readonly event: "security.event";
37
- readonly category: "security.category";
38
- readonly outcome: "security.outcome";
39
- readonly severity: "security.severity";
40
- readonly actorId: "security.actor_id";
41
- readonly targetType: "security.target_type";
42
- readonly targetId: "security.target_id";
43
- readonly tenantId: "security.tenant_id";
44
- readonly reason: "security.reason";
35
+ readonly forceKeep: 'autotel.security.force_keep';
36
+ readonly event: 'security.event';
37
+ readonly category: 'security.category';
38
+ readonly outcome: 'security.outcome';
39
+ readonly severity: 'security.severity';
40
+ readonly actorId: 'security.actor_id';
41
+ readonly targetType: 'security.target_type';
42
+ readonly targetId: 'security.target_id';
43
+ readonly tenantId: 'security.tenant_id';
44
+ readonly reason: 'security.reason';
45
45
  /** Custom metadata keys dropped because they looked credential-shaped. */
46
- readonly droppedKeys: "security.dropped_keys";
46
+ readonly droppedKeys: 'security.dropped_keys';
47
47
  /** Set by the signal processor on suspicious request paths. */
48
- readonly suspiciousRequest: "security.suspicious_request";
48
+ readonly suspiciousRequest: 'security.suspicious_request';
49
49
  /** Pattern name that flagged a suspicious request, e.g. `path_traversal`. */
50
- readonly signal: "security.signal";
50
+ readonly signal: 'security.signal';
51
51
  };
52
52
  /** Metric names emitted by the security instrumentation. */
53
- declare const SECURITY_METRICS: {
54
- readonly events: "autotel.security.events";
55
- readonly httpSuspicious: "autotel.security.http.suspicious";
56
- readonly httpDenied: "autotel.security.http.denied";
57
- readonly anomaly: "autotel.security.anomaly";
58
- readonly heartbeat: "autotel.security.heartbeat";
53
+ export declare const SECURITY_METRICS: {
54
+ readonly events: 'autotel.security.events';
55
+ readonly httpSuspicious: 'autotel.security.http.suspicious';
56
+ readonly httpDenied: 'autotel.security.http.denied';
57
+ readonly anomaly: 'autotel.security.anomaly';
58
+ readonly heartbeat: 'autotel.security.heartbeat';
59
59
  };
60
60
  /** HTTP statuses counted as denied responses by default. */
61
- declare const SECURITY_DENIED_STATUSES: readonly number[];
61
+ export declare const SECURITY_DENIED_STATUSES: readonly number[];
62
62
  /**
63
63
  * Span attributes carrying the HTTP response status, current semconv
64
64
  * first, legacy fallback second.
65
65
  */
66
- declare const HTTP_STATUS_ATTRIBUTES: readonly string[];
67
- //#endregion
68
- export { HTTP_STATUS_ATTRIBUTES, SECURITY_ATTR, SECURITY_DENIED_STATUSES, SECURITY_METRICS, SECURITY_SEVERITIES, SECURITY_SEVERITY_RANK, SecuritySeverity, escalateSecuritySeverity, parseSecuritySeverity, securitySeverityAtLeast };
66
+ export declare const HTTP_STATUS_ATTRIBUTES: readonly string[];
67
+ //#endregion
@@ -10,59 +10,58 @@
10
10
  * browser bundles (devtools widget) and anything else that only needs
11
11
  * the constants, without pulling in the OpenTelemetry SDK.
12
12
  */
13
- type SecuritySeverity = 'info' | 'warning' | 'error' | 'critical';
13
+ export type SecuritySeverity = 'info' | 'warning' | 'error' | 'critical';
14
14
  /** All severities, lowest first. */
15
- declare const SECURITY_SEVERITIES: readonly SecuritySeverity[];
15
+ export declare const SECURITY_SEVERITIES: readonly SecuritySeverity[];
16
16
  /** Numeric rank per severity for threshold comparisons. */
17
- declare const SECURITY_SEVERITY_RANK: Record<SecuritySeverity, number>;
17
+ export declare const SECURITY_SEVERITY_RANK: Record<SecuritySeverity, number>;
18
18
  /**
19
19
  * Parse an untrusted value (span attribute, event payload field) into a
20
20
  * severity, falling back when it is missing or malformed.
21
21
  */
22
- declare function parseSecuritySeverity(value: unknown, fallback?: SecuritySeverity): SecuritySeverity;
22
+ export declare function parseSecuritySeverity(value: unknown, fallback?: SecuritySeverity): SecuritySeverity;
23
23
  /** `true` when `severity` meets or exceeds `min`. */
24
- declare function securitySeverityAtLeast(severity: SecuritySeverity, min: SecuritySeverity): boolean;
24
+ export declare function securitySeverityAtLeast(severity: SecuritySeverity, min: SecuritySeverity): boolean;
25
25
  /** The higher-ranked of two severities (e.g. escalate failures to ≥ error). */
26
- declare function escalateSecuritySeverity(severity: SecuritySeverity, floor: SecuritySeverity): SecuritySeverity;
26
+ export declare function escalateSecuritySeverity(severity: SecuritySeverity, floor: SecuritySeverity): SecuritySeverity;
27
27
  /**
28
28
  * Span attribute keys of the security schema. Emitters and consumers must
29
29
  * reference these instead of re-typing the strings.
30
30
  */
31
- declare const SECURITY_ATTR: {
31
+ export declare const SECURITY_ATTR: {
32
32
  /** Marker set on every span carrying a security event. */
33
- readonly marker: "autotel.security";
33
+ readonly marker: 'autotel.security';
34
34
  /** Set when the event was force-kept through tail sampling. */
35
- readonly forceKeep: "autotel.security.force_keep";
36
- readonly event: "security.event";
37
- readonly category: "security.category";
38
- readonly outcome: "security.outcome";
39
- readonly severity: "security.severity";
40
- readonly actorId: "security.actor_id";
41
- readonly targetType: "security.target_type";
42
- readonly targetId: "security.target_id";
43
- readonly tenantId: "security.tenant_id";
44
- readonly reason: "security.reason";
35
+ readonly forceKeep: 'autotel.security.force_keep';
36
+ readonly event: 'security.event';
37
+ readonly category: 'security.category';
38
+ readonly outcome: 'security.outcome';
39
+ readonly severity: 'security.severity';
40
+ readonly actorId: 'security.actor_id';
41
+ readonly targetType: 'security.target_type';
42
+ readonly targetId: 'security.target_id';
43
+ readonly tenantId: 'security.tenant_id';
44
+ readonly reason: 'security.reason';
45
45
  /** Custom metadata keys dropped because they looked credential-shaped. */
46
- readonly droppedKeys: "security.dropped_keys";
46
+ readonly droppedKeys: 'security.dropped_keys';
47
47
  /** Set by the signal processor on suspicious request paths. */
48
- readonly suspiciousRequest: "security.suspicious_request";
48
+ readonly suspiciousRequest: 'security.suspicious_request';
49
49
  /** Pattern name that flagged a suspicious request, e.g. `path_traversal`. */
50
- readonly signal: "security.signal";
50
+ readonly signal: 'security.signal';
51
51
  };
52
52
  /** Metric names emitted by the security instrumentation. */
53
- declare const SECURITY_METRICS: {
54
- readonly events: "autotel.security.events";
55
- readonly httpSuspicious: "autotel.security.http.suspicious";
56
- readonly httpDenied: "autotel.security.http.denied";
57
- readonly anomaly: "autotel.security.anomaly";
58
- readonly heartbeat: "autotel.security.heartbeat";
53
+ export declare const SECURITY_METRICS: {
54
+ readonly events: 'autotel.security.events';
55
+ readonly httpSuspicious: 'autotel.security.http.suspicious';
56
+ readonly httpDenied: 'autotel.security.http.denied';
57
+ readonly anomaly: 'autotel.security.anomaly';
58
+ readonly heartbeat: 'autotel.security.heartbeat';
59
59
  };
60
60
  /** HTTP statuses counted as denied responses by default. */
61
- declare const SECURITY_DENIED_STATUSES: readonly number[];
61
+ export declare const SECURITY_DENIED_STATUSES: readonly number[];
62
62
  /**
63
63
  * Span attributes carrying the HTTP response status, current semconv
64
64
  * first, legacy fallback second.
65
65
  */
66
- declare const HTTP_STATUS_ATTRIBUTES: readonly string[];
67
- //#endregion
68
- export { HTTP_STATUS_ATTRIBUTES, SECURITY_ATTR, SECURITY_DENIED_STATUSES, SECURITY_METRICS, SECURITY_SEVERITIES, SECURITY_SEVERITY_RANK, SecuritySeverity, escalateSecuritySeverity, parseSecuritySeverity, securitySeverityAtLeast };
66
+ export declare const HTTP_STATUS_ATTRIBUTES: readonly string[];
67
+ //#endregion
@@ -0,0 +1,31 @@
1
+ //#region src/attributes/registry.d.ts
2
+ declare const HTTPAttributes: {
3
+ readonly connectionState: 'http.connection.state';
4
+ readonly requestMethod: 'http.request.method';
5
+ readonly requestMethodOriginal: 'http.request.method_original';
6
+ readonly requestResendCount: 'http.request.resend_count';
7
+ readonly requestSize: 'http.request.size';
8
+ readonly requestBodySize: 'http.request.body.size';
9
+ readonly responseSize: 'http.response.size';
10
+ readonly responseBodySize: 'http.response.body.size';
11
+ readonly responseStatusCode: 'http.response.status_code';
12
+ readonly route: 'http.route';
13
+ };
14
+ declare const ServiceAttributes: {
15
+ readonly name: 'service.name';
16
+ readonly instance: 'service.instance.id';
17
+ readonly version: 'service.version';
18
+ };
19
+ declare const URLAttributes: {
20
+ readonly scheme: 'url.scheme';
21
+ readonly full: 'url.full';
22
+ readonly path: 'url.path';
23
+ readonly query: 'url.query';
24
+ readonly fragment: 'url.fragment';
25
+ };
26
+ //#endregion
27
+ //#region src/semantic-conventions.d.ts
28
+ declare function httpRequestHeaderAttribute(name: string): string;
29
+ declare function httpResponseHeaderAttribute(name: string): string;
30
+ //#endregion
31
+ export { URLAttributes as a, ServiceAttributes as i, httpResponseHeaderAttribute as n, HTTPAttributes as r, httpRequestHeaderAttribute as t };
@@ -0,0 +1,31 @@
1
+ //#region src/attributes/registry.d.ts
2
+ declare const HTTPAttributes: {
3
+ readonly connectionState: 'http.connection.state';
4
+ readonly requestMethod: 'http.request.method';
5
+ readonly requestMethodOriginal: 'http.request.method_original';
6
+ readonly requestResendCount: 'http.request.resend_count';
7
+ readonly requestSize: 'http.request.size';
8
+ readonly requestBodySize: 'http.request.body.size';
9
+ readonly responseSize: 'http.response.size';
10
+ readonly responseBodySize: 'http.response.body.size';
11
+ readonly responseStatusCode: 'http.response.status_code';
12
+ readonly route: 'http.route';
13
+ };
14
+ declare const ServiceAttributes: {
15
+ readonly name: 'service.name';
16
+ readonly instance: 'service.instance.id';
17
+ readonly version: 'service.version';
18
+ };
19
+ declare const URLAttributes: {
20
+ readonly scheme: 'url.scheme';
21
+ readonly full: 'url.full';
22
+ readonly path: 'url.path';
23
+ readonly query: 'url.query';
24
+ readonly fragment: 'url.fragment';
25
+ };
26
+ //#endregion
27
+ //#region src/semantic-conventions.d.ts
28
+ declare function httpRequestHeaderAttribute(name: string): string;
29
+ declare function httpResponseHeaderAttribute(name: string): string;
30
+ //#endregion
31
+ export { URLAttributes as a, ServiceAttributes as i, httpResponseHeaderAttribute as n, HTTPAttributes as r, httpRequestHeaderAttribute as t };
@@ -1,2 +1,2 @@
1
- import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-FhSxv-bK.cjs";
1
+ import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-yG0X2AsN.cjs";
2
2
  export { HTTPAttributes, ServiceAttributes, URLAttributes, httpRequestHeaderAttribute, httpResponseHeaderAttribute };
@@ -1,2 +1,2 @@
1
- import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-FhSxv-bK.js";
1
+ import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-yG0X2AsN.js";
2
2
  export { HTTPAttributes, ServiceAttributes, URLAttributes, httpRequestHeaderAttribute, httpResponseHeaderAttribute };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-AxGpgYBA.cjs');
3
- const require_functional = require('./functional-DxHvvWc_.cjs');
3
+ const require_functional = require('./functional-CjZT7Jur.cjs');
4
4
  const require_trace_factory_validation = require('./trace-factory-validation-CHU1WcjK.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
6
6
 
@@ -9,7 +9,7 @@ type SemanticFactory<TArgs extends unknown[], TReturn> = (ctx: TraceContext) =>
9
9
  * Follows DB semantic conventions:
10
10
  * https://opentelemetry.io/docs/specs/semconv/database/
11
11
  */
12
- interface DBConfig {
12
+ export interface DBConfig {
13
13
  /** Database system (e.g., 'postgresql', 'mongodb', 'redis') */
14
14
  system: string;
15
15
  /** Operation type (e.g., 'SELECT', 'INSERT', 'find', 'get') */
@@ -29,7 +29,7 @@ interface DBConfig {
29
29
  * Follows HTTP semantic conventions:
30
30
  * https://opentelemetry.io/docs/specs/semconv/http/
31
31
  */
32
- interface HTTPConfig {
32
+ export interface HTTPConfig {
33
33
  /** HTTP method (e.g., 'GET', 'POST') */
34
34
  method?: string;
35
35
  /** Target URL or URL template */
@@ -47,7 +47,7 @@ interface HTTPConfig {
47
47
  * Follows Messaging semantic conventions:
48
48
  * https://opentelemetry.io/docs/specs/semconv/messaging/
49
49
  */
50
- interface MessagingConfig {
50
+ export interface MessagingConfig {
51
51
  /** Messaging system (e.g., 'kafka', 'rabbitmq', 'sqs') */
52
52
  system: string;
53
53
  /** Operation type */
@@ -155,8 +155,8 @@ interface MessagingConfig {
155
155
  *
156
156
  * @public
157
157
  */
158
- declare function traceDB(config: DBConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
159
- declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
158
+ export declare function traceDB(config: DBConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
159
+ export declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
160
160
  /**
161
161
  * Trace HTTP client operations with HTTP semantic conventions
162
162
  *
@@ -225,8 +225,8 @@ declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn:
225
225
  *
226
226
  * @public
227
227
  */
228
- declare function traceHTTP(config: HTTPConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
229
- declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
228
+ export declare function traceHTTP(config: HTTPConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
229
+ export declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
230
230
  /**
231
231
  * Trace messaging operations with Messaging semantic conventions
232
232
  *
@@ -324,7 +324,6 @@ declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig,
324
324
  *
325
325
  * @public
326
326
  */
327
- declare function traceMessaging(config: MessagingConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
328
- declare function traceMessaging<TArgs extends unknown[], TReturn>(config: MessagingConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
329
- //#endregion
330
- export { DBConfig, HTTPConfig, MessagingConfig, traceDB, traceHTTP, traceMessaging };
327
+ export declare function traceMessaging(config: MessagingConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
328
+ export declare function traceMessaging<TArgs extends unknown[], TReturn>(config: MessagingConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
329
+ //#endregion
@@ -9,7 +9,7 @@ type SemanticFactory<TArgs extends unknown[], TReturn> = (ctx: TraceContext) =>
9
9
  * Follows DB semantic conventions:
10
10
  * https://opentelemetry.io/docs/specs/semconv/database/
11
11
  */
12
- interface DBConfig {
12
+ export interface DBConfig {
13
13
  /** Database system (e.g., 'postgresql', 'mongodb', 'redis') */
14
14
  system: string;
15
15
  /** Operation type (e.g., 'SELECT', 'INSERT', 'find', 'get') */
@@ -29,7 +29,7 @@ interface DBConfig {
29
29
  * Follows HTTP semantic conventions:
30
30
  * https://opentelemetry.io/docs/specs/semconv/http/
31
31
  */
32
- interface HTTPConfig {
32
+ export interface HTTPConfig {
33
33
  /** HTTP method (e.g., 'GET', 'POST') */
34
34
  method?: string;
35
35
  /** Target URL or URL template */
@@ -47,7 +47,7 @@ interface HTTPConfig {
47
47
  * Follows Messaging semantic conventions:
48
48
  * https://opentelemetry.io/docs/specs/semconv/messaging/
49
49
  */
50
- interface MessagingConfig {
50
+ export interface MessagingConfig {
51
51
  /** Messaging system (e.g., 'kafka', 'rabbitmq', 'sqs') */
52
52
  system: string;
53
53
  /** Operation type */
@@ -155,8 +155,8 @@ interface MessagingConfig {
155
155
  *
156
156
  * @public
157
157
  */
158
- declare function traceDB(config: DBConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
159
- declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
158
+ export declare function traceDB(config: DBConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
159
+ export declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
160
160
  /**
161
161
  * Trace HTTP client operations with HTTP semantic conventions
162
162
  *
@@ -225,8 +225,8 @@ declare function traceDB<TArgs extends unknown[], TReturn>(config: DBConfig, fn:
225
225
  *
226
226
  * @public
227
227
  */
228
- declare function traceHTTP(config: HTTPConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
229
- declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
228
+ export declare function traceHTTP(config: HTTPConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
229
+ export declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
230
230
  /**
231
231
  * Trace messaging operations with Messaging semantic conventions
232
232
  *
@@ -324,7 +324,6 @@ declare function traceHTTP<TArgs extends unknown[], TReturn>(config: HTTPConfig,
324
324
  *
325
325
  * @public
326
326
  */
327
- declare function traceMessaging(config: MessagingConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
328
- declare function traceMessaging<TArgs extends unknown[], TReturn>(config: MessagingConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
329
- //#endregion
330
- export { DBConfig, HTTPConfig, MessagingConfig, traceDB, traceHTTP, traceMessaging };
327
+ export declare function traceMessaging(config: MessagingConfig): <TArgs extends unknown[], TReturn>(factory: SemanticFactory<TArgs, TReturn>) => SemanticHandler<TArgs, TReturn>;
328
+ export declare function traceMessaging<TArgs extends unknown[], TReturn>(config: MessagingConfig, fn: SemanticHandler<TArgs, TReturn>): SemanticHandler<TArgs, TReturn>;
329
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  import { b as toAttributeValue, g as nonEmptyString, s as asRecord } from "./values-xBtdXtjA.js";
2
- import { l as withTracing } from "./functional-6QPJDqUW.js";
2
+ import { l as withTracing } from "./functional-DHn-xGtR.js";
3
3
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
4
4
  import { SpanKind } from "@opentelemetry/api";
5
5
 
package/dist/slo.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Attributes } from "@opentelemetry/api";
2
2
  //#region src/slo.d.ts
3
- type SloOutcome = 'good' | 'bad';
4
- interface SloDefinition {
3
+ export type SloOutcome = 'good' | 'bad';
4
+ export interface SloDefinition {
5
5
  /** Stable identifier used in metric attributes and alerts. */
6
6
  name: string;
7
7
  /** Required success ratio, expressed as a value between 0 and 1. */
@@ -9,13 +9,13 @@ interface SloDefinition {
9
9
  /** Rolling observation window in milliseconds. */
10
10
  windowMs: number;
11
11
  }
12
- interface SloTrackerOptions {
12
+ export interface SloTrackerOptions {
13
13
  /** Clock override for deterministic tests. */
14
14
  now?: () => number;
15
15
  /** Disable metric recording when calculations run outside an initialized SDK. */
16
16
  recordMetrics?: boolean;
17
17
  }
18
- interface SloSnapshot extends SloDefinition {
18
+ export interface SloSnapshot extends SloDefinition {
19
19
  observedAt: number;
20
20
  total: number;
21
21
  good: number;
@@ -32,14 +32,14 @@ interface SloSnapshot extends SloDefinition {
32
32
  burnRate: number;
33
33
  meetsTarget: boolean;
34
34
  }
35
- interface SloTracker {
35
+ export interface SloTracker {
36
36
  readonly definition: Readonly<SloDefinition>;
37
37
  record(outcome: SloOutcome, attributes?: Attributes): SloSnapshot;
38
38
  snapshot(at?: number): SloSnapshot;
39
39
  forecast(options: SloForecastOptions): SloForecast;
40
40
  reset(): void;
41
41
  }
42
- interface SloForecastOptions {
42
+ export interface SloForecastOptions {
43
43
  /** Recent observation period used to estimate the future failure rate. */
44
44
  baselineMs: number;
45
45
  /** Future period covered by the forecast. Must not exceed 4x the baseline. */
@@ -50,7 +50,7 @@ interface SloForecastOptions {
50
50
  */
51
51
  expectedEventsInLookahead?: number;
52
52
  }
53
- interface SloForecast {
53
+ export interface SloForecast {
54
54
  name: string;
55
55
  target: number;
56
56
  observedAt: number;
@@ -69,13 +69,13 @@ interface SloForecast {
69
69
  alerting: boolean;
70
70
  reason: 'no-baseline-traffic' | 'within-budget' | 'projected-budget-exhaustion';
71
71
  }
72
- interface BurnRateAlertOptions {
72
+ export interface BurnRateAlertOptions {
73
73
  shortWindow: SloSnapshot;
74
74
  longWindow: SloSnapshot;
75
75
  shortThreshold: number;
76
76
  longThreshold: number;
77
77
  }
78
- interface BurnRateAlertDecision {
78
+ export interface BurnRateAlertDecision {
79
79
  alerting: boolean;
80
80
  reason: 'burn-rate-thresholds-exceeded' | 'short-window-below-threshold' | 'long-window-below-threshold' | 'no-traffic';
81
81
  shortBurnRate: number;
@@ -84,13 +84,12 @@ interface BurnRateAlertDecision {
84
84
  /**
85
85
  * Track good and bad events for one rolling-window service level objective.
86
86
  */
87
- declare function createSloTracker(definition: SloDefinition, options?: SloTrackerOptions): SloTracker;
87
+ export declare function createSloTracker(definition: SloDefinition, options?: SloTrackerOptions): SloTracker;
88
88
  /**
89
89
  * Evaluate a dual-window burn-rate alert.
90
90
  *
91
91
  * Both windows must exceed their threshold. The short window catches a sharp
92
92
  * regression while the long window rejects brief spikes.
93
93
  */
94
- declare function evaluateBurnRateAlert(options: BurnRateAlertOptions): BurnRateAlertDecision;
95
- //#endregion
96
- export { BurnRateAlertDecision, BurnRateAlertOptions, SloDefinition, SloForecast, SloForecastOptions, SloOutcome, SloSnapshot, SloTracker, SloTrackerOptions, createSloTracker, evaluateBurnRateAlert };
94
+ export declare function evaluateBurnRateAlert(options: BurnRateAlertOptions): BurnRateAlertDecision;
95
+ //#endregion
package/dist/slo.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Attributes } from "@opentelemetry/api";
2
2
  //#region src/slo.d.ts
3
- type SloOutcome = 'good' | 'bad';
4
- interface SloDefinition {
3
+ export type SloOutcome = 'good' | 'bad';
4
+ export interface SloDefinition {
5
5
  /** Stable identifier used in metric attributes and alerts. */
6
6
  name: string;
7
7
  /** Required success ratio, expressed as a value between 0 and 1. */
@@ -9,13 +9,13 @@ interface SloDefinition {
9
9
  /** Rolling observation window in milliseconds. */
10
10
  windowMs: number;
11
11
  }
12
- interface SloTrackerOptions {
12
+ export interface SloTrackerOptions {
13
13
  /** Clock override for deterministic tests. */
14
14
  now?: () => number;
15
15
  /** Disable metric recording when calculations run outside an initialized SDK. */
16
16
  recordMetrics?: boolean;
17
17
  }
18
- interface SloSnapshot extends SloDefinition {
18
+ export interface SloSnapshot extends SloDefinition {
19
19
  observedAt: number;
20
20
  total: number;
21
21
  good: number;
@@ -32,14 +32,14 @@ interface SloSnapshot extends SloDefinition {
32
32
  burnRate: number;
33
33
  meetsTarget: boolean;
34
34
  }
35
- interface SloTracker {
35
+ export interface SloTracker {
36
36
  readonly definition: Readonly<SloDefinition>;
37
37
  record(outcome: SloOutcome, attributes?: Attributes): SloSnapshot;
38
38
  snapshot(at?: number): SloSnapshot;
39
39
  forecast(options: SloForecastOptions): SloForecast;
40
40
  reset(): void;
41
41
  }
42
- interface SloForecastOptions {
42
+ export interface SloForecastOptions {
43
43
  /** Recent observation period used to estimate the future failure rate. */
44
44
  baselineMs: number;
45
45
  /** Future period covered by the forecast. Must not exceed 4x the baseline. */
@@ -50,7 +50,7 @@ interface SloForecastOptions {
50
50
  */
51
51
  expectedEventsInLookahead?: number;
52
52
  }
53
- interface SloForecast {
53
+ export interface SloForecast {
54
54
  name: string;
55
55
  target: number;
56
56
  observedAt: number;
@@ -69,13 +69,13 @@ interface SloForecast {
69
69
  alerting: boolean;
70
70
  reason: 'no-baseline-traffic' | 'within-budget' | 'projected-budget-exhaustion';
71
71
  }
72
- interface BurnRateAlertOptions {
72
+ export interface BurnRateAlertOptions {
73
73
  shortWindow: SloSnapshot;
74
74
  longWindow: SloSnapshot;
75
75
  shortThreshold: number;
76
76
  longThreshold: number;
77
77
  }
78
- interface BurnRateAlertDecision {
78
+ export interface BurnRateAlertDecision {
79
79
  alerting: boolean;
80
80
  reason: 'burn-rate-thresholds-exceeded' | 'short-window-below-threshold' | 'long-window-below-threshold' | 'no-traffic';
81
81
  shortBurnRate: number;
@@ -84,13 +84,12 @@ interface BurnRateAlertDecision {
84
84
  /**
85
85
  * Track good and bad events for one rolling-window service level objective.
86
86
  */
87
- declare function createSloTracker(definition: SloDefinition, options?: SloTrackerOptions): SloTracker;
87
+ export declare function createSloTracker(definition: SloDefinition, options?: SloTrackerOptions): SloTracker;
88
88
  /**
89
89
  * Evaluate a dual-window burn-rate alert.
90
90
  *
91
91
  * Both windows must exceed their threshold. The short window catches a sharp
92
92
  * regression while the long window rejects brief spikes.
93
93
  */
94
- declare function evaluateBurnRateAlert(options: BurnRateAlertOptions): BurnRateAlertDecision;
95
- //#endregion
96
- export { BurnRateAlertDecision, BurnRateAlertOptions, SloDefinition, SloForecast, SloForecastOptions, SloOutcome, SloSnapshot, SloTracker, SloTrackerOptions, createSloTracker, evaluateBurnRateAlert };
94
+ export declare function evaluateBurnRateAlert(options: BurnRateAlertOptions): BurnRateAlertDecision;
95
+ //#endregion
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-W_klPrYk.cjs');
2
+ const require_init = require('./init-zb68UvOW.cjs');
3
3
 
4
4
  exports.TailSamplingSpanProcessor = require_init.TailSamplingSpanProcessor;