Langfuse JS/TS SDKs
    Preparing search index...

    Function getLangfuseTracer

    • Gets the OpenTelemetry tracer instance for Langfuse.

      This function returns a tracer specifically configured for Langfuse with the correct tracer name and version. Used internally by all Langfuse tracing functions to ensure consistent trace creation.

      Returns Tracer

      The Langfuse OpenTelemetry tracer instance

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

      const tracer = getLangfuseTracer();
      const span = tracer.startSpan('my-operation');