Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/codecs/src/decoding/framing/character_delimited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ impl Decoder for CharacterDelimitedDecoder {
warn!(
message = "Discarding frame larger than max_length.",
buf_len = buf.len(),
max_length = self.max_length,
internal_log_rate_limit = true
max_length = self.max_length
);
buf.advance(next_delimiter_idx + 1);
} else {
Expand All @@ -151,8 +150,7 @@ impl Decoder for CharacterDelimitedDecoder {
warn!(
message = "Discarding frame larger than max_length.",
buf_len = buf.len(),
max_length = self.max_length,
internal_log_rate_limit = true
max_length = self.max_length
);
Ok(None)
} else {
Expand Down
2 changes: 0 additions & 2 deletions lib/codecs/src/decoding/framing/chunked_gelf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ impl ChunkedGelfDecoder {
warn!(
message_id = message_id,
timeout_secs = timeout.as_secs_f64(),
internal_log_rate_limit = true,
"Message was not fully received within the timeout window. Discarding it."
);
}
Expand All @@ -422,7 +421,6 @@ impl ChunkedGelfDecoder {
debug!(
message_id = message_id,
sequence_number = sequence_number,
internal_log_rate_limit = true,
"Received a duplicate chunk. Ignoring it."
);
return Ok(None);
Expand Down
1 change: 0 additions & 1 deletion lib/dnstap-parser/src/internal_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ impl<E: std::fmt::Display> InternalEvent for DnstapParseWarning<E> {
error = %self.error,
stage = error_stage::PROCESSING,
error_type = error_type::PARSER_FAILED,
internal_log_rate_limit = true,
);
}
}
3 changes: 1 addition & 2 deletions lib/tracing-limit/benches/limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ fn bench(c: &mut Criterion) {
foo = "foo",
bar = "bar",
baz = 3,
quuux = ?0.99,
internal_log_rate_limit = true
quuux = ?0.99
)
}
})
Expand Down
6 changes: 1 addition & 5 deletions lib/tracing-limit/examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ fn main() {
tracing::dispatcher::with_default(&dispatch, || {
for i in 0..40usize {
trace!("This field is not rate limited!");
info!(
message = "This message is rate limited",
count = &i,
internal_log_rate_limit = true,
);
info!(message = "This message is rate limited", count = &i);
std::thread::sleep(std::time::Duration::from_millis(1000));
}
})
Expand Down
1 change: 0 additions & 1 deletion lib/tracing-limit/examples/by_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fn main() {
message =
"This message is rate limited by its component and vrl_line_number",
count = &i,
internal_log_rate_limit = true,
);
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/vector-buffers/src/internal_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ impl InternalEvent for BufferReadError {
error_code = self.error_code,
error_type = error_type::READER_FAILED,
stage = "processing",
internal_log_rate_limit = true,
);
counter!(
"buffer_errors_total", "error_code" => self.error_code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ impl<const INTENDED: bool> InternalEventHandle for DroppedHandle<'_, INTENDED> {
intentional = INTENDED,
count = data.0,
reason = self.reason,
internal_log_rate_limit = true,
);
} else {
error!(
message,
intentional = INTENDED,
count = data.0,
reason = self.reason,
internal_log_rate_limit = true,
);
}
self.discarded_events.increment(data.0 as u64);
Expand Down
2 changes: 0 additions & 2 deletions lib/vector-common/src/internal_event/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ impl<E: std::fmt::Debug> InternalEvent for PollReadyError<E> {
error = ?self.error,
error_type = error_type::REQUEST_FAILED,
stage = error_stage::SENDING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -45,7 +44,6 @@ impl<E: std::fmt::Debug> InternalEvent for CallError<E> {
request_id = self.request_id,
error_type = error_type::REQUEST_FAILED,
stage = error_stage::SENDING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
3 changes: 1 addition & 2 deletions lib/vector-core/src/event/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,7 @@ impl From<Metadata> for EventMetadata {
Err(error) => {
error!(
message = "Failed to parse source_event_id: {}",
%error,
internal_log_rate_limit = true
%error
);
None
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl ApplicationConfig {
}
Err(error) => {
let error = error.to_string();
error!("An error occurred that Vector couldn't handle: {}.", error);
error!(message = "An error occurred that Vector couldn't handle.", %error, internal_log_rate_limit = false);
_ = self
.topology
.abort_tx
Expand Down
2 changes: 0 additions & 2 deletions src/components/validation/resources/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,12 @@ impl HttpResourceOutputContext<'_> {
Ok(Some((events, decoded_byte_size))) => {
if should_reject {
info!(
internal_log_rate_limit = true,
"HTTP server external output resource decoded {decoded_byte_size:?} bytes but test case configured to reject.",
);
} else {
let mut output_runner_metrics =
output_runner_metrics.lock().await;
info!(
internal_log_rate_limit = true,
"HTTP server external output resource decoded {decoded_byte_size:?} bytes."
);

Expand Down
10 changes: 7 additions & 3 deletions src/config/loading/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ pub(super) fn open_file<P: AsRef<Path> + Debug>(path: P) -> Option<File> {
Ok(f) => Some(f),
Err(error) => {
if let std::io::ErrorKind::NotFound = error.kind() {
error!(message = "Config file not found in path.", ?path);
error!(
message = "Config file not found in path.",
?path,
internal_log_rate_limit = false
);
None
} else {
error!(message = "Error opening config file.", %error, ?path);
error!(message = "Error opening config file.", %error, ?path, internal_log_rate_limit = false);
None
}
}
Expand Down Expand Up @@ -89,7 +93,7 @@ pub fn process_paths(config_paths: &[ConfigPath]) -> Option<Vec<ConfigPath>> {
};

if matches.is_empty() {
error!(message = "Config file not found in path.", path = ?config_pattern);
error!(message = "Config file not found in path.", path = ?config_pattern, internal_log_rate_limit = false);
std::process::exit(exitcode::CONFIG);
}

Expand Down
12 changes: 4 additions & 8 deletions src/config/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,30 +122,26 @@ pub fn spawn_thread<'a>(
info!("Configuration file changed.");
if !changed_components.is_empty() {
info!(
internal_log_rate_limit = true,
"Component {:?} configuration changed.",
changed_components.keys()
);
if changed_components
.iter()
.all(|(_, t)| *t == ComponentType::EnrichmentTable)
{
info!(
internal_log_rate_limit = true,
"Only enrichment tables have changed."
);
info!("Only enrichment tables have changed.");
_ = signal_tx.send(crate::signal::SignalTo::ReloadEnrichmentTables).map_err(|error| {
error!(message = "Unable to reload enrichment tables.", cause = %error, internal_log_rate_limit = true)
error!(message = "Unable to reload enrichment tables.", cause = %error)
});
} else {
_ = signal_tx.send(crate::signal::SignalTo::ReloadComponents(changed_components.into_keys().collect())).map_err(|error| {
error!(message = "Unable to reload component configuration. Restart Vector to reload it.", cause = %error, internal_log_rate_limit = true)
error!(message = "Unable to reload component configuration. Restart Vector to reload it.", cause = %error)
});
}
} else {
_ = signal_tx.send(crate::signal::SignalTo::ReloadFromDisk)
.map_err(|error| {
error!(message = "Unable to reload configuration file. Restart Vector to reload it.", cause = %error, internal_log_rate_limit = true)
error!(message = "Unable to reload configuration file. Restart Vector to reload it.", cause = %error)
});
}
} else {
Expand Down
1 change: 0 additions & 1 deletion src/enrichment_tables/memory/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ impl Memory {
error!(
message = "Error exporting expired items from memory enrichment table.",
error = %error,
internal_log_rate_limit = true,
);
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/internal_events/amqp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pub mod source {
error = ?self.error,
error_type = error_type::REQUEST_FAILED,
stage = error_stage::RECEIVING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand All @@ -57,7 +56,6 @@ pub mod source {
error = ?self.error,
error_type = error_type::ACKNOWLEDGMENT_FAILED,
stage = error_stage::RECEIVING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand All @@ -79,7 +77,6 @@ pub mod source {
error = ?self.error,
error_type = error_type::COMMAND_FAILED,
stage = error_stage::RECEIVING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
1 change: 0 additions & 1 deletion src/internal_events/apache_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ impl InternalEvent for ApacheMetricsParseError<'_> {
stage = error_stage::PROCESSING,
error_type = error_type::PARSER_FAILED,
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
1 change: 0 additions & 1 deletion src/internal_events/aws_cloudwatch_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ impl InternalEvent for AwsCloudwatchLogsMessageSizeError {
error_code = "message_too_long",
error_type = error_type::ENCODER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
1 change: 0 additions & 1 deletion src/internal_events/aws_ec2_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl InternalEvent for AwsEc2MetadataRefreshError {
error = %self.error,
error_type = error_type::REQUEST_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
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 @@ -50,12 +50,10 @@ impl InternalEvent for AwsEcsMetricsParseError<'_> {
error = ?self.error,
stage = error_stage::PROCESSING,
error_type = error_type::PARSER_FAILED,
internal_log_rate_limit = true,
);
debug!(
message = %format!("Failed to parse response:\\n\\n{}\\n\\n", self.body.escape_debug()),
endpoint = %self.endpoint,
internal_log_rate_limit = true,
);
counter!("parse_errors_total").increment(1);
counter!(
Expand Down
1 change: 0 additions & 1 deletion src/internal_events/aws_kinesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ impl InternalEvent for AwsKinesisStreamNoPartitionKeyError<'_> {
partition_key_field = %self.partition_key_field,
error_type = error_type::PARSER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);

counter!(
Expand Down
5 changes: 1 addition & 4 deletions src/internal_events/aws_kinesis_firehose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ impl InternalEvent for AwsKinesisFirehoseRequestReceived<'_> {
debug!(
message = "Handling AWS Kinesis Firehose request.",
request_id = %self.request_id.unwrap_or_default(),
source_arn = %self.source_arn.unwrap_or_default(),
internal_log_rate_limit = true
source_arn = %self.source_arn.unwrap_or_default()
);
}
}
Expand Down Expand Up @@ -47,7 +46,6 @@ impl InternalEvent for AwsKinesisFirehoseRequestError<'_> {
error_type = error_type::REQUEST_FAILED,
error_code = %self.error_code,
request_id = %self.request_id.unwrap_or(""),
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand All @@ -74,7 +72,6 @@ impl InternalEvent for AwsKinesisFirehoseAutomaticRecordDecodeError {
error_type = error_type::PARSER_FAILED,
error_code = %io_error_code(&self.error),
compression = %self.compression,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
7 changes: 0 additions & 7 deletions src/internal_events/aws_sqs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ mod s3 {
error_code = "failed_processing_sqs_message",
error_type = error_type::PARSER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -76,7 +75,6 @@ mod s3 {
error_code = "failed_deleting_some_sqs_messages",
error_type = error_type::ACKNOWLEDGMENT_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -106,7 +104,6 @@ mod s3 {
error_code = "failed_deleting_all_sqs_messages",
error_type = error_type::ACKNOWLEDGMENT_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -150,7 +147,6 @@ mod s3 {
error_code = "failed_deferring_some_sqs_messages",
error_type = error_type::ACKNOWLEDGMENT_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -180,7 +176,6 @@ mod s3 {
error_code = "failed_deferring_all_sqs_messages",
error_type = error_type::ACKNOWLEDGMENT_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand All @@ -206,7 +201,6 @@ impl<E: std::fmt::Display> InternalEvent for SqsMessageReceiveError<'_, E> {
error_code = "failed_fetching_sqs_events",
error_type = error_type::REQUEST_FAILED,
stage = error_stage::RECEIVING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down Expand Up @@ -259,7 +253,6 @@ impl<E: std::fmt::Display> InternalEvent for SqsMessageDeleteError<'_, E> {
error = %self.error,
error_type = error_type::WRITER_FAILED,
stage = error_stage::PROCESSING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
1 change: 0 additions & 1 deletion src/internal_events/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ impl InternalEvent for LargeEventDroppedError {
length = %self.length,
error_type = error_type::CONDITION_FAILED,
stage = error_stage::SENDING,
internal_log_rate_limit = true,
);
counter!(
"component_errors_total",
Expand Down
Loading
Loading