langwatch 1.4.0 → 1.6.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.
Files changed (34) hide show
  1. package/dist/{chunk-DINMABRW.js → chunk-B6GGJBDM.js} +75 -37
  2. package/dist/chunk-B6GGJBDM.js.map +1 -0
  3. package/dist/{chunk-TMIZYFEI.mjs → chunk-IBZ4J3HY.mjs} +2 -2
  4. package/dist/chunk-IBZ4J3HY.mjs.map +1 -0
  5. package/dist/{chunk-H7FNDLEM.mjs → chunk-LZS4B33H.mjs} +65 -27
  6. package/dist/chunk-LZS4B33H.mjs.map +1 -0
  7. package/dist/{chunk-G724AXIB.js → chunk-VBI6IJS4.js} +2 -2
  8. package/dist/chunk-VBI6IJS4.js.map +1 -0
  9. package/dist/cli/bundle.js +694 -432
  10. package/dist/{implementation-WfGxOvyq.d.mts → implementation-D3kg-y8n.d.mts} +1 -1
  11. package/dist/{implementation-bVu7gJFf.d.ts → implementation-D4uH_rQl.d.ts} +1 -1
  12. package/dist/index.d.mts +571 -44
  13. package/dist/index.d.ts +571 -44
  14. package/dist/index.js +860 -101
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +832 -73
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/observability-sdk/index.d.mts +3 -3
  19. package/dist/observability-sdk/index.d.ts +3 -3
  20. package/dist/observability-sdk/index.js +2 -2
  21. package/dist/observability-sdk/index.mjs +1 -1
  22. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  23. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  24. package/dist/observability-sdk/setup/node/index.d.mts +25 -0
  25. package/dist/observability-sdk/setup/node/index.d.ts +25 -0
  26. package/dist/observability-sdk/setup/node/index.js +3 -3
  27. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  28. package/dist/{types-NCH43GuW.d.mts → types-BS1JaoZZ.d.mts} +12419 -8114
  29. package/dist/{types-DB6nS7nW.d.ts → types-DBNWsM_D.d.ts} +12419 -8114
  30. package/package.json +4 -4
  31. package/dist/chunk-DINMABRW.js.map +0 -1
  32. package/dist/chunk-G724AXIB.js.map +0 -1
  33. package/dist/chunk-H7FNDLEM.mjs.map +0 -1
  34. package/dist/chunk-TMIZYFEI.mjs.map +0 -1
@@ -1,9 +1,9 @@
1
- export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-WfGxOvyq.mjs';
1
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-D3kg-y8n.mjs';
2
2
  import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
3
3
  import { D as DataCaptureMode } from '../types-DLfhJb38.mjs';
4
4
  export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.mjs';
5
- import { L as LangWatchSpan } from '../types-NCH43GuW.mjs';
6
- export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-NCH43GuW.mjs';
5
+ import { L as LangWatchSpan } from '../types-BS1JaoZZ.mjs';
6
+ export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-BS1JaoZZ.mjs';
7
7
  import { Span } from '@opentelemetry/api';
8
8
  export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.mjs';
9
9
  import '@opentelemetry/sdk-trace-base';
@@ -1,9 +1,9 @@
1
- export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-bVu7gJFf.js';
1
+ export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-D4uH_rQl.js';
2
2
  import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
3
3
  import { D as DataCaptureMode } from '../types-DLfhJb38.js';
4
4
  export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.js';
5
- import { L as LangWatchSpan } from '../types-DB6nS7nW.js';
6
- export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-DB6nS7nW.js';
5
+ import { L as LangWatchSpan } from '../types-DBNWsM_D.js';
6
+ export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-DBNWsM_D.js';
7
7
  import { Span } from '@opentelemetry/api';
8
8
  export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.js';
9
9
  import '@opentelemetry/sdk-trace-base';
