Skip to content

Commit

Permalink
chore(observability)!: remove metrics replaced by component_errors_to…
Browse files Browse the repository at this point in the history
…tal (#18965)

* OPW-94 remove metrics replaced by component_errors_total

* update upgrade guide

* fmt cue
  • Loading branch information
dsmith3197 committed Oct 30, 2023
1 parent 409b69d commit 17f4ed2
Show file tree
Hide file tree
Showing 64 changed files with 104 additions and 493 deletions.
8 changes: 0 additions & 8 deletions src/internal_events/apache_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ impl InternalEvent for ApacheMetricsParseError<'_> {
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
debug!(
message = %format!("Parse error:\n\n{}\n\n", self.error),
endpoint = %self.endpoint,
internal_log_rate_limit = true
);
counter!("parse_errors_total", 1);
counter!(
"component_errors_total", 1,
"stage" => error_stage::PROCESSING,
Expand All @@ -78,7 +72,6 @@ impl InternalEvent for ApacheMetricsResponseError<'_> {
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!("http_error_response_total", 1);
counter!(
"component_errors_total", 1,
"stage" => error_stage::RECEIVING,
Expand All @@ -105,7 +98,6 @@ impl InternalEvent for ApacheMetricsHttpError<'_> {
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!("http_request_errors_total", 1);
counter!(
"component_errors_total", 1,
"stage" => error_stage::RECEIVING,
Expand Down
2 changes: 0 additions & 2 deletions src/internal_events/aws_ecs_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ impl InternalEvent for AwsEcsMetricsResponseError<'_> {
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!("http_error_response_total", 1);
counter!(
"component_errors_total", 1,
"stage" => error_stage::RECEIVING,
Expand Down Expand Up @@ -112,7 +111,6 @@ impl InternalEvent for AwsEcsMetricsHttpError<'_> {
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!("http_request_errors_total", 1);
counter!(
"component_errors_total", 1,
"stage" => error_stage::RECEIVING,
Expand Down
4 changes: 0 additions & 4 deletions src/internal_events/aws_kinesis_firehose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ impl<'a> InternalEvent for AwsKinesisFirehoseRequestError<'a> {
"error_type" => error_type::REQUEST_FAILED,
"error_code" => self.error_code,
);
// deprecated
counter!("request_read_errors_total", 1);
}
}

Expand All @@ -85,7 +83,5 @@ impl InternalEvent for AwsKinesisFirehoseAutomaticRecordDecodeError {
"error_type" => error_type::PARSER_FAILED,
"error_code" => io_error_code(&self.error),
);
// deprecated
counter!("request_automatic_decode_errors_total", 1);
}
}
11 changes: 0 additions & 11 deletions src/internal_events/aws_sqs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ mod s3 {
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("sqs_message_processing_failed_total", 1);
}
}

Expand Down Expand Up @@ -86,8 +84,6 @@ mod s3 {
"error_type" => error_type::ACKNOWLEDGMENT_FAILED,
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("sqs_message_delete_failed_total", self.entries.len() as u64);
}
}

Expand Down Expand Up @@ -117,9 +113,6 @@ mod s3 {
"error_type" => error_type::ACKNOWLEDGMENT_FAILED,
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("sqs_message_delete_failed_total", self.entries.len() as u64);
counter!("sqs_message_delete_batch_failed_total", 1);
}
}
}
Expand All @@ -145,8 +138,6 @@ impl<'a, E: std::fmt::Display> InternalEvent for SqsMessageReceiveError<'a, E> {
"error_type" => error_type::REQUEST_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("sqs_message_receive_failed_total", 1);
}
}

Expand Down Expand Up @@ -198,8 +189,6 @@ impl<'a, E: std::fmt::Display> InternalEvent for SqsMessageDeleteError<'a, E> {
"error_type" => error_type::WRITER_FAILED,
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("sqs_message_delete_failed_total", 1);
}
}

