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

Reduced the volume of logging from the botocore library #19376

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

Kyle-Neale
Copy link
Contributor

What does this PR do?

This prevents propagation of botocore logs into the Agent.

Motivation

yyyy-MM-dd HH:mm:ss UTC | CORE | INFO | (pkg/collector/python/* in LogMessage) | - | (credentials.py:1075) | Found credentials from IAM Role: *

This log pattern spams the Agent every time the check is run so we prevent this from happening by setting the botocore
log level to CRITICAL

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@Kyle-Neale Kyle-Neale force-pushed the kyle.neale/fix-amazon-msk-botocore-logs branch from 8fe3e81 to d1e1404 Compare January 12, 2025 02:46
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.56%. Comparing base (edf5718) to head (89b3d3e).
Report is 12 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
amazon_msk 89.24% <100.00%> (+0.04%) ⬆️
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?

Flags with carried forward coverage won't be shown. Click here to find out more.

dkirov-dd
dkirov-dd previously approved these changes Jan 13, 2025
@nubtron
Copy link
Contributor

nubtron commented Jan 13, 2025

Thanks @Kyle-Neale! And @dkirov-dd for finding setLevel!

Copy link
Contributor

@nubtron nubtron left a comment

Choose a reason for hiding this comment

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

@Kyle-Neale A changelog entry could be useful here, so that the Agent team can track the fix, and in case customers have noticed it.

nubtron
nubtron previously approved these changes Jan 13, 2025
Copy link
Contributor

@nubtron nubtron left a comment

Choose a reason for hiding this comment

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

Just a comment! We still log at the critical level, so we're not totally preventing the logging. Also the people reading the log will be waiting for something like "Reduced the volume of logging from the botocore library".

@Kyle-Neale Kyle-Neale force-pushed the kyle.neale/fix-amazon-msk-botocore-logs branch from 50b429f to 89b3d3e Compare January 13, 2025 17:05
@Kyle-Neale Kyle-Neale changed the title Prevent propagation of botocore logs into the Agent Reduced the volume of logging from the botocore library Jan 13, 2025
@Kyle-Neale Kyle-Neale added this pull request to the merge queue Jan 13, 2025
Merged via the queue into master with commit 64cafe2 Jan 13, 2025
35 checks passed
@Kyle-Neale Kyle-Neale deleted the kyle.neale/fix-amazon-msk-botocore-logs branch January 13, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants