@brizz/sdk 0.1.12 → 0.1.13
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/index.cjs +1 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -57
- package/dist/index.js.map +1 -1
- package/dist/preload.cjs +3 -59
- package/dist/preload.cjs.map +1 -1
- package/dist/preload.js +1 -57
- package/dist/preload.js.map +1 -1
- package/package.json +1 -1
package/dist/preload.js
CHANGED
|
@@ -342,52 +342,6 @@ var InstrumentationRegistry = class _InstrumentationRegistry {
|
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
344
|
|
|
345
|
-
// src/internal/instrumentation/langchain-instrumentation.ts
|
|
346
|
-
import { createRequire } from "module";
|
|
347
|
-
import { pathToFileURL } from "url";
|
|
348
|
-
import { LangChainInstrumentation as LangChainInstrumentation2 } from "@arizeai/openinference-instrumentation-langchain";
|
|
349
|
-
var initialized = false;
|
|
350
|
-
async function importCallbackManager() {
|
|
351
|
-
try {
|
|
352
|
-
return await import("@langchain/core/callbacks/manager");
|
|
353
|
-
} catch {
|
|
354
|
-
}
|
|
355
|
-
const resolvers = [
|
|
356
|
-
() => createRequire(pathToFileURL(process.cwd() + "/package.json").href),
|
|
357
|
-
() => {
|
|
358
|
-
const main = process.argv[1];
|
|
359
|
-
if (!main) {
|
|
360
|
-
throw new Error("no main");
|
|
361
|
-
}
|
|
362
|
-
return createRequire(pathToFileURL(main).href);
|
|
363
|
-
}
|
|
364
|
-
];
|
|
365
|
-
for (const getRequire of resolvers) {
|
|
366
|
-
try {
|
|
367
|
-
const req = getRequire();
|
|
368
|
-
const cjsPath = req.resolve("@langchain/core/callbacks/manager");
|
|
369
|
-
const esmPath = cjsPath.replace(/\.cjs$/, ".js");
|
|
370
|
-
return await import(pathToFileURL(esmPath).href);
|
|
371
|
-
} catch {
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
return null;
|
|
375
|
-
}
|
|
376
|
-
async function setupLangChainInstrumentation() {
|
|
377
|
-
if (initialized) {
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
const callbackManagerModule = await importCallbackManager();
|
|
381
|
-
if (!callbackManagerModule) {
|
|
382
|
-
logger.debug("@langchain/core not found \u2014 skipping LangChain instrumentation");
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
const instrumentation = new LangChainInstrumentation2();
|
|
386
|
-
instrumentation.manuallyInstrument(callbackManagerModule);
|
|
387
|
-
initialized = true;
|
|
388
|
-
logger.info("LangChain instrumentation enabled (OpenInference)");
|
|
389
|
-
}
|
|
390
|
-
|
|
391
345
|
// src/internal/log/logging.ts
|
|
392
346
|
import { SeverityNumber } from "@opentelemetry/api-logs";
|
|
393
347
|
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
|
|
@@ -398,7 +352,7 @@ import {
|
|
|
398
352
|
|
|
399
353
|
// src/internal/version.ts
|
|
400
354
|
function getSDKVersion() {
|
|
401
|
-
return "0.1.
|
|
355
|
+
return "0.1.13";
|
|
402
356
|
}
|
|
403
357
|
|
|
404
358
|
// src/internal/log/processors/log-processor.ts
|
|
@@ -1658,7 +1612,6 @@ var _Brizz = class __Brizz {
|
|
|
1658
1612
|
const resolvedConfig = resolveConfig(options);
|
|
1659
1613
|
this.initializeModules(resolvedConfig);
|
|
1660
1614
|
this.setupInstrumentation(options);
|
|
1661
|
-
this.initLangChainInstrumentation();
|
|
1662
1615
|
this.createAndStartNodeSDK(options, resolvedConfig);
|
|
1663
1616
|
this._initialized = true;
|
|
1664
1617
|
logger.info("Brizz SDK initialization completed successfully", {
|
|
@@ -1669,15 +1622,6 @@ var _Brizz = class __Brizz {
|
|
|
1669
1622
|
throw new Error(`Failed to initialize SDK: ${String(error)}`, { cause: error });
|
|
1670
1623
|
}
|
|
1671
1624
|
}
|
|
1672
|
-
/**
|
|
1673
|
-
* Async LangChain instrumentation setup (fire-and-forget).
|
|
1674
|
-
* @private
|
|
1675
|
-
*/
|
|
1676
|
-
initLangChainInstrumentation() {
|
|
1677
|
-
setupLangChainInstrumentation().catch((error) => {
|
|
1678
|
-
logger.debug(`LangChain instrumentation skipped: ${String(error)}`);
|
|
1679
|
-
});
|
|
1680
|
-
}
|
|
1681
1625
|
/**
|
|
1682
1626
|
* Set up instrumentation registry and configure manual modules.
|
|
1683
1627
|
* @private
|