LevelUpWith

Explore / AI Engineering

LLMOps in Production: Observe, Release, Recover, Govern

Keep LLM apps and agents healthy in production: trace them with OpenTelemetry, version prompts and models, ship through canaries and online evals, watch quality, drift and spend, and run incidents from alert to rollback under clear governance.

Read lesson 1 free →

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor.

Photographic 3D course artwork for LLMOps in Production: Observe, Release, Recover, Govern

Expert · 40 levels · 4 free · Created Nov 2026 · Professionally curated by levelupwith.com

What's inside

  1. Level 1: Why Running LLM Systems Is DifferentFree
    Learn why non-deterministic, provider-hosted, token-billed systems break the usual ops assumptions, and which failure modes (silent quality loss, provider changes, runaway agent loops, cost spikes) you have to plan for.
    • Sort past incidents from your own LLM feature into crash, slow, wrong-but-healthy and expensive, and say which ones standard APM would have missed
    • Run the same prompt 20 times at a fixed temperature and measure how much the outputs, token counts and latency vary
    • Write a one-page operating risk register for a shipped LLM feature, naming who owns each risk
  2. Level 2: Traces, Spans and Context for LLM AppsFree
    Learn the OpenTelemetry basics (traces, spans, attributes, events, resources and exporters) through the lens of one LLM request, and why a trace is the main unit of debugging for AI features.
    • Set up the OpenTelemetry SDK in Python or TypeScript with an OTLP exporter and a local collector
    • Wrap one LLM request in a parent span with child spans for retrieval, the model call and post-processing
    • Read a waterfall view and find where the latency and failures in a request come from
  3. Level 3: OTel GenAI Conventions for Model Calls
    Instrument model calls with OpenTelemetry's GenAI semantic conventions (operation, provider, request and response model, token usage, finish reasons), knowing they are still marked Development and can change.
    • Emit a chat span with the gen_ai.* attributes, by hand and through an auto-instrumentation library, and compare the two
    • Pin the semconv version and use the OTEL_SEMCONV_STABILITY_OPT_IN setting so that attribute renames do not silently break your dashboards
    • Explain why the requested model and the model the provider actually ran must both be recorded
  4. Level 4: Tracing Tool Calls and Agent Steps
    Extend tracing from single model calls to agents, using the GenAI agent and tool-execution span conventions so that every reasoning step, tool call and sub-agent shows up in one tree.
    • Instrument an agent loop with invoke_agent and execute_tool spans, including tool arguments and results under your content policy
    • Tag spans with agent name, step number and conversation ID so a long run can be rebuilt end to end
    • Spot loops, repeated tool calls and dead-end steps in an agent trace
  5. Level 5: Propagating Context Across Async and Streams
    Keep a single trace intact across services, queues, background jobs and streamed responses, where LLM traces most often get split or lose their timing.
    • Pass W3C trace context through an HTTP hop and a message queue to a worker that calls the model
    • Measure time to first token and total stream duration on a streaming span without blocking the stream
    • Find and fix orphaned spans caused by lost context in async code
  6. Level 6: Choosing a Trace Backend: Langfuse, Phoenix & Co
    Compare current LLM observability backends (Langfuse, Arize Phoenix, LangSmith, Braintrust and general-purpose OTel backends) on OTLP ingestion, self-hosting, licensing and lock-in, and check recent ownership changes for yourself.
    • Send the same OTLP traces to two different backends by changing only collector config
    • Score backends against your requirements (data residency, self-hosting, licence, pricing model, eval features) using current vendor docs
    • Describe the vendor-specific SDK features you would give up by staying OTel-only, and when that trade-off is worth it
  7. Level 7: Metrics for LLM Features: Tokens, Latency, Errors
    Turn traces into aggregate signals using GenAI metrics such as token usage and operation duration, plus your own counters for errors, refusals and finish reasons, and choose the right instruments and labels.
    • Record token-usage and duration histograms with labels for model, operation and feature, without a cardinality explosion
    • Build a dashboard showing p50/p95 latency, time to first token, error rate by type and tokens per request
    • Decide which signals belong in metrics, which in traces and which in logs or events
  8. Level 8: What to Log and What to Redact
    Decide whether to capture prompt and completion content at all, and if you do, how to redact personal data and secrets before they leave the process, since traces are now a store of sensitive data.
    • Configure content capture to be off by default and switch it on per environment or per feature
    • Write a redaction span processor or collector rule that masks emails, phone numbers, API keys and IDs, then test it against tricky examples
    • Write a data map showing which trace fields may contain personal data and who can read them
  9. Level 9: Retention, Sampling and Trace Storage Cost
    Set retention periods and sampling strategies that keep the traces you need for debugging and evals while keeping storage cost and privacy exposure under control.
    • Configure head and tail sampling so that every error, slow or flagged trace is kept while routine successes are sampled
    • Set retention per data class (metrics, trace metadata, raw content) and give a reason for each period
    • Estimate monthly trace storage from request volume and average content size, and cut it by a target percentage
  10. Level 10: Prompts as Versioned Artefacts
    Treat each prompt, with its template, variables, model parameters and output schema, as one immutable, versioned artefact with a clear owner and change history, instead of a string buried in code.
    • Pull the prompts in an existing feature out into versioned files that hold the template, model settings and schema
    • Choose between prompts in the repo and prompts in a registry for your team, and state the trade-offs
    • Record the prompt name and version on every model-call span
  11. Level 11: Prompt Registries, Labels and Safe Fetching
    Use a prompt registry with environment labels (such as production and staging), client-side caching and fallbacks, so that changing a prompt is a controlled deploy and not an edit to a live system.
    • Fetch a labelled prompt version at runtime with caching and a bundled fallback for when the registry is down
    • Promote a prompt version from staging to production and roll it back by moving a label
    • Link registry versions to traces so you can filter production behaviour by prompt version
  12. Level 12: Pinning Model Versions and Config
    Pin dated model snapshots instead of floating aliases, and version the full model configuration (model, parameters, tools, provider and region) as one unit, so behaviour changes only when you decide it should.
    • Audit a codebase for floating model aliases and replace them with pinned snapshot identifiers
    • Define a versioned model-config artefact and check, using span attributes, that the model that answered is the one you pinned
    • Explain which behaviour changes pinning cannot prevent, such as provider-side infrastructure or safety-layer changes
  13. Level 13: Migrating When a Provider Retires a Model
    Plan and run a model migration before a provider's retirement date: track deprecation notices, size the change, re-tune prompts and gate the switch on evals from your existing suite.
    • Set up tracking of provider deprecation pages and turn retirement dates into tickets with owners
    • Run a side-by-side comparison of the current and candidate models on production-like inputs, covering quality, latency, tokens and cost
    • Write a migration plan with a re-prompting budget, eval gates and a rollback path
  14. Level 14: Why a Gateway: Keys and Central Control
    Put an LLM gateway (self-hosted, such as LiteLLM Proxy, or managed) between your apps and providers so that keys, access policy and telemetry are managed in one place.
    • Run a self-hosted gateway locally and send an existing app's model calls through it without changing app logic
    • Issue scoped virtual keys per team or feature and keep provider keys out of application code
    • List what the gateway owns and what the application must still own
  15. Level 15: Routing and Quotas at the Gateway
    Configure model routing (by alias, cost, latency or tenant) and enforce rate limits and token quotas per key, so that one noisy feature or customer cannot starve the rest.
    • Define model aliases that route to different providers or deployments, with load balancing across them
    • Set request and token rate limits per virtual key and watch how they behave under a load test
    • Handle quota rejections cleanly in the client with clear errors instead of silent failures
  16. Level 16: Retries, Timeouts, Fallbacks and Breakers
    Design retry, timeout, fallback and circuit-breaker policies for LLM calls that survive provider outages and rate limits without multiplying cost or quietly lowering quality.
    • Configure retries with backoff and jitter only for retryable errors, with timeouts suited to streaming and long agent calls
    • Set up a fallback chain and tag fallback responses on spans so their quality can be tracked separately
    • Simulate a provider outage and check that the circuit breaker trips, recovers and does not cause a retry storm
  17. Level 17: Operating the Gateway Itself
    Run the gateway as critical infrastructure: avoid making it a single point of failure, version its config like code, and join gateway telemetry to application traces.
    • Deploy the gateway with health checks and redundancy, and decide what the app does if the gateway is down
    • Keep gateway routing and quota config in version control with review and staged rollout
    • Propagate trace context through the gateway so one trace shows app, gateway and provider timing together
  18. Level 18: What Counts as a Release for LLM Features
    Treat every change to prompts, model config, tools, retrieval data or gateway routing as a release with a change record, an offline eval gate (from AI Evals as Infrastructure) and a planned exposure strategy.
    • List every artefact whose change can alter an LLM feature's behaviour, and attach a version to each in traces
    • Write a release checklist that links an offline eval gate to the online rollout stages
    • Pick the right rollout method (shadow, canary or A/B test) for a given change based on its risk and what you need to learn
  19. Level 19: Shadow Traffic for Prompt and Model Changes
    Mirror live requests to a candidate prompt or model without showing its output to users, then compare quality, latency and cost offline, while handling the cost, privacy and side-effect risks.
    • Build asynchronous shadow calls that mirror a sampled share of traffic and never block or change the user response
    • Stop shadowed agents from running side-effecting tools by using read-only or stubbed tool modes
    • Compare shadow and production outputs on agreement, length, latency and tokens, and state what shadow testing cannot tell you
  20. Level 20: Canary Releases with Rollback Criteria
    Roll a change out to a small, growing share of real users with feature flags or gateway weights, and set ahead of time the metrics and thresholds that trigger an automatic rollback.
    • Run a staged canary (for example 1%, 10%, 50%) using flags or gateway routing weights, with sticky assignment per user
    • Set rollback criteria on error rate, latency, cost per request and early quality signals before the rollout starts
    • Run a canary that goes wrong in a test environment and confirm the rollback happens automatically and is recorded
  21. Level 21: Online Evals as a Release Gate
    Learn to run automated evaluators on live canary and A/B traffic, so a release moves forward or rolls back on quality scores as well as latency and errors.
    • Attach online evaluators to the traces of each release cohort and compare their scores against the baseline cohort
    • Write promotion and rollback rules that combine eval scores, error rate and latency, with a minimum sample size before any decision
    • Explain why a small online sample is noisy, and size the canary so it can detect the regression you care about
  22. Level 22: Sampling Production Traffic for LLM Judges
    Learn to choose which production traces an LLM judge scores, mixing random, stratified and risk-targeted sampling so you get good coverage at a cost you can afford.
    • Build a sampler that combines a random baseline with oversampling of rare features, tenants and flagged traces
    • Estimate monthly judge spend from sample rate, trace size and judge model price, then tune the rate to fit a budget
    • Run judges asynchronously off the request path and write their scores back to the trace
  23. Level 23: Keeping Production Judges Honest
    Learn to check that a production LLM judge still agrees with human reviewers, and to notice when the judge has drifted rather than the system it is scoring.
    • Route a small slice of judged traces to human review and track how often the judge and the humans agree
    • Pin the judge's own model and prompt version, and re-check agreement whenever either one changes
    • Say plainly where judge reliability is still unsettled (self-preference, position and length bias) and decide where a judge must not be the only signal
  24. Level 24: User Signals: Explicit and Implicit Feedback
    Learn to capture thumbs, edits, retries, copies, abandonment and escalations as structured events tied to the trace, and to read them knowing their biases.
    • Instrument explicit and implicit feedback events and link each one to its trace and span ID
    • Turn raw events into rates per feature and release, and correct for low and skewed response rates
    • Decide which signals point to real quality problems and which mostly reflect UI or user-population effects
  25. Level 25: Detecting Drift in Inputs
    Learn to detect when the traffic reaching your feature changes, using embedding distributions, topic clusters, length and language mix, and tool-call patterns compared against a reference window.
    • Compute a reference profile of production inputs and compare daily windows against it with a simple distance measure
    • Cluster input embeddings to find new or growing topics that your eval datasets do not cover
    • Set drift thresholds that alert on meaningful shifts without paging on every weekly cycle
  26. Level 26: Detecting Drift in Outputs and Agent Behaviour
    Learn to watch for silent changes in what the system produces, such as refusal rate, output length, format validity, tool-call mix and steps per run, especially under an unchanged model alias.
    • Track output-shape metrics (refusals, length, schema-validity, steps and tool calls per run) per model and prompt version
    • Tell a provider-side change apart from input drift or your own release by slicing metrics by version and cohort
    • Explain why statistical drift does not always mean quality has dropped, and when to confirm with judges or humans
  27. Level 27: A Production Quality Scorecard
    Learn to combine judge scores, user signals and drift metrics into one scorecard per feature, with alerts that tell regressions apart from noise.
    • Design a per-feature quality dashboard that links each metric to example traces
    • Use confidence intervals or rolling windows so alerts fire on sustained changes, not single bad samples
    • Write down which quality metrics are leading and which are lagging, and who owns each one
  28. Level 28: Cost Attribution per Feature, User and Tenant
    Learn to attribute token, cache, tool and judge spend to features, users and tenants by carrying attribution metadata through traces and gateway logs.
    • Propagate feature, user and tenant identifiers through spans and gateway requests without leaking personal data
    • Calculate cost per request, per successful task and per tenant from usage fields and a versioned price table
    • Find the most expensive agent runs and explain what drives their cost (retries, long contexts, tool loops)
  29. Level 29: Spend Budgets, Quotas and Runaway Agents
    Learn to enforce spend limits with soft alerts and hard caps at the gateway and inside agent runs, so one tenant or a looping agent cannot exhaust the budget.
    • Configure per-tenant and per-feature budgets with warning thresholds and hard limits at the gateway
    • Add per-run token and step caps that stop runaway agent loops cleanly
    • Decide what users see when a budget is hit: degrade to a cheaper model, queue the request, or refuse
  30. Level 30: Latency SLOs for Streaming and Agentic Features
    Learn to define latency indicators that match what users feel, such as time to first token, streaming rate and end-to-end task time, and to set percentile targets for them.
    • Measure time to first token, output tokens per second and total run duration from trace data
    • Set p50/p95/p99 latency targets per feature, with separate targets for multi-step agent tasks
    • Find where latency comes from (queueing, provider, tools, retries) using span breakdowns
  31. Level 31: Error and Quality SLOs with Error Budgets
    Learn to define what counts as a failed AI request, including hard errors, invalid outputs and low-quality answers, and to manage releases against an error budget.
    • Write service-level indicator definitions that count provider errors, schema failures, guardrail blocks and judge-failed answers
    • Set availability and quality SLOs and work out the error budget they leave over a 28- or 30-day window
    • Agree a policy for what happens to releases and experiments when the budget is spent
  32. Level 32: Burn-Rate Alerting and On-Call for AI Features
    Learn to alert on how fast the error budget and the spend budget are being used, so that the alerts that page someone are rare, actionable and tied to a runbook.
    • Configure multi-window burn-rate alerts for latency, error and quality SLOs
    • Separate paging alerts from ticket-level alerts, including cost anomalies and drift warnings
    • Link every paging alert to a runbook entry and a saved trace query
  33. Level 33: Triage When a Model Starts Misbehaving
    Learn a structured triage for AI incidents, going from alert to blast radius to likely cause (provider change, prompt release, input shift, tool failure or attack) using traces and version metadata.
    • Scope an incident by feature, tenant, model version and prompt version within minutes using trace queries
    • Work through a cause checklist: provider status, recent releases, drift signals, tool health and prompt injection
    • Keep an incident timeline and preserve the evidence traces before retention policies delete them
  34. Level 34: Rollbacks, Kill Switches and Postmortems
    Learn to contain an AI incident by rolling back prompts or models, failing over providers, or switching a feature off, then to write a blameless postmortem that changes the system.
    • Roll back a prompt or model pin through the registry and gateway without redeploying code
    • Implement and test kill switches per feature and per tool, with a defined degraded experience
    • Write a postmortem with root cause, detection gap, and follow-up actions such as new evals, alerts or guardrails
  35. Level 35: From Production Traces to Eval Datasets
    Learn to turn failing, flagged and surprising production traces into curated, consented and versioned dataset items that feed the regression evals built in AI Evals as Infrastructure.
    • Build a pipeline that promotes traces from judge failures, negative feedback and incidents into a review queue
    • Redact or minimise personal data before traces enter a dataset, and record where each item came from
    • Version datasets and link each new item to the incident or drift cluster that motivated it
  36. Level 36: Closing the Loop: Annotation and Regression Guards
    Learn to run the human annotation workflow that labels promoted traces, and to make sure every fixed production failure becomes a permanent regression check in the release path.
    • Set up an annotation queue with clear labelling guidelines and checks on how consistently reviewers agree
    • Add fixed incident cases to the pre-release and online eval suites so the same failure cannot ship twice
    • Measure loop health: time from failure to labelled case, and how many incidents had a matching eval
  37. Level 37: A Model and Prompt Inventory
    Learn to keep a live inventory of every model, prompt, tool and provider in use, showing which feature, owner, risk level and data flows each one has, generated from the registry and the gateway rather than by hand.
    • Generate an inventory from registry and gateway data listing models, versions, prompts, tools and owners per feature
    • Flag pinned models that a provider has announced for retirement, and features with no owner
    • Classify each AI feature by risk so you know which governance duties apply
  38. Level 38: Audit Trails for What Ran and Why
    Learn to keep tamper-evident records of who changed which prompt, model pin, routing rule or kill switch, and to reconstruct exactly what configuration served any given request.
    • Record config changes with actor, approval, diff and timestamp in an append-only audit log
    • Tie each trace to the exact prompt version, model version and gateway route that served it
    • Answer an auditor's question, 'what produced this output on this date?', from stored records alone
  39. Level 39: The EU AI Act's Logging Duties in Outline
    Learn in outline what the EU AI Act asks of high-risk systems: automatic event logging by design for providers, and log retention and human oversight for deployers. Also how the Digital Omnibus deal moved the application dates, and where legal advice is needed.
    • Summarise the record-keeping duties for providers and the log-retention duties for deployers of high-risk systems
    • Map those duties onto the tracing, retention, inventory and audit-trail practices already built in this course
    • Name what is still unsettled (final dates, standards, how the rules are interpreted) and check the current official text before relying on it
  40. Level 40: Final Challenge: Instrument, Budget, Break, Recover Exam
    Bring the whole course together: instrument an agentic application end to end, set its SLOs and budgets, release a change through a canary, then run a simulated incident from alert through rollback to postmortem and a new dataset entry.
    • Instrument an agent with OpenTelemetry GenAI spans, redaction, versioned prompts, a gateway and cost attribution
    • Define latency, error, quality and spend SLOs and budgets with burn-rate alerts and runbooks
    • Run a simulated model-misbehaviour incident through triage, kill switch or rollback, postmortem, an audit record and a new regression eval

Access

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor. Every level, the podcast edition and the AI tutor come with All Access at £4.99/month or any Creator plan — see pricing.

Read lesson 1 free →

More like this