Connect LangSmith and Langfuse traces as OTel answer evidence
Keep LangSmith, Langfuse, or your own OpenTelemetry runtime as the trace system. Send rawctx only the public-safe fields needed to connect that trace to answer-audit logs, source_refs, and semantic_refs.
This integration does not replace LangSmith or Langfuse. Your observability workspace still owns spans, prompts, tool calls, latency, and cost analysis. rawctx records the evidence object your team can attach to an answer review, and does not claim the submitted OTel trace content is true.
The public boundary has two paths in code: SDK ingest_otel_trace_bundle() wraps one trace bundle into an answer-audit log, while POST /api/answer-audit-logs/otel maps OTLP-style resourceLogs or resourceSpans into answer-audit records.
Send trace ids, run ids, service name, redacted or hashed question and answer fields, and package refs to rawctx. Do not send LangSmith API keys or private project URLs.
Langfuse boundary
Keep Langfuse as the trace store and observability workspace. Link only trace ids and answer-audit fields through source_refs, excluding secret keys and raw tool outputs.
Your OTel runtime
If your collector or exporter already emits OTLP payloads, add the rawctx custom attributes you need. A separate rawctx-specific agent runtime is not required.
SDK
Wrap one trace bundle as an answer-audit log
Use this path when you extract public-safe identifiers and hashes from a trace already recorded in LangSmith or Langfuse.
These fields are enough to connect an answer, context, trace identifier, and review state. Use hashes instead of text unless your retention policy allows raw text storage.
rawctx needs evidence links for answer review. It does not need to mirror observability secrets or raw customer content by default.
Do not include LANGSMITH_API_KEY, LANGFUSE_SECRET_KEY, collector tokens, or private trace URLs in the payload.
Register raw prompts, tool outputs, customer files, or call recordings as separate evidence assets only when retention policy and review access are ready.
Prefer sha256 hashes plus trace ids when that is enough for support, security, or legal review.