Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aws_s3 source): replace info! with debug! to avoid spam #22215

Merged
merged 5 commits into from
Jan 16, 2025

Conversation

pront
Copy link
Member

@pront pront commented Jan 15, 2025

Summary

These were missing the internal_log_rate_limit attribute. But also, based on https://github.com/vectordotdev/vector/blob/master/STYLE.md#basic-usage they should have been debug! statements.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
    • make check-all is a good command to run locally. This check is
      defined here. Some of these
      checks might not be relevant to your PR. For Rust changes, at the very least you should run:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@pront pront requested a review from jszwedko January 15, 2025 17:12
@pront pront requested a review from a team as a code owner January 15, 2025 17:12
@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Jan 15, 2025
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Jan 15, 2025
@pront pront removed domain: sources Anything related to the Vector's sources no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Jan 15, 2025
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Jan 15, 2025
@pront pront changed the title fix(aws_sqs sink): replace info! with debug! to avoid spam fix(aws_sqs source): replace info! with debug! to avoid spam Jan 15, 2025
@pront pront changed the title fix(aws_sqs source): replace info! with debug! to avoid spam fix(aws_s3 source): replace info! with debug! to avoid spam Jan 15, 2025
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Jan 15, 2025

Datadog Report

Branch report: pront/fix-sqs-spam
Commit report: b722932
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.43s Total Time

message = "Got S3 object from SQS notification.",
bucket = s3_event.s3.bucket.name,
key = s3_event.s3.object.key
key = s3_event.s3.object.key,
internal_log_rate_limit = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest looping in the author that added these to see if it is still useful for them as a throttled log. If it isn't we could consider dropping it altogether and re-adding it once we figure out a better way to do so without increasing noise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original PR: #22083.

Please take a look at the above cc @fdamstra

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this is useful as a throttled log nor as a debug log. IMO, this information is appropriate to be logged in full, and the info level is appropriate.

This is similar to what the file source does when it detects, adds, and finishes processing a new input file.

Similar, for files ingested through s3, we want a record that every file was ingested to ensure completeness.

Is this addressing a complaint? I'm curious of the use case where this information isn't desired. The lack of these logs has been a major source of frustration for my users. Perhaps there's a way to make it a configurable option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another user complained in Discord today: thread.

Relying on logs/traces doesn't sound robust. How about we introduced another aws_s3 source output and publish audit events to it? Open to more ideas of course.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this being merged, but would like to continue discussions. If we drop it to debug I should be able to set VECTOR_LOG=sources::aws_s3=debug,info and get the data we need.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think internal_log_rate_limit should be set to false. People who want this information want it for every object.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 9bb3978.

@jszwedko jszwedko added this to the Vector v0.44.1 milestone Jan 15, 2025
@jszwedko
Copy link
Member

Created a new 0.44.1 milestone and added this here: https://github.com/vectordotdev/vector/milestone/138

@pront pront added this pull request to the merge queue Jan 15, 2025
@pront pront removed this pull request from the merge queue due to a manual request Jan 15, 2025
@pront pront enabled auto-merge January 15, 2025 23:46
@pront pront added this pull request to the merge queue Jan 16, 2025
Merged via the queue into master with commit e27ea3a Jan 16, 2025
88 checks passed
@pront pront deleted the pront/fix-sqs-spam branch January 16, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sources Anything related to the Vector's sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants