Skip to content

Commit

Permalink
chore: use in-memory size for JSON encoded size of metrics (#15438)
Browse files Browse the repository at this point in the history
Signed-off-by: Jean Mertz <git@jeanmertz.com>

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Co-authored-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
JeanMertz and jszwedko committed Dec 2, 2022
1 parent 336babb commit 1651dd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vector-core/src/event/metric/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ impl ByteSizeOf for Metric {

impl EstimatedJsonEncodedSizeOf for Metric {
fn estimated_json_encoded_size_of(&self) -> usize {
0 // The JSON encoded size of a metric is unspecified.
// TODO: For now we're using the in-memory representation of the metric, but we'll convert
// this to actually calculate the JSON encoded size in the near future.
self.size_of()
}
}

Expand Down

0 comments on commit 1651dd8

Please sign in to comment.