@@ -14,7 +14,7 @@ var _chunkK6KPNTQOjs = require('../chunk-K6KPNTQO.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkG724AXIBjs = require('../chunk-G724AXIB.js');
17
+ var _chunkVBI6IJS4js = require('../chunk-VBI6IJS4.js');
18
18
 
19
19
 
20
20
 
@@ -38,5 +38,5 @@ var _chunkCLTKABMOjs = require('../chunk-CLTKABMO.js');
38
38
 
39
39
 
40
40
 
41
- exports.DataCapturePresets = _chunkZTOXEWNXjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkZTOXEWNXjs.FilterableBatchSpanProcessor; exports.LangWatchExporter = _chunkG724AXIBjs.LangWatchTraceExporter; exports.LangWatchLogsExporter = _chunkG724AXIBjs.LangWatchLogsExporter; exports.LangWatchTraceExporter = _chunkG724AXIBjs.LangWatchTraceExporter; exports.attributes = _chunkCLTKABMOjs.attributes_exports; exports.createLangWatchSpan = _chunkK6KPNTQOjs.createLangWatchSpan; exports.emitEvaluationEvent = _chunkK6KPNTQOjs.emitEvaluationEvent; exports.getDataCaptureMode = _chunkCLTKABMOjs.getDataCaptureMode; exports.getLangWatchLogger = _chunkG724AXIBjs.getLangWatchLogger; exports.getLangWatchLoggerFromProvider = _chunkG724AXIBjs.getLangWatchLoggerFromProvider; exports.getLangWatchTracer = _chunkK6KPNTQOjs.getLangWatchTracer; exports.getLangWatchTracerFromProvider = _chunkK6KPNTQOjs.getLangWatchTracerFromProvider; exports.shouldCaptureInput = _chunkCLTKABMOjs.shouldCaptureInput; exports.shouldCaptureOutput = _chunkCLTKABMOjs.shouldCaptureOutput; exports.spanTypes = _chunkK6KPNTQOjs.spanTypes;
41
+ exports.DataCapturePresets = _chunkZTOXEWNXjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkZTOXEWNXjs.FilterableBatchSpanProcessor; exports.LangWatchExporter = _chunkVBI6IJS4js.LangWatchTraceExporter; exports.LangWatchLogsExporter = _chunkVBI6IJS4js.LangWatchLogsExporter; exports.LangWatchTraceExporter = _chunkVBI6IJS4js.LangWatchTraceExporter; exports.attributes = _chunkCLTKABMOjs.attributes_exports; exports.createLangWatchSpan = _chunkK6KPNTQOjs.createLangWatchSpan; exports.emitEvaluationEvent = _chunkK6KPNTQOjs.emitEvaluationEvent; exports.getDataCaptureMode = _chunkCLTKABMOjs.getDataCaptureMode; exports.getLangWatchLogger = _chunkVBI6IJS4js.getLangWatchLogger; exports.getLangWatchLoggerFromProvider = _chunkVBI6IJS4js.getLangWatchLoggerFromProvider; exports.getLangWatchTracer = _chunkK6KPNTQOjs.getLangWatchTracer; exports.getLangWatchTracerFromProvider = _chunkK6KPNTQOjs.getLangWatchTracerFromProvider; exports.shouldCaptureInput = _chunkCLTKABMOjs.shouldCaptureInput; exports.shouldCaptureOutput = _chunkCLTKABMOjs.shouldCaptureOutput; exports.spanTypes = _chunkK6KPNTQOjs.spanTypes;
42
42
  //# sourceMappingURL=index.js.map
@@ -14,7 +14,7 @@ import {
14
14
  LangWatchTraceExporter,
15
15
  getLangWatchLogger,
16
16
  getLangWatchLoggerFromProvider
17
- } from "../chunk-TMIZYFEI.mjs";
17
+ } from "../chunk-IBZ4J3HY.mjs";
18
18
  import {
19
19
  attributes_exports,
20
20
  getDataCaptureMode,
@@ -1,6 +1,6 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Attributes } from '@opentelemetry/api';
3
- import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-NCH43GuW.mjs';
3
+ import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-BS1JaoZZ.mjs';
4
4
  import { AgentAction, AgentFinish } from '@langchain/core/agents';
5
5
  import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
6
6
  import { DocumentInterface } from '@langchain/core/documents';
@@ -1,6 +1,6 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Attributes } from '@opentelemetry/api';
3
- import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-DB6nS7nW.js';
3
+ import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-DBNWsM_D.js';
4
4
  import { AgentAction, AgentFinish } from '@langchain/core/agents';
5
5
  import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
6
6
  import { DocumentInterface } from '@langchain/core/documents';
@@ -351,12 +351,37 @@ interface SetupObservabilityOptions {
351
351
  * drains), `SIGINT` (Ctrl+C), and `SIGTERM` (external kill / Docker stop) to flush
352
352
  * pending traces before the process exits.
353
353
  *
354
+ * The SDK never terminates your process. Node runs every listener registered for a
355
+ * signal, so once the flush is done the SDK stands aside and lets your own shutdown
356
+ * logic decide when the process ends. The one exception keeps one-shot scripts
357
+ * working: if the SDK's handler turns out to be the only listener for that signal,
358
+ * it removes itself and re-raises the signal, so the process ends on the signal
359
+ * exactly as it would have if the SDK were not installed.
360
+ *
354
361
  * Note: `process.exit()` calls (e.g. from test runners like vitest) bypass these
