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

feat: Aggregate log events based on rum flag #1253

Merged
merged 10 commits into from
Nov 18, 2024
Merged

Conversation

ptang-nr
Copy link
Contributor

@ptang-nr ptang-nr commented Nov 13, 2024

Aggregate logging events according to the log flag received from rum call to BCS.

Overview

Part 2 of the auto-logging feature work. This work will enable the logging feature to be controlled via BCS, which is ultimately based on user settings from UI (on/off, sampling, log level).

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-323597

Testing

Extended existing logging aggregate unit and e2e tests around handling the flag. Includes tests for each logging mode to ensure log messages of equal or higher levels are collected. For example, if the log flag = 3 (INFO), then collect console.error, console.warn, console.info, and console.log events.

Extended existing tests to ensure no harvests when rum flag = 0 and events are drained.

@ptang-nr ptang-nr changed the base branch from main to auto-logging November 13, 2024 22:44
Copy link

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 29.15 kB / 10.59 kB (gzip) 29.15 kB / 10.59 kB (gzip) 0% / 0% (gzip)
lite async-chunk 53.71 kB / 17.48 kB (gzip) 53.71 kB / 17.48 kB (gzip) 0% / 0% (gzip)
pro loader 50.21 kB / 17.37 kB (gzip) 50.65 kB / 17.49 kB (gzip) 0.88% / 0.67% (gzip)
pro async-chunk 99.95 kB / 30.54 kB (gzip) 100.09 kB / 30.59 kB (gzip) 0.15% / 0.15% (gzip)
spa loader 57.8 kB / 19.69 kB (gzip) 58.24 kB / 19.8 kB (gzip) 0.77% / 0.56% (gzip)
spa async-chunk 114.67 kB / 34.82 kB (gzip) 114.81 kB / 34.86 kB (gzip) 0.13% / 0.13% (gzip)

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (auto-logging@d6ccc86). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             auto-logging    #1253   +/-   ##
===============================================
  Coverage                ?   89.11%           
===============================================
  Files                   ?      169           
  Lines                   ?     7371           
  Branches                ?     1478           
===============================================
  Hits                    ?     6569           
  Misses                  ?      682           
  Partials                ?      120           
Flag Coverage Δ
integration-tests 91.93% <100.00%> (?)
unit-tests 79.80% <100.00%> (?)

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.


🚨 Try these New Features:

Copy link

github-actions bot commented Nov 13, 2024

Static Badge

Last ran on November 15, 2024 17:55:24 CST
Checking merge of (86e84aa) into auto-logging (7c084c2)

@ptang-nr ptang-nr marked this pull request as ready for review November 15, 2024 23:57
@ptang-nr
Copy link
Contributor Author

Mentioned in standup today (and got ack'd) that the default level was changed after the initial approval. We will re-review again when officially merging feat branch to main, so gonna go ahead and merge now.

@ptang-nr ptang-nr merged commit bb7ab4d into auto-logging Nov 18, 2024
14 checks passed
@ptang-nr ptang-nr deleted the NR-323597-eval-flag branch November 18, 2024 23:06
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.

2 participants