Langfuse JS/TS SDKs
    Preparing search index...

    Function publishActiveTrace

    • Make the trace of the currently active span publicly accessible via its URL.

      When a trace is published, anyone with the trace link can view the full trace without needing to be logged in to Langfuse. This action cannot be undone programmatically - once any span in a trace is published, the entire trace becomes public.

      If called outside of an active span context, the operation is skipped with a warning.

      Returns void

      import { publishActiveTrace, startActiveObservation } from '@langfuse/tracing';

      startActiveObservation('my-operation', () => {
      // Make this trace publicly accessible
      publishActiveTrace();
      });