This PR splits the existing "observation" machinery out into a separate "tracing" subsystem that uses the shadow budget to reduce DoS risk if it's ever activated in production. It therefore includes a (manual, awful) metered hash implementation of everything that gets hashed in that machinery. It also includes some reorganization of the code and general reduction of unnecessary allocations.
There'll be a corresponding change to core to route this tracing output into the core logging system. There are maybe a couple things left to clean up tomorrow but it's good enough to be reviewed now:
[x] Remove the json observation files for the tests un-observed
[x] Maybe add an EnvBase::tracing_enabled() -> bool that we can use to short-circuit composing the arg arrays in general
This PR splits the existing "observation" machinery out into a separate "tracing" subsystem that uses the shadow budget to reduce DoS risk if it's ever activated in production. It therefore includes a (manual, awful) metered hash implementation of everything that gets hashed in that machinery. It also includes some reorganization of the code and general reduction of unnecessary allocations.
There'll be a corresponding change to core to route this tracing output into the core logging system. There are maybe a couple things left to clean up tomorrow but it's good enough to be reviewed now:
EnvBase::tracing_enabled() -> bool
that we can use to short-circuit composing the arg arrays in general