Skip to main content
Solved

Is there a Cribl expression that I can use to eval the size in bytes of _raw?

  • March 11, 2025
  • 2 replies
  • 16 views

I want to eval the size in bytes of _raw. How do I do that in Stream?

Best answer by pie

Sure is.

_raw.length for _raw

__e.asJSON().length for full event length

2 replies

  • Participating Frequently
  • Answer
  • March 11, 2025

Sure is.

_raw.length for _raw

__e.asJSON().length for full event length


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

If _raw is a parsed object ({} to the left of _raw in the preview window), youll need to stringify the value first.

JSON.stringify(_raw).length