Title: Quiz 12 — Tracing and Observability: Langfuse and Arize Phoenix
Course: AIINFRA 301: Production RAG & LLMOps — Observability and Evaluation > Section: Week 12 — Tracing and Observability: Langfuse and Arize Phoenix

Q: In the Langfuse/OTEL-style data model, what is a Trace?
- A single log line for one LLM call
- The top-level container for a request, holding metadata like userId/sessionId and containing nested Observations
- A Python decorator that wraps functions
- A database table storing token counts
A: The top-level container for a request, holding metadata like userId/sessionId and containing nested Observations

Q: A trace in Langfuse or Phoenix is best understood as one flat log line per request.
- True
- False
A: False

Q: Which observation type is a specialized span specifically for capturing an LLM call, including model, tokens, cost, and latency?
- Event
- Trace
- Generation
- Session
A: Generation

Q: Name the two backend substrates/protocols mentioned in the lecture that both Langfuse and Arize Phoenix are built on top of, enabling portable instrumentation.
Feedback: Sample/expected answer: OpenTelemetry (OTEL), and OpenInference (Phoenix's OTEL-based semantic convention for LLM spans); Langfuse also exposes an ****`/api/public/otel`**** endpoint to act as an OTEL backend.

Q: Setting a user_id attribute only on the root span automatically makes it available for filtering on every child span in that trace.
- True
- False
A: False

Q: In the current Langfuse Python SDK (v4.5.1), what is the correct import for the auto-tracing decorator?
- `from langfuse.decorators import observe`
- `from langfuse import observe, get_client`
- `from langfuse.sdk import trace`
- `import langfuse.autoinstrument`
A: `from langfuse import observe, get_client`

Q: What port does the Arize Phoenix UI run on by default, and what port does its OTel gRPC collector use?
Feedback: Sample/expected answer: UI on port 6006; OTel gRPC collector on port 4317.

Q: Which mechanism correctly propagates a shared attribute (like session_id) across an entire trace, including all child spans?
- Setting the attribute only once on the root span
- OpenTelemetry Baggage combined with a BaggageSpanProcessor
- Renaming every span to include the value in its name
- Storing it in a global Python variable
A: OpenTelemetry Baggage combined with a BaggageSpanProcessor