langchain.js
    Preparing search index...
    LangSmithOTLPTraceExporterConfig: ConstructorParameters<
        typeof OTLPTraceExporter,
    >[0] & {
        apiKey?: string;
        headers?: Record<string, string>;
        projectName?: string;
        transformExportedSpan?: (
            span: ReadableSpan,
        ) => ReadableSpan | Promise<ReadableSpan>;
    }

    Type Declaration

    • OptionalapiKey?: string

      The API key to use for the exporter.

    • Optionalheaders?: Record<string, string>

      Default headers to add to exporter requests.

    • OptionalprojectName?: string

      The name of the project to export traces to.

    • OptionaltransformExportedSpan?: (span: ReadableSpan) => ReadableSpan | Promise<ReadableSpan>

      A function that takes an exported span and returns a transformed version of it. May be used to add or remove attributes from the span.

      For example, to add a custom attribute to the span, you can do:

      import { LangSmithOTLPTraceExporter } from "langsmith/experimental/otel/exporter";

      const exporter = new LangSmithOTLPTraceExporter({
      transformExportedSpan: (span) => {
      if (span.name === "foo") {
      span.attributes["langsmith.metadata.bar"] = "baz";
      }
      return span;
      }
      });