Production guide

ArgusLogs best practices

Keep log volume under control, query efficiently, and prefer TieredStorage with SQLite for a compact hot tier — plus security and retention advice for production.

Section 4 of 8 Storage & performance

Trim payload size

Every byte you persist is a byte you will eventually query, back up, and possibly expose. ArgusLogs already captures rich context — tune what gets stored.

  • Enable UseShortKeys in production to shrink JSON field names (ts, lvl, msg, tid, dur).
  • Turn off Network.Request.LogBody and Network.Response.LogBody unless debugging a specific integration.
  • Avoid logging large binary payloads, file uploads, or full EF entity graphs in manual ArgusLogs calls.
  • Sample or truncate oversized strings in custom interceptors before they reach the sink.

Production-friendly network options

Keep correlation IDs, method, URL, status, and duration — drop bodies unless you are in a controlled environment.

ArgusOptions
options.UseShortKeys = true;
options.Network.Request.LogBody = false;   // disable full request bodies in prod
options.Network.Response.LogBody = false;  // disable full response bodies in prod