@lmnr-ai/lmnr 0.8.52 → 0.8.53
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/cli.cjs +2 -2
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/{evaluations-CgcBhNjN.d.cts → evaluations-BXDpgOzM.d.cts} +26 -3
- package/dist/{evaluations-GnmUSvoK.d.mts → evaluations-BwB2JsRa.d.mts} +26 -3
- package/dist/{file-utils-DaZefKLb.mjs → file-utils-CwqjWMsF.mjs} +2 -2
- package/dist/{file-utils-DaZefKLb.mjs.map → file-utils-CwqjWMsF.mjs.map} +1 -1
- package/dist/{file-utils-C_q3Dsf2.cjs → file-utils-CyBBBeeW.cjs} +2 -2
- package/dist/{file-utils-C_q3Dsf2.cjs.map → file-utils-CyBBBeeW.cjs.map} +1 -1
- package/dist/index.cjs +1374 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -6
- package/dist/index.d.mts +19 -6
- package/dist/index.mjs +1375 -202
- package/dist/index.mjs.map +1 -1
- package/dist/{utils-C6gt-rSg.mjs → utils-DavLzQA8.mjs} +5 -4
- package/dist/{utils-C6gt-rSg.mjs.map → utils-DavLzQA8.mjs.map} +1 -1
- package/dist/{utils-vnm5E0kk.cjs → utils-DcdjJ-4n.cjs} +10 -3
- package/dist/{utils-vnm5E0kk.cjs.map → utils-DcdjJ-4n.cjs.map} +1 -1
- package/package.json +15 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as TracingLevel, _ as MaskInputOptions, a as HumanEvaluator, b as SpanType, c as InitializeOptions, d as LaminarClient, f as Dataset, g as LaminarSpanContext, h as Event, i as EvaluatorFunctionReturn, l as EvaluationDataset, m as EvaluationDatapointDatasetLink, o as evaluate, p as EvaluationDatapoint, r as EvaluatorFunction, s as StringUUID, t as Datapoint, u as LaminarDataset, v as PushDatapointsResponse, x as TraceType, y as SessionRecordingOptions } from "./evaluations-
|
|
1
|
+
import { S as TracingLevel, _ as MaskInputOptions, a as HumanEvaluator, b as SpanType, c as InitializeOptions, d as LaminarClient, f as Dataset, g as LaminarSpanContext, h as Event, i as EvaluatorFunctionReturn, l as EvaluationDataset, m as EvaluationDatapointDatasetLink, o as evaluate, p as EvaluationDatapoint, r as EvaluatorFunction, s as StringUUID, t as Datapoint, u as LaminarDataset, v as PushDatapointsResponse, x as TraceType, y as SessionRecordingOptions } from "./evaluations-BXDpgOzM.cjs";
|
|
2
2
|
import { ServerResponse } from "node:http";
|
|
3
3
|
import { ReadableSpan, SpanExporter, SpanProcessor, TimedEvent } from "@opentelemetry/sdk-trace-base";
|
|
4
4
|
import { AttributeValue, Attributes, Context, Exception, HrTime, Link, Span, Span as Span$1, SpanContext, SpanKind, SpanStatus, TimeInput, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
@@ -10781,12 +10781,18 @@ interface LaminarSpanProcessorOptions {
|
|
|
10781
10781
|
* If not provided, the `port` option will be used.
|
|
10782
10782
|
*/
|
|
10783
10783
|
httpPort?: number;
|
|
10784
|
+
/**
|
|
10785
|
+
* The release of the running code, usually its git commit SHA, stamped on
|
|
10786
|
+
* every span. Optional. If not provided, detected from the environment.
|
|
10787
|
+
*/
|
|
10788
|
+
release?: string;
|
|
10784
10789
|
}
|
|
10785
10790
|
export declare class LaminarSpanProcessor implements SpanProcessor {
|
|
10786
10791
|
private instance;
|
|
10787
10792
|
private logger;
|
|
10788
10793
|
private readonly _spanIdToPath;
|
|
10789
10794
|
private readonly _spanIdLists;
|
|
10795
|
+
private readonly release;
|
|
10790
10796
|
/**
|
|
10791
10797
|
* @param {object} options - The options for the Laminar span processor.
|
|
10792
10798
|
* @param {string} options.baseUrl - The base URL of the Laminar API.
|
|
@@ -10801,6 +10807,8 @@ export declare class LaminarSpanProcessor implements SpanProcessor {
|
|
|
10801
10807
|
* @param {boolean} options.forceHttp - Whether to force HTTP and use OpenTelemetry
|
|
10802
10808
|
* HTTP/protobuf exporter.
|
|
10803
10809
|
* Not recommended with Laminar backends.
|
|
10810
|
+
* @param {string} options.release - The release of the running code, usually
|
|
10811
|
+
* its git commit SHA. Detected from the environment if not provided.
|
|
10804
10812
|
*/
|
|
10805
10813
|
constructor(options?: LaminarSpanProcessorOptions);
|
|
10806
10814
|
forceFlush(): Promise<void>;
|
|
@@ -10924,6 +10932,7 @@ interface LaminarInitializeProps {
|
|
|
10924
10932
|
metadata?: Record<string, any>;
|
|
10925
10933
|
inheritGlobalContext?: boolean;
|
|
10926
10934
|
spanProcessor?: SpanProcessor;
|
|
10935
|
+
release?: string;
|
|
10927
10936
|
}
|
|
10928
10937
|
type LaminarAttributesProp = Record<(typeof LaminarAttributes)[keyof typeof LaminarAttributes], AttributeValue>;
|
|
10929
10938
|
export declare class Laminar {
|
|
@@ -10994,26 +11003,30 @@ export declare class Laminar {
|
|
|
10994
11003
|
* and you want Laminar spans to be children of the existing spans.
|
|
10995
11004
|
* @param {SpanProcessor} props.spanProcessor - The span processor to use. If passed, some of
|
|
10996
11005
|
* the other options will be ignored.
|
|
11006
|
+
* @param {string} props.release - The release of the running code, usually its git commit
|
|
11007
|
+
* SHA. Laminar groups an agent's traces into versions by release. If not specified, read
|
|
11008
|
+
* from the LMNR_RELEASE environment variable, common deploy platform variables (Vercel,
|
|
11009
|
+
* Render, Railway, Heroku, Cloud Run, ...), or the checked-out git commit.
|
|
10997
11010
|
*
|
|
10998
11011
|
* @example
|
|
10999
11012
|
* import { Laminar } from '@lmnr-ai/lmnr';
|
|
11000
11013
|
* import { OpenAI } from 'openai';
|
|
11001
|
-
* import * as
|
|
11014
|
+
* import * as CallbackManagerModule from "@langchain/core/callbacks/manager";
|
|
11002
11015
|
*
|
|
11003
|
-
* // Initialize Laminar while
|
|
11016
|
+
* // Initialize Laminar while instrumenting LangChain and OpenAI modules.
|
|
11004
11017
|
* Laminar.initialize({
|
|
11005
11018
|
* projectApiKey: "<LMNR_PROJECT_API_KEY>",
|
|
11006
11019
|
* instrumentModules: {
|
|
11007
11020
|
* langchain: {
|
|
11008
|
-
*
|
|
11021
|
+
* callbackManagerModule: CallbackManagerModule
|
|
11009
11022
|
* },
|
|
11010
|
-
*
|
|
11023
|
+
* OpenAI: OpenAI
|
|
11011
11024
|
* }
|
|
11012
11025
|
* });
|
|
11013
11026
|
*
|
|
11014
11027
|
* @throws {Error} - If project API key is not set
|
|
11015
11028
|
*/
|
|
11016
|
-
static initialize({ projectApiKey, baseUrl, baseHttpUrl, httpPort, grpcPort, instrumentModules, disableBatch, traceExportTimeoutMillis, logLevel, maxExportBatchSize, maxExportBatchSizeBytes, flushBySize, forceHttp, sessionRecordingOptions, metadata, inheritGlobalContext, spanProcessor }?: LaminarInitializeProps): void;
|
|
11029
|
+
static initialize({ projectApiKey, baseUrl, baseHttpUrl, httpPort, grpcPort, instrumentModules, disableBatch, traceExportTimeoutMillis, logLevel, maxExportBatchSize, maxExportBatchSizeBytes, flushBySize, forceHttp, sessionRecordingOptions, metadata, inheritGlobalContext, spanProcessor, release }?: LaminarInitializeProps): void;
|
|
11017
11030
|
/**
|
|
11018
11031
|
* Initialize Laminar context from the LMNR_SPAN_CONTEXT environment variable.
|
|
11019
11032
|
* This allows continuing traces across process boundaries.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as TracingLevel, _ as MaskInputOptions, a as HumanEvaluator, b as SpanType, c as InitializeOptions, d as LaminarClient, f as Dataset, g as LaminarSpanContext, h as Event, i as EvaluatorFunctionReturn, l as EvaluationDataset, m as EvaluationDatapointDatasetLink, o as evaluate, p as EvaluationDatapoint, r as EvaluatorFunction, s as StringUUID, t as Datapoint, u as LaminarDataset, v as PushDatapointsResponse, x as TraceType, y as SessionRecordingOptions } from "./evaluations-
|
|
1
|
+
import { S as TracingLevel, _ as MaskInputOptions, a as HumanEvaluator, b as SpanType, c as InitializeOptions, d as LaminarClient, f as Dataset, g as LaminarSpanContext, h as Event, i as EvaluatorFunctionReturn, l as EvaluationDataset, m as EvaluationDatapointDatasetLink, o as evaluate, p as EvaluationDatapoint, r as EvaluatorFunction, s as StringUUID, t as Datapoint, u as LaminarDataset, v as PushDatapointsResponse, x as TraceType, y as SessionRecordingOptions } from "./evaluations-BwB2JsRa.mjs";
|
|
2
2
|
import { AttributeValue, Attributes, Context, Exception, HrTime, Link, Span, Span as Span$1, SpanContext, SpanKind, SpanStatus, TimeInput, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
3
3
|
import { Instrumentation, InstrumentationBase } from "@opentelemetry/instrumentation";
|
|
4
4
|
import { ReadableSpan, SpanExporter, SpanProcessor, TimedEvent } from "@opentelemetry/sdk-trace-base";
|
|
@@ -10781,12 +10781,18 @@ interface LaminarSpanProcessorOptions {
|
|
|
10781
10781
|
* If not provided, the `port` option will be used.
|
|
10782
10782
|
*/
|
|
10783
10783
|
httpPort?: number;
|
|
10784
|
+
/**
|
|
10785
|
+
* The release of the running code, usually its git commit SHA, stamped on
|
|
10786
|
+
* every span. Optional. If not provided, detected from the environment.
|
|
10787
|
+
*/
|
|
10788
|
+
release?: string;
|
|
10784
10789
|
}
|
|
10785
10790
|
export declare class LaminarSpanProcessor implements SpanProcessor {
|
|
10786
10791
|
private instance;
|
|
10787
10792
|
private logger;
|
|
10788
10793
|
private readonly _spanIdToPath;
|
|
10789
10794
|
private readonly _spanIdLists;
|
|
10795
|
+
private readonly release;
|
|
10790
10796
|
/**
|
|
10791
10797
|
* @param {object} options - The options for the Laminar span processor.
|
|
10792
10798
|
* @param {string} options.baseUrl - The base URL of the Laminar API.
|
|
@@ -10801,6 +10807,8 @@ export declare class LaminarSpanProcessor implements SpanProcessor {
|
|
|
10801
10807
|
* @param {boolean} options.forceHttp - Whether to force HTTP and use OpenTelemetry
|
|
10802
10808
|
* HTTP/protobuf exporter.
|
|
10803
10809
|
* Not recommended with Laminar backends.
|
|
10810
|
+
* @param {string} options.release - The release of the running code, usually
|
|
10811
|
+
* its git commit SHA. Detected from the environment if not provided.
|
|
10804
10812
|
*/
|
|
10805
10813
|
constructor(options?: LaminarSpanProcessorOptions);
|
|
10806
10814
|
forceFlush(): Promise<void>;
|
|
@@ -10924,6 +10932,7 @@ interface LaminarInitializeProps {
|
|
|
10924
10932
|
metadata?: Record<string, any>;
|
|
10925
10933
|
inheritGlobalContext?: boolean;
|
|
10926
10934
|
spanProcessor?: SpanProcessor;
|
|
10935
|
+
release?: string;
|
|
10927
10936
|
}
|
|
10928
10937
|
type LaminarAttributesProp = Record<(typeof LaminarAttributes)[keyof typeof LaminarAttributes], AttributeValue>;
|
|
10929
10938
|
export declare class Laminar {
|
|
@@ -10994,26 +11003,30 @@ export declare class Laminar {
|
|
|
10994
11003
|
* and you want Laminar spans to be children of the existing spans.
|
|
10995
11004
|
* @param {SpanProcessor} props.spanProcessor - The span processor to use. If passed, some of
|
|
10996
11005
|
* the other options will be ignored.
|
|
11006
|
+
* @param {string} props.release - The release of the running code, usually its git commit
|
|
11007
|
+
* SHA. Laminar groups an agent's traces into versions by release. If not specified, read
|
|
11008
|
+
* from the LMNR_RELEASE environment variable, common deploy platform variables (Vercel,
|
|
11009
|
+
* Render, Railway, Heroku, Cloud Run, ...), or the checked-out git commit.
|
|
10997
11010
|
*
|
|
10998
11011
|
* @example
|
|
10999
11012
|
* import { Laminar } from '@lmnr-ai/lmnr';
|
|
11000
11013
|
* import { OpenAI } from 'openai';
|
|
11001
|
-
* import * as
|
|
11014
|
+
* import * as CallbackManagerModule from "@langchain/core/callbacks/manager";
|
|
11002
11015
|
*
|
|
11003
|
-
* // Initialize Laminar while
|
|
11016
|
+
* // Initialize Laminar while instrumenting LangChain and OpenAI modules.
|
|
11004
11017
|
* Laminar.initialize({
|
|
11005
11018
|
* projectApiKey: "<LMNR_PROJECT_API_KEY>",
|
|
11006
11019
|
* instrumentModules: {
|
|
11007
11020
|
* langchain: {
|
|
11008
|
-
*
|
|
11021
|
+
* callbackManagerModule: CallbackManagerModule
|
|
11009
11022
|
* },
|
|
11010
|
-
*
|
|
11023
|
+
* OpenAI: OpenAI
|
|
11011
11024
|
* }
|
|
11012
11025
|
* });
|
|
11013
11026
|
*
|
|
11014
11027
|
* @throws {Error} - If project API key is not set
|
|
11015
11028
|
*/
|
|
11016
|
-
static initialize({ projectApiKey, baseUrl, baseHttpUrl, httpPort, grpcPort, instrumentModules, disableBatch, traceExportTimeoutMillis, logLevel, maxExportBatchSize, maxExportBatchSizeBytes, flushBySize, forceHttp, sessionRecordingOptions, metadata, inheritGlobalContext, spanProcessor }?: LaminarInitializeProps): void;
|
|
11029
|
+
static initialize({ projectApiKey, baseUrl, baseHttpUrl, httpPort, grpcPort, instrumentModules, disableBatch, traceExportTimeoutMillis, logLevel, maxExportBatchSize, maxExportBatchSizeBytes, flushBySize, forceHttp, sessionRecordingOptions, metadata, inheritGlobalContext, spanProcessor, release }?: LaminarInitializeProps): void;
|
|
11017
11030
|
/**
|
|
11018
11031
|
* Initialize Laminar context from the LMNR_SPAN_CONTEXT environment variable.
|
|
11019
11032
|
* This allows continuing traces across process boundaries.
|