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: Updated api.recordLogEvent to no longer truncate the message key in log event #2949

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

rChaoz
Copy link
Contributor

@rChaoz rChaoz commented Feb 13, 2025

See the related issue: fixes #2921

In short: logEvent.message can either be a simple string message, in which truncating is OK, but it can also be the full JSON log (stringified), in which case it mustn't be truncated.

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.30%. Comparing base (6acf535) to head (64e0d9e).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2949      +/-   ##
==========================================
- Coverage   97.35%   97.30%   -0.05%     
==========================================
  Files         317      317              
  Lines       48625    48690      +65     
==========================================
+ Hits        47337    47379      +42     
- Misses       1288     1311      +23     
Flag Coverage Δ
integration-tests-cjs-18.x ?
integration-tests-cjs-20.x 72.34% <ø> (-0.01%) ⬇️
integration-tests-cjs-22.x 72.56% <ø> (-0.01%) ⬇️
integration-tests-esm-18.x 49.96% <ø> (+0.02%) ⬆️
integration-tests-esm-20.x 49.97% <ø> (+0.02%) ⬆️
integration-tests-esm-22.x 50.02% <ø> (+0.02%) ⬆️
unit-tests-18.x 89.02% <ø> (-0.04%) ⬇️
unit-tests-20.x 89.02% <ø> (-0.04%) ⬇️
unit-tests-22.x 89.03% <ø> (-0.04%) ⬇️
versioned-tests-18.x 79.58% <ø> (-0.10%) ⬇️
versioned-tests-20.x 79.61% <ø> (-0.07%) ⬇️
versioned-tests-22.x ?

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 previously approved these changes Feb 13, 2025
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

thanks for adding the test!

@bizob2828 bizob2828 changed the title fix: don't truncate message in recordLogEvent fix: Updated api.recordLogEvent to no longer truncate the message key in log event Feb 13, 2025
@bizob2828 bizob2828 merged commit 8dd557b into newrelic:main Feb 13, 2025
27 of 28 checks passed
@rChaoz rChaoz deleted the fix/log-truncate branch February 13, 2025 23:12
@bizob2828
Copy link
Member

@rChaoz this PR landed in 12.14.0, please upgrade.

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.

Manual logs are truncated when they shouldn't
3 participants