@osfactory/otel-hook 0.1.3 → 0.3.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/{adapter-DIgRACtL.d.ts → adapter-DXpNtnaf.d.ts} +2 -2
- package/dist/cli.js +442 -134
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/{content-CoB7aNP1.d.ts → content-M9xIKG7h.d.ts} +8 -1
- package/dist/{hook-CGpo-vks.d.ts → hook-_mlO3akA.d.ts} +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +443 -134
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +5 -5
- package/dist/install.js +33 -0
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +8 -8
- package/dist/integration.js +115 -39
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/lifecycle.js +5 -3
- package/dist/lifecycle.js.map +1 -1
- package/dist/model.d.ts +1 -1
- package/dist/model.js +2 -0
- package/dist/model.js.map +1 -1
- package/dist/{otlp-log-sink-CeIFDDpn.d.ts → otlp-log-sink-DTSa0KRF.d.ts} +2 -2
- package/dist/{payload-CHr53E_v.d.ts → payload-BWV5-4n3.d.ts} +1 -1
- package/dist/{policy-D1CrlYn3.d.ts → policy-CimmCfRp.d.ts} +1 -1
- package/dist/privacy.d.ts +4 -4
- package/dist/privacy.js +11 -0
- package/dist/privacy.js.map +1 -1
- package/dist/providers.d.ts +8 -8
- package/dist/providers.js +322 -94
- package/dist/providers.js.map +1 -1
- package/dist/{registry-BzYmC9OC.d.ts → registry-Dqr3VNmT.d.ts} +1 -1
- package/dist/runtime.d.ts +6 -6
- package/dist/runtime.js +13 -1
- package/dist/runtime.js.map +1 -1
- package/dist/{semconv-Baoz-0OI.d.ts → semconv-CIU-2kGO.d.ts} +1 -0
- package/dist/{service-j4jEO6cZ.d.ts → service-CbI9CObT.d.ts} +8 -2
- package/dist/telemetry.d.ts +5 -5
- package/dist/telemetry.js +102 -38
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +6 -6
- package/dist/testing.js +338 -95
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as DetectionPolicy } from './schema-Cn0-xz8L.js';
|
|
2
2
|
import { OtelHookErrorInfo } from './errors.js';
|
|
3
|
-
import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-
|
|
3
|
+
import { P as ProviderAdapter, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext } from './adapter-DXpNtnaf.js';
|
|
4
4
|
|
|
5
5
|
type DetectionCandidate = {
|
|
6
6
|
readonly adapter: ProviderAdapter;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as LogLevel, c as Logger } from './ports-Q8x0ODhs.js';
|
|
2
2
|
export { A as AppliedDelivery, C as Clock, E as EventIdSeed, I as IdGenerator, a as InvocationIdSeed, L as LOG_LEVEL_RANK, S as StateRecord, d as StateStore, e as StateValue, T as TelemetryEmitResult, f as TelemetrySink, g as appliedDeliverySchema, l as logLevelSchema, s as stateRecordSchema, h as stateValueSchema } from './ports-Q8x0ODhs.js';
|
|
3
3
|
export { D as DeterministicIdOptions, F as FixedClock, a as FixedClockOptions, I as InMemoryStateStore, b as InMemoryStateStoreOptions, L as LogRecord, R as RecordingLogger, c as RecordingTelemetrySink, d as RecordingTelemetrySinkOptions, e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, h as createNullTelemetrySink, i as createRandomIdGenerator, j as createRecordingLogger, k as createRecordingTelemetrySink, l as createSystemClock } from './memory-DXVBc8V9.js';
|
|
4
|
-
export { C as CumulativeUsageSeries, D as DeliveryDurability, a as DeliveryOrigin, b as DeliveryResolution, c as DeliveryUnavailableReason, H as HookIngestInput, d as HookIngestOptions, e as HookIngestOutcome, O as OtelHook, f as OtelHookDependencies, R as ResolvedDeliveryIdentity, U as UsageObservation, g as UsageScope, h as classifyDurability, i as createOtelHook, j as hostDeliveryIdentity, k as isCommittable, r as resolveDeliveryIdentity, u as usageScopeSchema } from './hook-
|
|
4
|
+
export { C as CumulativeUsageSeries, D as DeliveryDurability, a as DeliveryOrigin, b as DeliveryResolution, c as DeliveryUnavailableReason, H as HookIngestInput, d as HookIngestOptions, e as HookIngestOutcome, O as OtelHook, f as OtelHookDependencies, R as ResolvedDeliveryIdentity, U as UsageObservation, g as UsageScope, h as classifyDurability, i as createOtelHook, j as hostDeliveryIdentity, k as isCommittable, r as resolveDeliveryIdentity, u as usageScopeSchema } from './hook-_mlO3akA.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './errors.js';
|
|
7
7
|
import './primitives-CJ8-rn-f.js';
|
|
@@ -9,11 +9,11 @@ import './taxonomy-DwhTtuWd.js';
|
|
|
9
9
|
import './events-VxBnDFaO.js';
|
|
10
10
|
import './schema-Cn0-xz8L.js';
|
|
11
11
|
import './identity-BrVBs901.js';
|
|
12
|
-
import './service-
|
|
13
|
-
import './content-
|
|
14
|
-
import './policy-
|
|
15
|
-
import './adapter-
|
|
16
|
-
import './registry-
|
|
12
|
+
import './service-CbI9CObT.js';
|
|
13
|
+
import './content-M9xIKG7h.js';
|
|
14
|
+
import './policy-CimmCfRp.js';
|
|
15
|
+
import './adapter-DXpNtnaf.js';
|
|
16
|
+
import './registry-Dqr3VNmT.js';
|
|
17
17
|
|
|
18
18
|
declare const createNullLogger: () => Logger;
|
|
19
19
|
type StderrLoggerOptions = {
|
package/dist/runtime.js
CHANGED
|
@@ -1142,6 +1142,7 @@ var contentFactSchema = z9.strictObject({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
var contentFactsSchema = z9.array(contentFactSchema).max(64);
|
|
1144
1144
|
var isContentFactConsistent = (fact) => fact.disclosure === "omitted" ? fact.text === void 0 : fact.text !== void 0;
|
|
1145
|
+
var isUnavailableContentFact = (fact) => fact.disclosure === "omitted" && fact.text === void 0 && fact.characterLength === 0 && fact.byteLength === 0;
|
|
1145
1146
|
|
|
1146
1147
|
// src/model/identity.ts
|
|
1147
1148
|
import { z as z10 } from "zod";
|
|
@@ -1674,6 +1675,17 @@ var createPrivacyService = (policyInput) => {
|
|
|
1674
1675
|
hash,
|
|
1675
1676
|
deriveOpaqueId: (namespace, value) => hash(`${namespace}\0${value}`),
|
|
1676
1677
|
describeContent: describeText,
|
|
1678
|
+
describeUnavailableContent: (input) => ({
|
|
1679
|
+
kind: input.kind,
|
|
1680
|
+
...input.role === void 0 ? {} : { role: input.role },
|
|
1681
|
+
characterLength: 0,
|
|
1682
|
+
byteLength: 0,
|
|
1683
|
+
contentHash: hash(""),
|
|
1684
|
+
disclosure: "omitted",
|
|
1685
|
+
truncated: false,
|
|
1686
|
+
secretsRedacted: 0,
|
|
1687
|
+
...input.label === void 0 ? {} : { label: input.label }
|
|
1688
|
+
}),
|
|
1677
1689
|
describeStructured: (input) => {
|
|
1678
1690
|
const serialized = stableStringify(input.value);
|
|
1679
1691
|
const sanitized = sanitizeStructured(input.value);
|
|
@@ -2396,7 +2408,7 @@ var createOtelHook = (deps) => {
|
|
|
2396
2408
|
}
|
|
2397
2409
|
const facts = collectContentFacts(event2);
|
|
2398
2410
|
const offending = facts.find(
|
|
2399
|
-
(fact) => fact.disclosure !== expectedDisclosure || !isContentFactConsistent(fact)
|
|
2411
|
+
(fact) => !isUnavailableContentFact(fact) && (fact.disclosure !== expectedDisclosure || !isContentFactConsistent(fact))
|
|
2400
2412
|
);
|
|
2401
2413
|
if (offending !== void 0) {
|
|
2402
2414
|
reject(
|