I've been running Langfuse in production for about six months now to track our LLM calls, and the trace visualization is excellent for engineers. However, I keep hitting a wall when a product manager or a client asks, "Can you show me that one weird conversation from Tuesday?" Sending them a link to the Langfuse dashboard is not an option—they don't have accounts, shouldn't see other traces, and would be completely lost in the UI.
The core problem is that a trace contains a lot of internal data: timings, token counts, model parameters, and sometimes internal system prompts. I need a way to share a sanitized, readable view of a single trace with only the relevant parts: the user messages and the AI's responses, maybe with some basic cost or latency context.
I've explored the API and the UI, and I see a few potential paths, but each has significant trade-offs. I'm looking for the most robust, automated method.
**Option 1: Manual Screenshot/Copy-Paste from the UI**
* **Process:** Open the trace, collapse all the internal spans, take screenshots of the main chat exchange.
* **Pros:** Fast for one-off requests.
* **Cons:** Doesn't scale. Loses all structured data (latency, token usage). Becomes a manual support task. Impossible if you need to share hundreds of traces for a review.
**Option 2: Build a Custom Export via the Langfuse API**
This seems like the most flexible but also the most engineering-heavy route. You'd fetch the trace and its observations, then filter and reformat.
```python
import langfuse
from langfuse import Langfuse
# Initialize client
langfuse = Langfuse()
# Get a specific trace
trace = langfuse.trace.get("your-trace-id-here")
# Iterate through observations, filter for 'generation' or 'span' types
# Extract input/messages and output/completion
# Format into a clean JSON or HTML document
```
* **Pros:** Complete control over format and content. Can automate batch sharing. Can integrate with internal tools.
* **Cons:** Requires writing and maintaining a script. You must handle all the data sanitization logic yourself (e.g., redacting internal system prompts). You become responsible for the presentation layer.
**Option 3: Utilize the "Public Links" Feature (if available)**
I've seen mentions of this in some documentation. The idea would be to generate a read-only, shareable URL for a single trace.
* **Pros:** Zero engineering effort. Maintains interactivity (collapsing/expanding spans).
* **Cons:** My concern is data leakage. Does it allow hiding specific observations or metadata fields? If not, you might still expose internal details. I haven't found clear documentation on fine-grained access control for such links.
**Option 4: Leverage the SDK to Create "Shareable" Traces from the Start**
This is a preventative approach. You could add a specific tag or metadata flag at trace creation for conversations that are likely to be shared, and then have a background process that formats those traces.
* **Pros:** Can be designed into the workflow from the beginning.
* **Cons:** Doesn't solve the ad-hoc "share that one from last week" problem. Adds complexity to the application code.
What I really want is a feature where I can click "Create Shareable View" on a trace, select which observation types and metadata fields to include, and get a unique URL or a static HTML file that I can send directly. Barring that existing, what is the current best practice?
Has anyone built a reliable pipeline for this? I'm particularly interested in:
* Whether the public links feature offers sufficient data hiding.
* Any open-source tools or scripts that already do this filtering and presentation.
* How you handle the consistent removal of internal system prompts from the shared view.
The lack of a native, streamlined solution for this common operational need seems like a major gap between the excellent debugging tool Langfuse is and the collaboration tool it needs to be for cross-functional teams.
Show me the benchmarks