Hasty Briefsbeta

Bilingual

Finding Slow Code with Wrapture

6 days ago
  • The /order endpoint is slow due to the Ledger.record method, which accounts for most of the time.
  • Self-time (duration minus child times) helps identify which operation is inherently slow, as demonstrated by wrapture's timeline and self_time().
  • The Aggregate collector provides per-request statistics across many requests, sorted by self-time, without retaining all events.
  • Annotations (tag_tenant) allow filtering slow requests by tenant or other attributes in logs or traces.
  • Counter collectors can be used for query budgets to catch N+1 regressions in tests.