Skip to content

feat: Refactor feature storages #1241

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

Merged
merged 31 commits into from
Nov 11, 2024
Merged

feat: Refactor feature storages #1241

merged 31 commits into from
Nov 11, 2024

Conversation

cwli24
Copy link
Contributor

@cwli24 cwli24 commented Nov 5, 2024

This change rewrites the way every feature stores its respective data to optimize runtime overhead, improve agent internals efficiency, and standardize the way storages are referenced and called.

Overview

This PR also plays a part in preparing for centralizing the harvester by providing a common interface that it can tap into when requesting harvest data on interval. It follows the model as diagramed here: https://whimsical.com/centralized-harvesting-manager-flow-BCxxiTMtWJAqpLL56A7zys

Related Issue(s)

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

Testing

Copy link

github-actions bot commented Nov 5, 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 28.84 kB / 10.51 kB (gzip) 29.15 kB / 10.59 kB (gzip) 1.09% / 0.72% (gzip)
lite async-chunk 52.78 kB / 17.16 kB (gzip) 53.71 kB / 17.48 kB (gzip) 1.75% / 1.83% (gzip)
pro loader 49.89 kB / 17.29 kB (gzip) 50.21 kB / 17.37 kB (gzip) 0.65% / 0.43% (gzip)
pro async-chunk 101.84 kB / 31.12 kB (gzip) 99.95 kB / 30.54 kB (gzip) -1.86% / -1.87% (gzip)
spa loader 57.47 kB / 19.61 kB (gzip) 57.8 kB / 19.69 kB (gzip) 0.57% / 0.4% (gzip)
spa async-chunk 116.86 kB / 35.44 kB (gzip) 114.67 kB / 34.81 kB (gzip) -1.87% / -1.76% (gzip)

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 88.11881% with 36 lines in your changes missing coverage. Please review.

Project coverage is 89.08%. Comparing base (911d8d1) to head (9dae24c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/common/aggregate/event-aggregator.js 75.00% 9 Missing and 1 partial ⚠️
src/features/jserrors/aggregate/index.js 55.55% 5 Missing and 3 partials ⚠️
.../features/session_trace/aggregate/trace/storage.js 77.77% 4 Missing ⚠️
src/features/spa/aggregate/index.js 55.55% 3 Missing and 1 partial ⚠️
src/features/ajax/aggregate/index.js 95.00% 2 Missing ⚠️
src/features/generic_events/aggregate/index.js 81.81% 1 Missing and 1 partial ⚠️
src/features/logging/aggregate/index.js 90.47% 2 Missing ⚠️
src/features/session_trace/aggregate/index.js 94.59% 2 Missing ⚠️
src/features/metrics/aggregate/index.js 80.00% 1 Missing ⚠️
src/features/page_view_timing/aggregate/index.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
+ Coverage   88.49%   89.08%   +0.59%     
==========================================
  Files         169      169              
  Lines        7379     7351      -28     
  Branches     1510     1476      -34     
==========================================
+ Hits         6530     6549      +19     
+ Misses        725      682      -43     
+ Partials      124      120       -4     
Flag Coverage Δ
integration-tests 91.91% <95.74%> (+0.20%) ⬆️
unit-tests 79.75% <74.71%> (+0.26%) ⬆️

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.

Copy link

github-actions bot commented Nov 6, 2024

Static Badge

Last ran on November 11, 2024 11:02:19 CST
Checking merge of (9dae24c) into main (911d8d1)

ptang-nr
ptang-nr previously approved these changes Nov 8, 2024
Copy link
Contributor

@ptang-nr ptang-nr left a comment

Choose a reason for hiding this comment

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

Voting to approve, to the best of my current understanding 👍

metal-messiah
metal-messiah previously approved these changes Nov 10, 2024
Copy link
Member

@metal-messiah metal-messiah left a comment

Choose a reason for hiding this comment

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

Approved, should be released in a standalone release due to impact, so keep in mind the release tree state before merging

@cwli24 cwli24 dismissed stale reviews from metal-messiah and ptang-nr via 9dae24c November 11, 2024 15:54
Copy link
Contributor

@ptang-nr ptang-nr left a comment

Choose a reason for hiding this comment

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

👍

@cwli24 cwli24 merged commit f77380b into main Nov 11, 2024
30 of 32 checks passed
@cwli24 cwli24 deleted the events-storage branch November 11, 2024 17: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.

3 participants