Practical Notes
Good traces answer: where time went and what failed. Model calls, retrieval, tool execution, and output parsing should each be a span. Record request IDs, model name, and high-level outcome, but avoid logging raw prompts—store hashes or redacted summaries to keep privacy and cost under control.
Safety note: Treat traces as sensitive: redact prompts, mask PII, and set retention limits.
FAQ
Q: Is this vendor-specific? A: No. It uses OpenTelemetry so you can export to any OTEL-compatible backend.
Q: What should I trace first? A: Start with LLM latency + token usage (if available), then add spans for retrieval and tools.
Q: How do I control cost? A: Use sampling, redact sensitive attributes, and keep span attributes small.