
6/30/2026
What this post added
This post details how Discord extended its application's profiling tooling to allocate hosting costs for its unified Python API codebase. It addresses the challenge of tracking costs across numerous API endpoints and background tasks running on hundreds of Kubernetes deployments by attributing deployment costs based on the time spent on feature-related code, even when a single worker process handles multiple tasks concurrently.