A debug log line in a hot loop cut our service's throughput by 40 percent
A release that only added logging made a pricing service 40 percent slower at peak. The log statement ran inside a per-item loop, built its message eagerly, and wrote synchronously to a file appender behind a lock. How profiling showed it, and the fixes: levels, lazy messages, async appenders and sampling.