Gemba is the actual place where work happens and value is created. In software, it is not an architecture slide or a process diagram. It might be a pull request waiting for review, a CI pipeline repeatedly run by a developer, or a production request crossing several services. Go there to see how work behaves before deciding what to improve; reports and averages can hide the friction people absorb. section 2.4.9 section 2.5 section 10.1.3
Choose the place that matches the problem, then look for a specific signal:
- In code review, notice repeated questions or similar justified departures from a standard. They may indicate that the standard needs investigation, not simply stricter enforcement. section 4.4.3
- In delivery, follow where code waits and handoffs fail. Ask the people running the pipeline and reviewing the PRs what slows them down. section 10.1.3 section 12.1.1
- In production, inspect running behavior: raw logs, resource use, query patterns, and the path of a real request. A dashboard is a useful summary, but it is not the running system. section 12.2 section 12.1.1
Observe the constraint before changing the practice
A team sees low deployment frequency and switches to trunk-based development. Releases do not improve: the delay is a two-day staging queue followed by mandatory manual QA. Developers familiar with the workflow already know where work waits. Observing that queue first would direct improvement toward the actual constraint rather than the branching model. section 10.1.3
Look past a healthy average
A p50 latency of 45 milliseconds can coexist with a p99 of 3.2 seconds when a small share of requests triggers a full table scan. Follow an affected request through its services, queues, database calls, and cache lookups; measure each hop to find where time is actually spent. section 12.2
Listing 12.1 Tracing becomes a gemba tool
import time
import logging
def trace_request(request_id: str, service_chain: list[str]):
"""Follow one request through every service hop and log timing."""
timings = {}
for service in service_chain:
start = time.monotonic()
response = call_service(service, request_id)
elapsed_ms = (time.monotonic() - start) * 1000
timings[service] = elapsed_ms
logging.info(f"[{request_id}] {service}: {elapsed_ms:.1f}ms")
total = sum(timings.values())
bottleneck = max(timings, key=timings.get)
logging.warning(f"[{request_id}] Total: {total:.1f}ms | Bottleneck: {bottleneck}")
return timingsThe request-tracing listing records elapsed time for each service hop and identifies the slowest one. It illustrates how to turn “the system is slow” into an observation about a particular path. section 12.2
Observation is the starting point, not the improvement itself. Use what you find to make a small, testable change, then return to see what changed. The aim is to improve the system that produces recurring friction, not to blame the people working around it. section 2.5 section 2.7