355
362
  * handlers. In those environments, call `shutdown()` explicitly in your teardown.
356
363
  *
357
364
  * @default false
358
365
  */
359
366
  disableAutoShutdown?: boolean;
367
+ /**
368
+ * Exit the process with status 0 as soon as the automatic shutdown has flushed.
369
+ *
370
+ * WARNING: this terminates your application from inside the observability SDK. Any
371
+ * other `SIGINT` / `SIGTERM` listener that has not finished — a queue drain, in-flight
372
+ * database writes, connection teardown — is cut off mid-flight, and the process
373
+ * reports success even though it was signalled. This is what the SDK used to do
374
+ * unconditionally; the option exists only so an application that depended on it can
375
+ * keep the old behaviour while it moves the exit into its own signal handler, where
376
+ * it belongs.
377
+ *
378
+ * Leave this off unless your process now fails to exit on a signal, which happens
379
+ * only when you register a signal handler of your own that never terminates the
380
+ * process. Ignored when `disableAutoShutdown` is set.
381
+ *
382
+ * @default false
383
+ */
384
+ UNSAFE_exitProcessAfterAutoShutdown?: boolean;
360
385
  };
361
386
  }
362
387
  /**
@@ -351,12 +351,37 @@ interface SetupObservabilityOptions {
351
351
  * drains), `SIGINT` (Ctrl+C), and `SIGTERM` (external kill / Docker stop) to flush
352
352
  * pending traces before the process exits.
353
353
  *
354
+ * The SDK never terminates your process. Node runs every listener registered for a
355
+ * signal, so once the flush is done the SDK stands aside and lets your own shutdown
356
+ * logic decide when the process ends. The one exception keeps one-shot scripts
357
+ * working: if the SDK's handler turns out to be the only listener for that signal,
358
+ * it removes itself and re-raises the signal, so the process ends on the signal
359
+ * exactly as it would have if the SDK were not installed.
360
+ *
354
361
  * Note: `process.exit()` calls (e.g. from test runners like vitest) bypass these
355
362
  * handlers. In those environments, call `shutdown()` explicitly in your teardown.
356
363
  *
357
364
  * @default false
358
365
  */
359
366
  disableAutoShutdown?: boolean;
367
+ /**
368
+ * Exit the process with status 0 as soon as the automatic shutdown has flushed.
369
+ *
370
+ * WARNING: this terminates your application from inside the observability SDK. Any
371
+ * other `SIGINT` / `SIGTERM` listener that has not finished — a queue drain, in-flight
372
+ * database writes, connection teardown — is cut off mid-flight, and the process
373
+ * reports success even though it was signalled. This is what the SDK used to do
374
+ * unconditionally; the option exists only so an application that depended on it can
375
+ * keep the old behaviour while it moves the exit into its own signal handler, where
376
+ * it belongs.
377
+ *
378
+ * Leave this off unless your process now fails to exit on a signal, which happens
379
+ * only when you register a signal handler of your own that never terminates the
380
+ * process. Ignored when `disableAutoShutdown` is set.
381
+ *
382
+ * @default false
383
+ */
384
+ UNSAFE_exitProcessAfterAutoShutdown?: boolean;
360
385
  };
361
386
  }
362
387
  /**
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkDINMABRWjs = require('../../../chunk-DINMABRW.js');
5
- require('../../../chunk-G724AXIB.js');
4
+ var _chunkB6GGJBDMjs = require('../../../chunk-B6GGJBDM.js');
5
+ require('../../../chunk-VBI6IJS4.js');
6
6
  require('../../../chunk-CLTKABMO.js');
7
7
 
8
8
 
9
9
 
10
- exports.ensureSetup = _chunkDINMABRWjs.ensureSetup; exports.setupObservability = _chunkDINMABRWjs.setupObservability;
10
+ exports.ensureSetup = _chunkB6GGJBDMjs.ensureSetup; exports.setupObservability = _chunkB6GGJBDMjs.setupObservability;
11
11
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ensureSetup,
3
3
  setupObservability
4
- } from "../../../chunk-H7FNDLEM.mjs";
5
- import "../../../chunk-TMIZYFEI.mjs";
4
+ } from "../../../chunk-LZS4B33H.mjs";
5
+ import "../../../chunk-IBZ4J3HY.mjs";
6
6
  import "../../../chunk-CMZFFKLA.mjs";
7
7
  export {
8
8
  ensureSetup,