—sample

Returns a random sample of logs from the matching result set. Useful for spot-checking high-volume streams or getting a representative slice of a large dataset without reading everything.

Syntax

--sample
--sample:<n>

<n> is the number of logs to sample.

Examples

--sample
--sample:25
--sample:100
level:error @last-7d --sample:50
context.service:payments --sample:10

Notes

  • The sample is random — repeated runs return different results
  • Combine with any other filter to sample within a specific scope
  • Scope: advanced filter bar