Skip to content

Commit

Permalink
fix(datadog_agent source): remove duplicate internal metrics emission (
Browse files Browse the repository at this point in the history
  • Loading branch information
neuronull authored Jun 28, 2023
1 parent dbdff9e commit 48ec2e8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/sources/datadog_agent/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn decode_datadog_series_v2(
return Ok(Vec::new());
}

let metrics = decode_ddseries_v2(body, &api_key, events_received).map_err(|error| {
let metrics = decode_ddseries_v2(body, &api_key).map_err(|error| {
ErrorMessage::new(
StatusCode::UNPROCESSABLE_ENTITY,
format!("Error decoding Datadog sketch: {:?}", error),
Expand All @@ -230,7 +230,6 @@ fn decode_datadog_series_v2(
pub(crate) fn decode_ddseries_v2(
frame: Bytes,
api_key: &Option<Arc<str>>,
events_received: &Registered<EventsReceived>,
) -> crate::Result<Vec<Event>> {
let payload = MetricPayload::decode(frame)?;
let decoded_metrics: Vec<Event> = payload
Expand Down Expand Up @@ -336,11 +335,6 @@ pub(crate) fn decode_ddseries_v2(
})
.collect();

events_received.emit(CountByteSize(
decoded_metrics.len(),
decoded_metrics.estimated_json_encoded_size_of(),
));

Ok(decoded_metrics)
}

Expand Down

0 comments on commit 48ec2e8

Please sign in to comment.