OpenRouter sends traces to LangSmith using the OpenTelemetry (OTEL) protocol with the following attributes:
GenAI semantic conventions: Model name, token counts, costs, and request parameters
LangSmith-specific attributes: Trace name, span kind, user ID, and custom metadata
Input and output: Prompt and completion content on the run as langsmith.span.input / langsmith.span.output and gen_ai.prompt / gen_ai.completion. The root run no longer carries a duplicate copy under langsmith.trace.input / langsmith.trace.output.
Error handling: Exception events with error types and messages when requests fail
LangSmith uses the OTEL endpoint at /otel/v1/traces for receiving trace data. This ensures compatibility with LangSmith’s native tracing infrastructure.
When Privacy Mode is enabled for this destination, prompt and completion content is excluded from traces. All other trace data — token usage, costs, timing, model information, and custom metadata — is still sent normally. See Privacy Mode for details.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.