Expand Down
12 changes: 8 additions & 4 deletions src/internal_events/codecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ pub struct DecoderFramingError<E> {

impl<E: std::fmt::Display> InternalEvent for DecoderFramingError<E> {
fn emit(self) {
counter!("decoder_framing_errors_total", 1);
error!(
message = "Failed framing bytes.",
error = %self.error,
error_code = "decoder_frame",
error_type = error_type::PARSER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total", 1,
"error_code" => "decoder_frame",
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::PROCESSING,
);
Expand All @@ -34,16 +35,17 @@ pub struct DecoderDeserializeError<'a> {

impl<'a> InternalEvent for DecoderDeserializeError<'a> {
fn emit(self) {
counter!("decoder_deserialize_errors_total", 1);
error!(
message = "Failed deserializing frame.",
error = %self.error,
error_code = "decoder_deserialize",
error_type = error_type::PARSER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total", 1,
"error_code" => "decoder_deserialize",
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::PROCESSING,
);
Expand All @@ -61,13 +63,14 @@ impl<'a> InternalEvent for EncoderFramingError<'a> {
error!(
message = reason,
error = %self.error,
error_code = "encoder_frame",
error_type = error_type::ENCODER_FAILED,
stage = error_stage::SENDING,
internal_log_rate_limit = true,
);
counter!("encoder_framing_errors_total", 1);
counter!(
"component_errors_total", 1,
"error_code" => "encoder_frame",
"error_type" => error_type::ENCODER_FAILED,
"stage" => error_stage::SENDING,
);
Expand All @@ -86,13 +89,14 @@ impl<'a> InternalEvent for EncoderSerializeError<'a> {
error!(
message = reason,
error = %self.error,
error_code = "encoder_serialize",
error_type = error_type::ENCODER_FAILED,
stage = error_stage::SENDING,
internal_log_rate_limit = true,
);
counter!("encoder_serialize_errors_total", 1);
counter!(
"component_errors_total", 1,
"error_code" => "encoder_serialize",
"error_type" => error_type::ENCODER_FAILED,
"stage" => error_stage::SENDING,
);
Expand Down
2 changes: 0 additions & 2 deletions src/internal_events/dnstap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ impl<E: std::fmt::Display> InternalEvent for DnstapParseError<E> {
"stage" => error_stage::PROCESSING,
"error_type" => error_type::PARSER_FAILED,
);
// deprecated
counter!("parse_errors_total", 1);
}
}

Expand Down
8 changes: 0 additions & 8 deletions src/internal_events/docker_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ impl InternalEvent for DockerLogsCommunicationError<'_> {
"error_type" => error_type::CONNECTION_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("communication_errors_total", 1);
}
}

Expand All @@ -128,8 +126,6 @@ impl InternalEvent for DockerLogsContainerMetadataFetchError<'_> {
"stage" => error_stage::RECEIVING,
"container_id" => self.container_id.to_owned(),
);
// deprecated
counter!("container_metadata_fetch_errors_total", 1);
}
}

Expand All @@ -155,8 +151,6 @@ impl InternalEvent for DockerLogsTimestampParseError<'_> {
"stage" => error_stage::PROCESSING,
"container_id" => self.container_id.to_owned(),
);
// deprecated
counter!("timestamp_parse_errors_total", 1);
}
}

Expand All @@ -182,7 +176,5 @@ impl InternalEvent for DockerLogsLoggingDriverUnsupportedError<'_> {
"stage" => error_stage::RECEIVING,
"container_id" => self.container_id.to_owned(),
);
// deprecated
counter!("logging_driver_errors_total", 1);
}
}
4 changes: 0 additions & 4 deletions src/internal_events/eventstoredb_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ impl InternalEvent for EventStoreDbMetricsHttpError {
"stage" => error_stage::RECEIVING,
"error_type" => error_type::REQUEST_FAILED,
);
// deprecated
counter!("http_request_errors_total", 1);
}
}

Expand All @@ -46,7 +44,5 @@ impl InternalEvent for EventStoreDbStatsParsingError {
"stage" => error_stage::PROCESSING,
"error_type" => error_type::PARSER_FAILED,
);
// deprecated
counter!("parse_errors_total", 1);
}
}
21 changes: 0 additions & 21 deletions src/internal_events/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ mod source {
"stage" => error_stage::RECEIVING,
"file" => self.file.to_string_lossy().into_owned(),
);
// deprecated
counter!(
"fingerprint_read_errors_total", 1,
"file" => self.file.to_string_lossy().into_owned(),
);
}
}

