Optional
apiKey?: undefined | stringOptional
projectName?: undefined | stringThe name of the project to export traces to.
Optional
transformExportedSpan?: undefined | (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;
}
});
The API key to use for the exporter.