autotel 7.8.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-u5Qwjray.cjs → functional-CjZT7Jur.cjs} +19 -21
  56. package/dist/{functional-CC2BFGAO.js → functional-DHn-xGtR.js} +21 -23
  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-8SISAGdE.js → init-rVPOUqng.js} +171 -10
  75. package/dist/{init-21HWbm7_.cjs → init-zb68UvOW.cjs} +180 -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
@@ -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-u5Qwjray.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-CC2BFGAO.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-21HWbm7_.cjs');
2
+ const require_init = require('./init-zb68UvOW.cjs');
3
3
 
4
4
  exports.TailSamplingSpanProcessor = require_init.TailSamplingSpanProcessor;
@@ -1,7 +1,7 @@
1
1
  import { ReadableSpan, Span, SpanProcessor } from "@opentelemetry/sdk-trace-base";
2
2
  import { Context } from "@opentelemetry/api";
3
3
  //#region src/tail-sampling-processor.d.ts
4
- declare class TailSamplingSpanProcessor implements SpanProcessor {
4
+ export declare class TailSamplingSpanProcessor implements SpanProcessor {
5
5
  private wrappedProcessor;
6
6
  constructor(wrappedProcessor: SpanProcessor);
7
7
  onStart(span: Span, parentContext: Context): void;
@@ -9,5 +9,4 @@ declare class TailSamplingSpanProcessor implements SpanProcessor {
9
9
  forceFlush(): Promise<void>;
10
10
  shutdown(): Promise<void>;
11
11
  }
12
- //#endregion
13
- export { TailSamplingSpanProcessor };
12
+ //#endregion
@@ -1,7 +1,7 @@
1
1
  import { Context } from "@opentelemetry/api";
2
2
  import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
  //#region src/tail-sampling-processor.d.ts
4
- declare class TailSamplingSpanProcessor implements SpanProcessor {
4
+ export declare class TailSamplingSpanProcessor implements SpanProcessor {
5
5
  private wrappedProcessor;
6
6
  constructor(wrappedProcessor: SpanProcessor);
7
7
  onStart(span: Span$1, parentContext: Context): void;
@@ -9,5 +9,4 @@ declare class TailSamplingSpanProcessor implements SpanProcessor {
9
9
  forceFlush(): Promise<void>;
10
10
  shutdown(): Promise<void>;
11
11
  }
12
- //#endregion
13
- export { TailSamplingSpanProcessor };
12
+ //#endregion
@@ -1,3 +1,3 @@
1
- import { x as TailSamplingSpanProcessor } from "./init-8SISAGdE.js";
1
+ import { C as TailSamplingSpanProcessor } from "./init-rVPOUqng.js";
2
2
 
3
3
  export { TailSamplingSpanProcessor };
@@ -9,7 +9,7 @@ type SerializableValue = string | number | boolean | string[] | number[] | boole
9
9
  * Defined as a `type` (not `interface`) so it is assignable to
10
10
  * `Record<string, unknown>` in TypeScript 6+ strict mode.
11
11
  */
12
- type SerializedSpan = {
12
+ export type SerializedSpan = {
13
13
  spanId: string;
14
14
  parentSpanId?: string;
15
15
  name: string;
@@ -19,7 +19,7 @@ type SerializedSpan = {
19
19
  statusMessage?: string;
20
20
  attributes?: Record<string, SerializableValue>;
21
21
  };
22
- declare class TestSpanCollector implements SpanExporter {
22
+ export declare class TestSpanCollector implements SpanExporter {
23
23
  private traces;
24
24
  export(spans: ReadableSpan[], callback: (result: {
25
25
  code: number;
@@ -41,6 +41,5 @@ declare class TestSpanCollector implements SpanExporter {
41
41
  shutdown(): Promise<void>;
42
42
  forceFlush(): Promise<void>;
43
43
  }
44
- declare function serializeSpan(span: ReadableSpan): SerializedSpan;
45
- //#endregion
46
- export { SerializedSpan, TestSpanCollector, serializeSpan };
44
+ export declare function serializeSpan(span: ReadableSpan): SerializedSpan;
45
+ //#endregion
@@ -9,7 +9,7 @@ type SerializableValue = string | number | boolean | string[] | number[] | boole
9
9
  * Defined as a `type` (not `interface`) so it is assignable to
10
10
  * `Record<string, unknown>` in TypeScript 6+ strict mode.
11
11
  */
12
- type SerializedSpan = {
12
+ export type SerializedSpan = {
13
13
  spanId: string;
14
14
  parentSpanId?: string;
15
15
  name: string;
@@ -19,7 +19,7 @@ type SerializedSpan = {
19
19
  statusMessage?: string;
20
20
  attributes?: Record<string, SerializableValue>;
21
21
  };
22
- declare class TestSpanCollector implements SpanExporter {
22
+ export declare class TestSpanCollector implements SpanExporter {
23
23
  private traces;
24
24
  export(spans: ReadableSpan[], callback: (result: {
25
25
  code: number;
@@ -41,6 +41,5 @@ declare class TestSpanCollector implements SpanExporter {
41
41
  shutdown(): Promise<void>;
42
42
  forceFlush(): Promise<void>;
43
43
  }
44
- declare function serializeSpan(span: ReadableSpan): SerializedSpan;
45
- //#endregion
46
- export { SerializedSpan, TestSpanCollector, serializeSpan };
44
+ export declare function serializeSpan(span: ReadableSpan): SerializedSpan;
45
+ //#endregion
@@ -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 { a as EventsValue, c as createEventCollector, i as EventsOutcome, n as EventData, o as assertEventTracked, r as EventsFunnelStep, s as assertOutcomeTracked, t as EventCollector } from "./event-testing-CBtnJXE5.cjs";
4
4
  import { SerializedSpan, TestSpanCollector, serializeSpan } from "./test-span-collector.cjs";
5
5
  import { SpanExporter } from "@opentelemetry/sdk-trace-base";
@@ -26,7 +26,7 @@ interface MemoryExporter extends SpanExporter {
26
26
  /** Discard what has been collected. */
27
27
  reset(): void;
28
28
  }
29
- declare function createMemoryExporter(): MemoryExporter;
29
+ export declare function createMemoryExporter(): MemoryExporter;
30
30
  //#endregion
31
31
  //#region src/testing.d.ts
32
32
  /**
@@ -63,7 +63,7 @@ declare function createMemoryExporter(): MemoryExporter;
63
63
  /**
64
64
  * Simplified span representation for testing
65
65
  */
66
- interface TestSpan {
66
+ export interface TestSpan {
67
67
  traceId: string;
68
68
  spanId: string;
69
69
  parentSpanId?: string;
@@ -80,7 +80,7 @@ interface TestSpan {
80
80
  endTime: number;
81
81
  duration: number;
82
82
  }
83
- interface SpanMatch {
83
+ export interface SpanMatch {
84
84
  name?: string;
85
85
  traceId?: string;
86
86
  spanId?: string;
@@ -91,7 +91,7 @@ interface SpanMatch {
91
91
  /**
92
92
  * In-memory trace collector for testing
93
93
  */
94
- interface TraceCollector {
94
+ export interface TraceCollector {
95
95
  /** Get all collected spans */
96
96
  getSpans(): TestSpan[];
97
97
  /** Get spans matching a name */
@@ -137,7 +137,7 @@ interface TraceCollector {
137
137
  * })
138
138
  * ```
139
139
  */
140
- declare function createTraceCollector(): TraceCollector;
140
+ export declare function createTraceCollector(): TraceCollector;
141
141
  /**
142
142
  * Assert that a trace was created for an operation
143
143
  *
@@ -157,7 +157,7 @@ declare function createTraceCollector(): TraceCollector;
157
157
  * })
158
158
  * ```
159
159
  */
160
- declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
160
+ export declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
161
161
  minCount?: number;
162
162
  maxCount?: number;
163
163
  status?: SpanStatusCode;
@@ -180,7 +180,7 @@ declare function assertTraceCreated(collector: TraceCollector, operationName: st
180
180
  * assertNoErrors(collector)
181
181
  * ```
182
182
  */
183
- declare function assertNoErrors(collector: TraceCollector): void;
183
+ export declare function assertNoErrors(collector: TraceCollector): void;
184
184
  /**
185
185
  * Assert that a trace was created and succeeded
186
186
  *
@@ -192,7 +192,7 @@ declare function assertNoErrors(collector: TraceCollector): void;
192
192
  * assertTraceSucceeded(collector, 'user.createUser')
193
193
  * ```
194
194
  */
195
- declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
195
+ export declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
196
196
  /**
197
197
  * Assert that a trace was created and failed
198
198
  *
@@ -205,11 +205,11 @@ declare function assertTraceSucceeded(collector: TraceCollector, operationName:
205
205
  * assertTraceFailed(collector, 'user.createUser', 'Invalid email')
206
206
  * ```
207
207
  */
208
- declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
208
+ export declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
209
209
  /**
210
210
  * In-memory log collector for testing
211
211
  */
212
- interface LogCollector {
212
+ export interface LogCollector {
213
213
  /** Get all collected logs */
214
214
  getLogs(): LogEntry[];
215
215
  /** Get logs by level */
@@ -222,7 +222,7 @@ interface LogCollector {
222
222
  /**
223
223
  * Log entry
224
224
  */
225
- interface LogEntry {
225
+ export interface LogEntry {
226
226
  level: 'info' | 'warn' | 'error' | 'debug';
227
227
  message: string;
228
228
  extra?: UnknownRecord;
@@ -245,7 +245,7 @@ interface LogEntry {
245
245
  * expect(logs[0].message).toBe('Operation started')
246
246
  * ```
247
247
  */
248
- declare function createMockLogger(): Logger & LogCollector;
248
+ export declare function createMockLogger(): Logger & LogCollector;
249
249
  /**
250
250
  * Assert that no error logs were created
251
251
  *
@@ -257,7 +257,7 @@ declare function createMockLogger(): Logger & LogCollector;
257
257
  * assertNoErrorsLogged(logger)
258
258
  * ```
259
259
  */
260
- declare function assertNoErrorsLogged(logger: LogCollector): void;
260
+ export declare function assertNoErrorsLogged(logger: LogCollector): void;
261
261
  /**
262
262
  * Wait for a specific trace to be created
263
263
  *
@@ -281,7 +281,7 @@ declare function assertNoErrorsLogged(logger: LogCollector): void;
281
281
  * assertTraceSucceeded(collector, 'service.doAsyncWork')
282
282
  * ```
283
283
  */
284
- declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
284
+ export declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
285
285
  /**
286
286
  * Get trace duration in milliseconds
287
287
  *
@@ -295,7 +295,7 @@ declare function waitForTrace(collector: TraceCollector, operationName: string,
295
295
  * expect(duration).toBeLessThan(1000) // Should be < 1s
296
296
  * ```
297
297
  */
298
- declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
298
+ export declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
299
299
  /**
300
300
  * Assert that an operation completed within a time threshold
301
301
  *
@@ -313,6 +313,6 @@ declare function getTraceDuration(collector: TraceCollector, operationName: stri
313
313
  * assertTraceDuration(collector, 'user.createUser', 500) // Must be < 500ms
314
314
  * ```
315
315
  */
316
- declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
316
+ export declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
317
317
  //#endregion
318
- export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, LogCollector, LogEntry, type MemoryExporter, type RecordedSpan, type SerializedSpan, SpanMatch, TestSpan, TestSpanCollector, TraceCollector, assertEventTracked, assertNoErrors, assertNoErrorsLogged, assertOutcomeTracked, assertTraceCreated, assertTraceDuration, assertTraceFailed, assertTraceSucceeded, createEventCollector, createMemoryExporter, createMockLogger, createTraceCollector, getTraceDuration, serializeSpan, waitForTrace };
318
+ export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, type MemoryExporter, type RecordedSpan, type SerializedSpan, TestSpanCollector, assertEventTracked, assertOutcomeTracked, createEventCollector, serializeSpan };