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

LogSenderService sends too much log after config change #1757

Closed
meiao opened this issue Feb 23, 2024 · 2 comments
Closed

LogSenderService sends too much log after config change #1757

meiao opened this issue Feb 23, 2024 · 2 comments
Assignees
Labels
1 Story Point Estimate jan-mar qtr Represents proposed work item for the Jan-Mar quarter

Comments

@meiao
Copy link
Contributor

meiao commented Feb 23, 2024

Description

After changing the config file, LogSenderService will get the new value for application_logging.forwarding.max_samples_stored and use that to limit the reservoirs. That configuration option is measured in logs/minute, but logs use real time streaming, so they are gathered every 5 seconds.

So every 5 seconds the agent will harvest and send up to what it should send in 1 minute.

This ignores any restrictions set from the backend. And is not limited to changes on this configuration option, any change in the config file (other than that config option) will make the LogSenderService send 12 times more logs than expected.

Also, TransactionLog always use the value from the config, never the one returned from the backend. This causes TransactionLog to always hold up to 12 times more logs than could ever be sent.

Steps to reproduce

Create an application that logs 20 lines on each request.
Configure the agent turning on log forwarding and set application_logging.forwarding.max_samples_stored to 120.
Start the application and make 1 request.
Check logs, metrics or UI and see that 10 log lines were sent.
Change the configuration and set application_logging.forwarding.max_samples_stored to 20.
Wait until the new settings are loaded.
Make one request. This request should still sends 10 log lines as the reservoirs are not regenerated unless they are harvested.
Make another request. This request will send 20 log lines.

@workato-integration
Copy link

@jbedell-newrelic jbedell-newrelic self-assigned this Feb 29, 2024
@kford-newrelic kford-newrelic added the estimate Issue needing estimation label Mar 4, 2024
@kford-newrelic kford-newrelic added 1 Story Point Estimate and removed estimate Issue needing estimation labels Mar 4, 2024
@kford-newrelic kford-newrelic moved this from Triage to In Sprint in Java Engineering Board Mar 4, 2024
@kford-newrelic kford-newrelic added the jan-mar qtr Represents proposed work item for the Jan-Mar quarter label Mar 6, 2024
@jbedell-newrelic
Copy link
Contributor

Resolved by: #1784

@github-project-automation github-project-automation bot moved this from In Sprint to Code Complete/Done in Java Engineering Board Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Story Point Estimate jan-mar qtr Represents proposed work item for the Jan-Mar quarter
Projects
Archived in project
Development

No branches or pull requests

3 participants