diff --git a/src/sinks/appsignal/service.rs b/src/sinks/appsignal/service.rs index ce6aad1e688f36..0944eae962dc60 100644 --- a/src/sinks/appsignal/service.rs +++ b/src/sinks/appsignal/service.rs @@ -73,7 +73,7 @@ impl Service for AppsignalService { Box::pin(async move { let metadata = std::mem::take(request.metadata_mut()); http_service.ready().await?; - let bytes_sent = metadata.request_wire_size(); + let bytes_sent = metadata.request_encoded_size(); let event_byte_size = metadata.into_events_estimated_json_encoded_byte_size(); let http_response = http_service.call(request).await?; let event_status = if http_response.is_successful() { diff --git a/src/sinks/datadog/metrics/service.rs b/src/sinks/datadog/metrics/service.rs index 85f5fdc47fb2ea..27d98d90369baf 100644 --- a/src/sinks/datadog/metrics/service.rs +++ b/src/sinks/datadog/metrics/service.rs @@ -142,7 +142,7 @@ impl DriverResponse for DatadogMetricsResponse { } fn bytes_sent(&self) -> Option { - Some(self.request_metadata.request_wire_size()) + Some(self.request_metadata.request_encoded_size()) } } diff --git a/src/sinks/greptimedb/service.rs b/src/sinks/greptimedb/service.rs index 6045ed2ff2271b..c12d25d227a05f 100644 --- a/src/sinks/greptimedb/service.rs +++ b/src/sinks/greptimedb/service.rs @@ -93,7 +93,7 @@ impl DriverResponse for GreptimeDBBatchOutput { } fn bytes_sent(&self) -> Option { - Some(self.metadata.request_wire_size()) + Some(self.metadata.request_encoded_size()) } } diff --git a/src/sinks/statsd/service.rs b/src/sinks/statsd/service.rs index 8acd729685360f..f3e322b731195f 100644 --- a/src/sinks/statsd/service.rs +++ b/src/sinks/statsd/service.rs @@ -54,7 +54,7 @@ impl DriverResponse for StatsdResponse { } fn bytes_sent(&self) -> Option { - Some(self.metadata.request_wire_size()) + Some(self.metadata.request_encoded_size()) } } diff --git a/src/sinks/util/http.rs b/src/sinks/util/http.rs index 8508f18acdbb33..168cc95d8151c6 100644 --- a/src/sinks/util/http.rs +++ b/src/sinks/util/http.rs @@ -745,11 +745,10 @@ where fn call(&mut self, mut request: HttpRequest) -> Self::Future { let mut http_service = self.batch_service.clone(); - let raw_byte_size = request.payload.len(); - // NOTE: By taking the metadata here, when passing the request to `call()` below, // that function does not have access to the metadata anymore. let metadata = std::mem::take(request.metadata_mut()); + let raw_byte_size = metadata.request_encoded_size(); let events_byte_size = metadata.into_events_estimated_json_encoded_byte_size(); Box::pin(async move { diff --git a/website/content/en/highlights/2023-12-19-0-35-0-upgrade-guide.md b/website/content/en/highlights/2023-12-19-0-35-0-upgrade-guide.md index 22592e25a92ab6..2b3ecd24d66f88 100644 --- a/website/content/en/highlights/2023-12-19-0-35-0-upgrade-guide.md +++ b/website/content/en/highlights/2023-12-19-0-35-0-upgrade-guide.md @@ -15,6 +15,7 @@ Vector's 0.35.0 release includes **deprecations**: and **potentially impactful changes**: +1. [Update `component_sent_bytes_total` to correctly report uncompressed bytes for all sinks](#component-sent-bytes-total) 1. [Update `component_received_bytes_total` to correctly report decompressed bytes for all sources](#component-received-bytes-total) We cover them below to help you upgrade quickly: @@ -33,6 +34,11 @@ existing behavior. In the next release, the config option will be updated to def ### Potentially impactful changes +#### Update `component_sent_bytes_total` to correctly report uncompressed bytes for all sinks {#component-sent-bytes-total} + +The AppSignal, Datadog Metrics, GreptimeDB, GCP Cloud Monitoring, Honeycomb, and HTTP sinks now correctly +report uncompressed bytes, rather than compressed bytes, for the `component_sent_bytes_total` internal metric. + #### Update `component_received_bytes_total` to correctly report decompressed bytes for all sources {#component-received-bytes-total} The Heroku Logs, HTTP Server, Prometheus Remote Write, and Splunk HEC sources now correctly report decompressed bytes,