@osfactory/otel-hook 0.7.0 → 0.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/README.md +202 -3
- package/dist/cli.js +1527 -730
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +51 -3
- package/dist/config.js +481 -160
- package/dist/config.js.map +1 -1
- package/dist/destinations-C6Bm89W6.d.ts +169 -0
- package/dist/diagnostics.d.ts +8 -0
- package/dist/diagnostics.js +2 -1
- package/dist/diagnostics.js.map +1 -1
- package/dist/{otlp-log-sink-eUEjaLhk.d.ts → export-destinations-d8tZV0G4.d.ts} +255 -7
- package/dist/{hook-Dh8OO4Wa.d.ts → hook-zA1b4cWd.d.ts} +2 -2
- package/dist/index.d.ts +8 -7
- package/dist/index.js +1379 -695
- package/dist/index.js.map +1 -1
- package/dist/integration.d.ts +25 -7
- package/dist/integration.js +742 -181
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.js +3 -1
- package/dist/lifecycle.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/{registry-CIVvRlVK.d.ts → registry-B8ZHc2bc.d.ts} +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +245 -121
- package/dist/runtime.js.map +1 -1
- package/dist/{schema-Cn0-xz8L.d.ts → schema-BxiVsU-d.d.ts} +68 -2
- package/dist/telemetry.d.ts +22 -65
- package/dist/telemetry.js +657 -69
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +659 -535
- package/dist/testing.js.map +1 -1
- package/package.json +9 -9
package/dist/integration.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { O as OtelHookConfig } from './schema-
|
|
1
|
+
import { O as OtelHookConfig } from './schema-BxiVsU-d.js';
|
|
2
2
|
import { OverallHealth } from './diagnostics.js';
|
|
3
3
|
import { OtelHookErrorInfo } from './errors.js';
|
|
4
4
|
import { DeliveryClaimOutcome, UsageAccumulatorSnapshot, LifecycleCleanupReport, CallbackDeduplicator, UsageAccumulator, SpanCorrelator, LifecycleJanitor } from './lifecycle.js';
|
|
5
5
|
import { P as PrivacyService } from './service-CbI9CObT.js';
|
|
6
|
-
import { P as ProviderRegistry } from './registry-
|
|
7
|
-
import { a as DeliveryOrigin, c as DeliveryUnavailableReason, H as HookIngestInput, e as HookIngestOutcome, U as UsageObservation, O as OtelHook } from './hook-
|
|
6
|
+
import { P as ProviderRegistry } from './registry-B8ZHc2bc.js';
|
|
7
|
+
import { a as DeliveryOrigin, c as DeliveryUnavailableReason, H as HookIngestInput, e as HookIngestOutcome, U as UsageObservation, O as OtelHook } from './hook-zA1b4cWd.js';
|
|
8
8
|
import { C as Clock, I as IdGenerator, d as Logger, W as WorktreeLocator } from './ports-n7KFOpKo.js';
|
|
9
9
|
import { F as FilesystemStateStore } from './filesystem-store-r-nNA3BA.js';
|
|
10
|
-
import {
|
|
10
|
+
import { p as OtlpTelemetrySink, o as OtlpLogTelemetrySink, b as DurableSpool, D as DurableLogSpool, E as ExportDestinationSinks, u as SkippedExportDestination } from './export-destinations-d8tZV0G4.js';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './primitives-CJ8-rn-f.js';
|
|
13
13
|
import './taxonomy-DwhTtuWd.js';
|
|
@@ -22,6 +22,7 @@ import './policy-CimmCfRp.js';
|
|
|
22
22
|
import './adapter-BJiz6lqM.js';
|
|
23
23
|
import './identity-BrVBs901.js';
|
|
24
24
|
import './keys-Dej5bN3L.js';
|
|
25
|
+
import './destinations-C6Bm89W6.js';
|
|
25
26
|
import '@opentelemetry/sdk-logs';
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -208,13 +209,21 @@ interface HookRuntime {
|
|
|
208
209
|
readonly hook: OtelHook;
|
|
209
210
|
readonly config: OtelHookConfig;
|
|
210
211
|
readonly stateStore: FilesystemStateStore;
|
|
211
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* The traces signal of the primary destination — `default`, or the first entry
|
|
214
|
+
* of `exporter.destinations` when there is no single-endpoint setting. Named
|
|
215
|
+
* `sink` because it is the one every installation has.
|
|
216
|
+
*/
|
|
212
217
|
readonly sink: OtlpTelemetrySink;
|
|
213
|
-
/** The logs signal. A no-op sink unless `exporter.logs.enabled` is set. */
|
|
218
|
+
/** The primary destination's logs signal. A no-op sink unless `exporter.logs.enabled` is set. */
|
|
214
219
|
readonly logSink: OtlpLogTelemetrySink;
|
|
215
220
|
readonly spool?: DurableSpool;
|
|
216
221
|
/** Retry queue for the logs signal. Absent when spooling or logs are disabled. */
|
|
217
222
|
readonly logSpool?: DurableLogSpool;
|
|
223
|
+
/** Every destination this runtime sends to, primary first. */
|
|
224
|
+
readonly destinations: readonly ExportDestinationSinks[];
|
|
225
|
+
/** Destinations left out of this invocation, by name, with the variables they lack. */
|
|
226
|
+
readonly skippedDestinations: readonly SkippedExportDestination[];
|
|
218
227
|
readonly privacy: PrivacyService;
|
|
219
228
|
readonly deduplicator: CallbackDeduplicator;
|
|
220
229
|
readonly usageAccumulator: UsageAccumulator;
|
|
@@ -239,13 +248,22 @@ type HookRuntimeOptions = {
|
|
|
239
248
|
readonly installationId: string;
|
|
240
249
|
/** State/spool namespace segment; the selected provider id, or a placeholder. */
|
|
241
250
|
readonly providerNamespace: string;
|
|
242
|
-
/**
|
|
251
|
+
/**
|
|
252
|
+
* Header *values* for the `default` destination, deliberately absent from the
|
|
253
|
+
* config snapshot.
|
|
254
|
+
*/
|
|
243
255
|
readonly headers?: Readonly<Record<string, string>>;
|
|
244
256
|
/**
|
|
245
257
|
* Header values for the logs signal only, when they differ from the traces
|
|
246
258
|
* signal's (`OTEL_EXPORTER_OTLP_LOGS_HEADERS`). Defaults to {@link headers}.
|
|
247
259
|
*/
|
|
248
260
|
readonly logHeaders?: Readonly<Record<string, string>>;
|
|
261
|
+
/**
|
|
262
|
+
* Environment that `env:NAME` header references in `exporter.destinations`
|
|
263
|
+
* resolve against. Never read implicitly; without it, a destination whose
|
|
264
|
+
* headers reference a variable is skipped for the invocation and reported.
|
|
265
|
+
*/
|
|
266
|
+
readonly headerEnvironment?: Readonly<Record<string, string | undefined>>;
|
|
249
267
|
readonly clock?: Clock;
|
|
250
268
|
readonly ids?: IdGenerator;
|
|
251
269
|
readonly logger?: Logger;
|