Expand Down Expand Up @@ -216,11 +211,6 @@ mod source {
"error_type" => error_type::COMMAND_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!(
"file_delete_errors_total", 1,
"file" => self.file.to_string_lossy().into_owned(),
);
}
}

Expand Down Expand Up @@ -284,11 +274,6 @@ mod source {
"stage" => error_stage::RECEIVING,
"file" => self.file.to_string_lossy().into_owned(),
);
// deprecated
counter!(
"file_watch_errors_total", 1,
"file" => self.file.to_string_lossy().into_owned(),
);
}
}

Expand Down Expand Up @@ -362,7 +347,6 @@ mod source {
stage = error_stage::RECEIVING,
internal_log_rate_limit = true,
);
counter!("checkpoint_write_errors_total", 1);
counter!(
"component_errors_total", 1,
"error_code" => "writing_checkpoints",
Expand Down Expand Up @@ -396,11 +380,6 @@ mod source {
"stage" => error_stage::RECEIVING,
"path" => self.path.to_string_lossy().into_owned(),
);
// deprecated
counter!(
"glob_errors_total", 1,
"path" => self.path.to_string_lossy().into_owned(),
);
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/internal_events/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@ impl<'a> InternalEvent for FluentMessageDecodeError<'a> {
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("decode_errors_total", 1);
}
}
4 changes: 0 additions & 4 deletions src/internal_events/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ impl<'a> InternalEvent for HttpBadRequest<'a> {
"error_type" => error_type::REQUEST_FAILED,
"error_stage" => error_stage::RECEIVING,
);
// deprecated
counter!("http_bad_requests_total", 1);
}
}

Expand All @@ -156,8 +154,6 @@ impl<'a> InternalEvent for HttpDecompressError<'a> {
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("parse_errors_total", 1);
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/internal_events/http_client_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ impl InternalEvent for HttpClientHttpResponseError {
"error_type" => error_type::REQUEST_FAILED,
"error_code" => http_error_code(self.code.as_u16()),
);
// deprecated
counter!("http_error_response_total", 1);
}
}

Expand All @@ -83,7 +81,5 @@ impl InternalEvent for HttpClientHttpError {
"error_type" => error_type::REQUEST_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("http_request_errors_total", 1);
}
}
2 changes: 0 additions & 2 deletions src/internal_events/journald.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ impl InternalEvent for JournaldInvalidRecordError {
"stage" => error_stage::PROCESSING,
"error_type" => error_type::PARSER_FAILED,
);
counter!("invalid_record_total", 1); // deprecated
counter!("invalid_record_bytes_total", self.text.len() as u64); // deprecated
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/internal_events/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ impl InternalEvent for KafkaOffsetUpdateError {
"error_type" => error_type::READER_FAILED,
"stage" => error_stage::SENDING,
);
// deprecated
counter!("consumer_offset_updates_failed_total", 1);
}
}

Expand Down Expand Up @@ -181,7 +179,5 @@ impl InternalEvent for KafkaHeaderExtractionError<'_> {
"error_type" => error_type::PARSER_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("kafka_header_extraction_failures_total", 1);
}
}
1 change: 0 additions & 1 deletion src/internal_events/kubernetes_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ impl InternalEvent for KubernetesLogsEventAnnotationError<'_> {
"error_type" => error_type::READER_FAILED,
"stage" => error_stage::PROCESSING,
);
counter!("k8s_event_annotation_failures_total", 1);
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/internal_events/logplex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ impl InternalEvent for HerokuLogplexRequestReadError {
"error_code" => io_error_code(&self.error),
"stage" => error_stage::PROCESSING,
);
// deprecated
counter!("request_read_errors_total", 1);
}
}
4 changes: 0 additions & 4 deletions src/internal_events/mongodb_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ impl<'a> InternalEvent for MongoDbMetricsRequestError<'a> {
"error_type" => error_type::REQUEST_FAILED,
"stage" => error_stage::RECEIVING,
);
// deprecated
counter!("request_errors_total", 1);
}
}

Expand All @@ -80,7 +78,5 @@ impl<'a> InternalEvent for MongoDbMetricsBsonParseError<'a> {
"stage" => error_stage::RECEIVING,
"endpoint" => self.endpoint.to_owned(),
);
// deprecated
counter!("parse_errors_total", 1);
}
}

0 comments on commit 17f4ed2

Please sign in to comment.