raindrop-ai 0.0.81 → 0.0.82-otelv2
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/{chunk-PGFJVUKL.mjs → chunk-KDYWEOQ4.mjs} +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -6
- package/dist/index.mjs +9 -6
- package/dist/tracing/index.d.mts +1 -1
- package/dist/tracing/index.d.ts +1 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -571,6 +571,7 @@ type Tracer = {
|
|
|
571
571
|
};
|
|
572
572
|
|
|
573
573
|
interface AnalyticsConfig {
|
|
574
|
+
wizardSession?: string;
|
|
574
575
|
writeKey: string;
|
|
575
576
|
bufferSize?: number;
|
|
576
577
|
bufferTimeout?: number;
|
|
@@ -670,6 +671,7 @@ interface AnalyticsConfig {
|
|
|
670
671
|
}
|
|
671
672
|
declare const MAX_INGEST_SIZE_BYTES: number;
|
|
672
673
|
declare class Raindrop {
|
|
674
|
+
private wizardSession;
|
|
673
675
|
private writeKey;
|
|
674
676
|
private apiUrl;
|
|
675
677
|
private buffer;
|
package/dist/index.d.ts
CHANGED
|
@@ -571,6 +571,7 @@ type Tracer = {
|
|
|
571
571
|
};
|
|
572
572
|
|
|
573
573
|
interface AnalyticsConfig {
|
|
574
|
+
wizardSession?: string;
|
|
574
575
|
writeKey: string;
|
|
575
576
|
bufferSize?: number;
|
|
576
577
|
bufferTimeout?: number;
|
|
@@ -670,6 +671,7 @@ interface AnalyticsConfig {
|
|
|
670
671
|
}
|
|
671
672
|
declare const MAX_INGEST_SIZE_BYTES: number;
|
|
672
673
|
declare class Raindrop {
|
|
674
|
+
private wizardSession;
|
|
673
675
|
private writeKey;
|
|
674
676
|
private apiUrl;
|
|
675
677
|
private buffer;
|
package/dist/index.js
CHANGED
|
@@ -138,7 +138,7 @@ var CategorizationRequestSchema = import_zod.z.object({
|
|
|
138
138
|
// package.json
|
|
139
139
|
var package_default = {
|
|
140
140
|
name: "raindrop-ai",
|
|
141
|
-
version: "0.0.
|
|
141
|
+
version: "0.0.82",
|
|
142
142
|
main: "dist/index.js",
|
|
143
143
|
module: "dist/index.mjs",
|
|
144
144
|
types: "dist/index.d.ts",
|
|
@@ -1405,7 +1405,7 @@ var Raindrop = class {
|
|
|
1405
1405
|
this.partialEventBuffer = /* @__PURE__ */ new Map();
|
|
1406
1406
|
this.partialEventTimeouts = /* @__PURE__ */ new Map();
|
|
1407
1407
|
this.inFlightRequests = /* @__PURE__ */ new Set();
|
|
1408
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1408
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1409
1409
|
if (!config.writeKey) {
|
|
1410
1410
|
throw new Error("A writeKey is required to use Raindrop");
|
|
1411
1411
|
}
|
|
@@ -1415,8 +1415,9 @@ var Raindrop = class {
|
|
|
1415
1415
|
this.bufferTimeout = (_c = config.bufferTimeout) != null ? _c : 1e3;
|
|
1416
1416
|
this.buffer = new Array();
|
|
1417
1417
|
this.disabled = (_d = config.disabled) != null ? _d : false;
|
|
1418
|
-
this.
|
|
1419
|
-
this.
|
|
1418
|
+
this.wizardSession = (_e = config.wizardSession) != null ? _e : null;
|
|
1419
|
+
this.debugLogs = (_f = config.debugLogs) != null ? _f : false;
|
|
1420
|
+
this.redactPii = (_g = config.redactPii) != null ? _g : false;
|
|
1420
1421
|
this.context = this.getContext();
|
|
1421
1422
|
if (this.debugLogs) {
|
|
1422
1423
|
process.env.RAINDROP_DEBUG = "true";
|
|
@@ -1426,10 +1427,10 @@ var Raindrop = class {
|
|
|
1426
1427
|
"[raindrop] 'disableTracing' is deprecated and renamed to 'useExternalOtel'. Please update your config: { useExternalOtel: true }"
|
|
1427
1428
|
);
|
|
1428
1429
|
}
|
|
1429
|
-
const useExternalOtel = (
|
|
1430
|
+
const useExternalOtel = (_i = (_h = config.useExternalOtel) != null ? _h : config.disableTracing) != null ? _i : false;
|
|
1430
1431
|
const url = new URL(this.apiUrl);
|
|
1431
1432
|
const isProduction = process.env.NODE_ENV === "production";
|
|
1432
|
-
const disableBatching = (
|
|
1433
|
+
const disableBatching = (_j = config.disableBatching) != null ? _j : !isProduction;
|
|
1433
1434
|
this._tracing = tracing(
|
|
1434
1435
|
this,
|
|
1435
1436
|
url.origin,
|
|
@@ -1578,6 +1579,7 @@ var Raindrop = class {
|
|
|
1578
1579
|
const toSave = this.redactPii ? redactPII(parsed.data) : parsed.data;
|
|
1579
1580
|
toSave.properties = {
|
|
1580
1581
|
...(_a = toSave.properties) != null ? _a : {},
|
|
1582
|
+
...this.wizardSession ? { "raindrop.wizardSession": this.wizardSession } : {},
|
|
1581
1583
|
$context: this.context
|
|
1582
1584
|
};
|
|
1583
1585
|
const size = this.getSize(toSave);
|
|
@@ -1902,6 +1904,7 @@ var Raindrop = class {
|
|
|
1902
1904
|
};
|
|
1903
1905
|
eventToSend.properties = {
|
|
1904
1906
|
...(_a = eventToSend.properties) != null ? _a : {},
|
|
1907
|
+
...this.wizardSession ? { "raindrop.wizardSession": this.wizardSession } : {},
|
|
1905
1908
|
$context: this.context
|
|
1906
1909
|
};
|
|
1907
1910
|
const parsed = PartialClientAiTrack.partial().safeParse(eventToSend);
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
tracing
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KDYWEOQ4.mjs";
|
|
5
5
|
|
|
6
6
|
// ../schemas/src/ingest/index.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -277,7 +277,7 @@ var Raindrop = class {
|
|
|
277
277
|
this.partialEventBuffer = /* @__PURE__ */ new Map();
|
|
278
278
|
this.partialEventTimeouts = /* @__PURE__ */ new Map();
|
|
279
279
|
this.inFlightRequests = /* @__PURE__ */ new Set();
|
|
280
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
280
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
281
281
|
if (!config.writeKey) {
|
|
282
282
|
throw new Error("A writeKey is required to use Raindrop");
|
|
283
283
|
}
|
|
@@ -287,8 +287,9 @@ var Raindrop = class {
|
|
|
287
287
|
this.bufferTimeout = (_c = config.bufferTimeout) != null ? _c : 1e3;
|
|
288
288
|
this.buffer = new Array();
|
|
289
289
|
this.disabled = (_d = config.disabled) != null ? _d : false;
|
|
290
|
-
this.
|
|
291
|
-
this.
|
|
290
|
+
this.wizardSession = (_e = config.wizardSession) != null ? _e : null;
|
|
291
|
+
this.debugLogs = (_f = config.debugLogs) != null ? _f : false;
|
|
292
|
+
this.redactPii = (_g = config.redactPii) != null ? _g : false;
|
|
292
293
|
this.context = this.getContext();
|
|
293
294
|
if (this.debugLogs) {
|
|
294
295
|
process.env.RAINDROP_DEBUG = "true";
|
|
@@ -298,10 +299,10 @@ var Raindrop = class {
|
|
|
298
299
|
"[raindrop] 'disableTracing' is deprecated and renamed to 'useExternalOtel'. Please update your config: { useExternalOtel: true }"
|
|
299
300
|
);
|
|
300
301
|
}
|
|
301
|
-
const useExternalOtel = (
|
|
302
|
+
const useExternalOtel = (_i = (_h = config.useExternalOtel) != null ? _h : config.disableTracing) != null ? _i : false;
|
|
302
303
|
const url = new URL(this.apiUrl);
|
|
303
304
|
const isProduction = process.env.NODE_ENV === "production";
|
|
304
|
-
const disableBatching = (
|
|
305
|
+
const disableBatching = (_j = config.disableBatching) != null ? _j : !isProduction;
|
|
305
306
|
this._tracing = tracing(
|
|
306
307
|
this,
|
|
307
308
|
url.origin,
|
|
@@ -450,6 +451,7 @@ var Raindrop = class {
|
|
|
450
451
|
const toSave = this.redactPii ? redactPII(parsed.data) : parsed.data;
|
|
451
452
|
toSave.properties = {
|
|
452
453
|
...(_a = toSave.properties) != null ? _a : {},
|
|
454
|
+
...this.wizardSession ? { "raindrop.wizardSession": this.wizardSession } : {},
|
|
453
455
|
$context: this.context
|
|
454
456
|
};
|
|
455
457
|
const size = this.getSize(toSave);
|
|
@@ -774,6 +776,7 @@ var Raindrop = class {
|
|
|
774
776
|
};
|
|
775
777
|
eventToSend.properties = {
|
|
776
778
|
...(_a = eventToSend.properties) != null ? _a : {},
|
|
779
|
+
...this.wizardSession ? { "raindrop.wizardSession": this.wizardSession } : {},
|
|
777
780
|
$context: this.context
|
|
778
781
|
};
|
|
779
782
|
const parsed = PartialClientAiTrack.partial().safeParse(eventToSend);
|
package/dist/tracing/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
2
|
import * as traceloop from '@traceloop/node-server-sdk';
|
|
3
|
-
import Raindrop,
|
|
3
|
+
import { Raindrop, RaindropSpanProcessor, PartialAiTrackEvent, Interaction, Tracer } from '../index.mjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
package/dist/tracing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
2
|
import * as traceloop from '@traceloop/node-server-sdk';
|
|
3
|
-
import Raindrop,
|
|
3
|
+
import { Raindrop, RaindropSpanProcessor, PartialAiTrackEvent, Interaction, Tracer } from '../index.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
package/dist/tracing/index.js
CHANGED
package/dist/tracing/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raindrop-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82-otelv2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"@dawn-analytics/redact-pii": "0.1.2",
|
|
48
48
|
"@opentelemetry/api": "^1.9.0",
|
|
49
49
|
"@opentelemetry/resources": "^2.0.1",
|
|
50
|
-
"@traceloop/node-server-sdk": "0.19.0-otel-v1",
|
|
51
50
|
"weakref": "^0.2.1",
|
|
52
51
|
"zod": "^3.23.8"
|
|
53
52
|
},
|
|
@@ -86,5 +85,8 @@
|
|
|
86
85
|
"resolve": true
|
|
87
86
|
},
|
|
88
87
|
"clean": true
|
|
88
|
+
},
|
|
89
|
+
"optionalDependencies": {
|
|
90
|
+
"@traceloop/node-server-sdk": "0.22.2"
|
|
89
91
|
}
|
|
90
92
|
}
|