You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(observability): ensure sent_event and received_event metrics are estimated json size (vectordotdev#17465)
This PR creates a newtype -
[`JsonSize`](https://github.com/vectordotdev/vector/blob/stephen/event_json_size/lib/vector-common/src/json_size.rs)
that is returned by the
`EstimatedJsonEncodedSizeOf::estimated_json_encoded_size_of` trait
function.
The events that emit a `component_received_event_bytes_total` or
`component_sent_event_bytes_total` event accept `JsonSize`.
This allows us to use the compiler to ensure we are emitting the correct
measurement. A number of components needed changing to ensure this
worked.
---------
Signed-off-by: Stephen Wakely <[email protected]>
0 commit comments