OpsDesk AcademyGet the project Code · prompts · workflows
LAB · 20 MINUTES · NO NEW MODEL RUN REQUIRED

Follow one agent run.

You have an answer. Now discover which steps produced it, where the time went and what was sent to observability.

First connect your app → Download the complete lab (.md)

YOUR FINISH LINEFind one exact run in your own Langfuse project. Explain its root, authorization, model calls, tools, usage and export/readback status. Use an existing run: opening views does not require another paid inference.

A trace is the receipt for one action.

App: the button and answer. Harness: the code that checks access, runs the model and permits tools. OpenTelemetry: the format carrying the recorded steps. Langfuse: the place you inspect those steps.

Trace
One investigation from start to finish.
Observation / span
One recorded step inside that investigation.
Generation
A real model call, with its returned model name and reported usage.
Session
A label grouping related traces. This demo uses a random label, not an email.
01 · YOUR APP → LANGFUSE

Find the same run in both places.

  1. In your actual OpsDesk app, inspect a completed analysis. Open Agent trace when your build includes it, or expand Run inspector in the earlier version.
  2. Check Langfuse export status. Not configured means no configured exporter; acknowledged means the exporter received a successful response. Neither is independent readback. The app deliberately keeps its readback status unverified because it has only ingestion access; your separate signed-in Langfuse session performs the read check.
  3. Reveal and copy the real trace ID privately. Open your own Langfuse project in a second tab. Do not copy account details or keys into the course.
  4. Open Tracing. Choose a time range containing the run. Use the available filter/search control for the exact trace ID. If the current layout lists observations, open an observation and inspect its parent trace. Alternatively locate the random session label through Sessions.
  5. Match the exact ID, then check the name and time. A similar name alone is insufficient.

See the actual new in-app trace panel. Its event list and the server span tree are different representations: compare only the fields each actually records.

Look for: one matching trace with actual observations. The live UI labels can vary by Langfuse version; Tracing may list observations rather than one row per trace.

02 · LANGFUSE · TREE

Read the six-step story.

Actual verified Langfuse trace: agent root, authorization, two model generations and two tools
Real native Lovable rehearsal. Six observations were independently matched. Account, project and trace identifiers are outside this capture.

Select Tree. Expand the agent root. In this recorded run, access was checked, generation 1 requested evidence, service_health and release_diff returned synthetic evidence, and generation 2 produced the answer. These are two calls by one agent, not two agents. A different valid run may have another number of calls.

Click a step to understand it

Recorded example · no provider calls or live project connection.

Select the agent root or a child step.

03 · LANGFUSE · TIMELINE

Find the waiting time.

Select Timeline on that same trace. Look at each bar's start and duration. Do not add overlapping spans to estimate total time; the root already measures the full instrumented run.

Actual Langfuse timeline showing generation durations of 1.49 and 2.65 seconds inside a 4.90-second agent run
Actual provider view. Tiny fixture/auth observations round to 0 ms at this display precision; they did execute. The model calls dominate this particular run. Cost labels are provider calculations, not invoices.

Try: point to the slower generation. Here generation 2 took about 2.65 seconds versus 1.49 seconds for generation 1. This is one sample, not a model benchmark or a service-level promise.

04 · LANGFUSE · A GENERATION

Read tokens before discussing cost.

Return to Tree. Select generation 1, then open its token count. In the observed UI this opens a usage breakdown. Find the returned model in the observation's Attributes or table model column.

Recorded callInputOutputTotal
generation 131148359
generation 2450139589
Whole run761187948

These counts came from the actual rehearsal and independent provider readback. Your response can differ. Tokens are pieces of text, not an exact word count. A model may report additional categories such as cached or reasoning tokens; preserve their meaning rather than silently adding or double-counting them.

The app leaves cost unknown without matching rates. Langfuse can calculate cost from a recognized model and its configured prices. That number may differ from subscription credits, discounts, gateway pricing or the eventual bill. Missing usage is unknown, not zero.

05 · LANGFUSE · CONTENT AND ATTRIBUTES

Check what you chose not to send.

Select the root and each child. Inspect Preview and Attributes. In the verified run, Input and Output were absent on all six observations. This is deliberate: the workshop exports metadata only, excluding prompts, answers, ticket text, tool payloads, account identity and secrets. The answer remains visible in the app.

Expected attributes include the actual returned model, reported usage, random session label and validated synthetic tool metadata. A trace explains recorded execution; it does not reveal hidden chain-of-thought, certify factual accuracy or enforce access permissions.

06 · APP + LANGFUSE

Explain a missing trace without rerunning AI.

What you seeNext action
Not configuredSave the three fields in this project's server Secrets. Refresh its supported preview; run Check telemetry setup.
Configuration presentPresence alone proves no credential validity or delivery.
Export failed / partialInspect destination, role/expiry, supported OTLP path and bounded error status. The reference includes fixed failure labels and safe hints for flush, serialization, request setup, timeout, transport, HTTP and response parsing. It prints no exception text or auth headers. Redirects are inspected in manual no-follow mode: a 3xx is a failed export, not permission to send credentials to the target.
Acknowledged, nothing visibleCheck the intended project, time range, exact trace/session and filters. Wait and read again before any new inference.
No tokens or costCheck actual provider usage and model mapping. Keep unavailable values unknown.

A change request in OpsDesk should stop before model construction: zero generations. The explicit-change stop and its two-observation policy trace are now independently verified. See the actual app and provider screenshots. Expect a root and authorization, no generation, and root metadata status approval_required with model_calls 0. This verifies the explicit change path, not universal attack resistance.

0 of 6 tasks checked · self-reported, reset on reload

Check your understanding
  1. Are two generations two agents? No. They are two model calls inside one agent run.
  2. Does an export acknowledgment prove the intended project has the trace? No. Match its exact ID in that project.
  3. Can an ingestion-only key read traces for an embedded dashboard? No. Keep it write-only. Use your signed-in Langfuse session. A future app reader requires separate scoped access and authorization.
  4. Does tracing make a tool safe? No. Code, access checks, schemas and permissions enforce the boundary.
  5. Can I inspect this lab without paid calls? Yes. Use the recorded screenshots or your existing trace.

Go deeper when you need it

Continue Part 4 → Return to the Lovable app →