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: Fixed queueing of logs from child loggers #2945

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

bizob2828
Copy link
Member

@bizob2828 bizob2828 commented Feb 12, 2025

Description

It was discovered that components of the agent that rely on child loggers and adding logging from those child loggers before a root logger is configured crashes the agent. This is because the child logger did not get assigned a log queue. Once I assigned that, I realized it was missing the extras associated with a logger, most notably the component. This PR fixes both of those issues and adds tests to ensure that you can queue logs from a child logger and it gets the appropriate component in a given log like when the queue is flushed and logged accordingly.

Related Issues

Closes #2941

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.58%. Comparing base (b85111c) to head (16b6c6e).
Report is 7 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b85111c) and HEAD (16b6c6e). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (b85111c) HEAD (16b6c6e)
unit-tests-18.x 1 0
integration-tests-cjs-18.x 1 0
unit-tests-22.x 1 0
unit-tests-20.x 1 0
integration-tests-cjs-20.x 1 0
integration-tests-cjs-22.x 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2945       +/-   ##
===========================================
- Coverage   97.35%   79.58%   -17.77%     
===========================================
  Files         317      307       -10     
  Lines       48619    47460     -1159     
===========================================
- Hits        47331    37770     -9561     
- Misses       1288     9690     +8402     
Flag Coverage Δ
integration-tests-cjs-18.x ?
integration-tests-cjs-20.x ?
integration-tests-cjs-22.x ?
integration-tests-esm-18.x 49.95% <100.00%> (+<0.01%) ⬆️
integration-tests-esm-20.x 49.96% <100.00%> (+<0.01%) ⬆️
integration-tests-esm-22.x 50.01% <100.00%> (+<0.01%) ⬆️
unit-tests-18.x ?
unit-tests-20.x ?
unit-tests-22.x ?
versioned-tests-18.x 79.49% <100.00%> (-0.18%) ⬇️
versioned-tests-20.x 79.50% <100.00%> (-0.18%) ⬇️
versioned-tests-22.x 79.50% <100.00%> (-0.18%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bizob2828 bizob2828 merged commit 888cfe8 into newrelic:main Feb 13, 2025
29 of 30 checks passed
@bizob2828 bizob2828 deleted the fix-queueing-log-entries branch February 13, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

Agent crash when specifying malformed labels
2 participants