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: logging bundle optimization #1089

Merged
merged 4 commits into from
Jul 2, 2024
Merged

feat: logging bundle optimization #1089

merged 4 commits into from
Jul 2, 2024

Conversation

metal-messiah
Copy link
Member

@metal-messiah metal-messiah commented Jun 26, 2024

Improve the bundle size of the logging feature by moving non-critical pieces to the aggregation portion of the agent code.

Overview

This PR shifts deferrable portions of the logging feature logic to the aggregator portion of the agent to improve loader build size.

Related Issue(s)

Testing

Tests have been shifted to match new locations, but logic should remain

Copy link

github-actions bot commented Jun 26, 2024

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 34.73 kB / 12.13 kB (gzip) 34.1 kB / 11.9 kB (gzip) -1.82% / -1.9% (gzip)
lite async-chunk 50.09 kB / 16.18 kB (gzip) 50.09 kB / 16.18 kB (gzip) 0% / 0% (gzip)
pro loader 55.29 kB / 18.72 kB (gzip) 54.79 kB / 18.54 kB (gzip) -0.91% / -0.93% (gzip)
pro async-chunk 96.12 kB / 28.85 kB (gzip) 96.73 kB / 28.99 kB (gzip) 0.63% / 0.47% (gzip)
spa loader 63.23 kB / 21.14 kB (gzip) 62.73 kB / 20.97 kB (gzip) -0.79% / -0.8% (gzip)
spa async-chunk 111.23 kB / 33.23 kB (gzip) 111.84 kB / 33.37 kB (gzip) 0.55% / 0.42% (gzip)
lite-polyfills loader 128.42 kB / 41.46 kB (gzip) 127.73 kB / 41.2 kB (gzip) -0.54% / -0.62% (gzip)
lite-polyfills async-chunk 63.99 kB / 18.45 kB (gzip) 63.99 kB / 18.45 kB (gzip) 0% / 0% (gzip)
pro-polyfills loader 150.62 kB / 47.69 kB (gzip) 150.11 kB / 47.49 kB (gzip) -0.33% / -0.42% (gzip)
pro-polyfills async-chunk 116.19 kB / 31.08 kB (gzip) 116.72 kB / 31.22 kB (gzip) 0.45% / 0.44% (gzip)
spa-polyfills loader 158.81 kB / 49.85 kB (gzip) 158.31 kB / 49.65 kB (gzip) -0.32% / -0.39% (gzip)
spa-polyfills async-chunk 133.16 kB / 35.78 kB (gzip) 133.69 kB / 35.92 kB (gzip) 0.39% / 0.38% (gzip)

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.66%. Comparing base (03efcf3) to head (c08747e).
Report is 2 commits behind head on main.

Files Patch % Lines
src/features/logging/aggregate/index.js 87.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1089      +/-   ##
==========================================
+ Coverage   87.62%   87.66%   +0.03%     
==========================================
  Files         162      162              
  Lines        7249     7254       +5     
  Branches     1421     1421              
==========================================
+ Hits         6352     6359       +7     
+ Misses        781      779       -2     
  Partials      116      116              
Flag Coverage Δ
unit-tests 76.43% <90.00%> (+<0.01%) ⬆️

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.

@metal-messiah metal-messiah changed the title feat: logging bundle optimization effort feat: logging bundle optimization Jun 26, 2024
@metal-messiah metal-messiah marked this pull request as ready for review June 26, 2024 18:07
Copy link

github-actions bot commented Jun 26, 2024

Static Badge

Last ran on June 26, 2024 18:15:04 CDT
Checking merge of (9c57682) into main (03efcf3)

Copy link
Contributor

@patrickhousley patrickhousley left a comment

Choose a reason for hiding this comment

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

I still wonder if we could do something like having two constants files, one with all the codes, and one that maps the codes to strings that gets async loaded in the metrics agg or something. I know we can't do just one constants file because webpack won't split individual js files.

@metal-messiah metal-messiah merged commit 83d7d1e into main Jul 2, 2024
20 checks passed
@metal-messiah metal-messiah deleted the logging-optimization branch July 2, 2024 16:36
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