@langfuse/tracing 4.2.1 → 4.4.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/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Span, TimeInput, Attributes, TracerProvider, SpanContext } from '@opentelemetry/api';
3
3
  import { OpenAiUsage } from '@langfuse/core';
4
- export { LangfuseOtelSpanAttributes } from '@langfuse/core';
4
+ export { LangfuseOtelSpanAttributes, PropagateAttributesParams, propagateAttributes } from '@langfuse/core';
5
5
 
6
6
  /**
7
7
  * Types of observations that can be created in Langfuse.
@@ -262,12 +262,6 @@ declare abstract class LangfuseBaseObservation {
262
262
  updateOtelSpanAttributes(attributes: LangfuseObservationAttributes): void;
263
263
  /**
264
264
  * Updates the parent trace with new attributes.
265
- *
266
- * This sets trace-level attributes that apply to the entire trace,
267
- * not just this specific observation.
268
- *
269
- * @param attributes - Trace attributes to set
270
- * @returns This observation for method chaining
271
265
  */
272
266
  updateTrace(attributes: LangfuseTraceAttributes): this;
273
267
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _opentelemetry_api from '@opentelemetry/api';
2
2
  import { Span, TimeInput, Attributes, TracerProvider, SpanContext } from '@opentelemetry/api';
3
3
  import { OpenAiUsage } from '@langfuse/core';
4
- export { LangfuseOtelSpanAttributes } from '@langfuse/core';
4
+ export { LangfuseOtelSpanAttributes, PropagateAttributesParams, propagateAttributes } from '@langfuse/core';
5
5
 
6
6
  /**
7
7
  * Types of observations that can be created in Langfuse.
@@ -262,12 +262,6 @@ declare abstract class LangfuseBaseObservation {
262
262
  updateOtelSpanAttributes(attributes: LangfuseObservationAttributes): void;
263
263
  /**
264
264
  * Updates the parent trace with new attributes.
265
- *
266
- * This sets trace-level attributes that apply to the entire trace,
267
- * not just this specific observation.
268
- *
269
- * @param attributes - Trace attributes to set
270
- * @returns This observation for method chaining
271
265
  */
272
266
  updateTrace(attributes: LangfuseTraceAttributes): this;
273
267
  /**
package/dist/index.mjs CHANGED
@@ -194,12 +194,6 @@ var LangfuseBaseObservation = class {
194
194
  }
195
195
  /**
196
196
  * Updates the parent trace with new attributes.
197
- *
198
- * This sets trace-level attributes that apply to the entire trace,
199
- * not just this specific observation.
200
- *
201
- * @param attributes - Trace attributes to set
202
- * @returns This observation for method chaining
203
197
  */
204
198
  updateTrace(attributes) {
205
199
  this.otelSpan.setAttributes(createTraceAttributes(attributes));
@@ -411,6 +405,9 @@ var LangfuseEvent = class extends LangfuseBaseObservation {
411
405
  };
412
406
 
413
407
  // src/index.ts
408
+ import {
409
+ propagateAttributes
410
+ } from "@langfuse/core";
414
411
  import { LangfuseOtelSpanAttributes as LangfuseOtelSpanAttributes3 } from "@langfuse/core";
415
412
  function createOtelSpan(params) {
416
413
  return getLangfuseTracer().startSpan(
@@ -754,6 +751,7 @@ export {
754
751
  getLangfuseTracer,
755
752
  getLangfuseTracerProvider,
756
753
  observe,
754
+ propagateAttributes,
757
755
  setLangfuseTracerProvider,
758
756
  startActiveObservation,
759
757
  startObservation,