Langfuse JS/TS SDKs
    Preparing search index...

    Function updateActiveTrace

    • Updates the currently active trace with new attributes.

      This function finds the currently active OpenTelemetry span and updates it with trace-level attributes. If no active span is found, a warning is logged.

      Parameters

      Returns void

      import { updateActiveTrace } from '@langfuse/tracing';

      // Inside an active span context
      updateActiveTrace({
      name: 'user-workflow',
      userId: '123',
      sessionId: 'session-456',
      tags: ['production', 'critical'],
      public: true
      });