Skip to content

feat: Prepare agent to utilize v2 harvests for MFE registrations#1495

Merged
metal-messiah merged 40 commits intomainfrom
mfe-refactor
Oct 22, 2025
Merged

feat: Prepare agent to utilize v2 harvests for MFE registrations#1495
metal-messiah merged 40 commits intomainfrom
mfe-refactor

Conversation

@metal-messiah
Copy link
Member

@metal-messiah metal-messiah commented Jun 7, 2025

Update the agent to handle harvests for registered targets to use the newly defined v2 endpoint schemas. This will act as the mechanism to handle client-side entity and relationship synthesis as well as ingest MFE specific data. This will be supported for Log, PageAction and JavaScriptError events, but is currently gated behind internal feature flags until a public preview is announced.

Overview

This PR also tackles and simplifies the complexity of the entity-manager by removing it, since distinct harvests are no longer in-spec for MFE entities. All MFE harvests are combined into a single (v2) harvest when applicable.

Related Issue(s)

NR-408585

Testing

Several new tests have been added

@github-actions
Copy link

github-actions bot commented Jun 7, 2025

Supportability Metric Usage Changes:

No matching changes found

Supportability Metrics .md File Changes:

supportability_metrics.md was changed? false

New supportability metrics require changes to supportability_metrics.md, as well as a new PR to Angler. Please ensure an Angler PR is created and linked to this PR.

@github-actions
Copy link

github-actions bot commented Jun 7, 2025

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 25.69 kB / 9.76 kB (gzip) 25.96 kB / 9.8 kB (gzip) 1.05% / 0.44% (gzip)
lite async-chunk 55.61 kB / 18.46 kB (gzip) 53.13 kB / 17.72 kB (gzip) -4.47% / -4.02% (gzip)
pro loader 54.28 kB / 19.19 kB (gzip) 54.4 kB / 19.24 kB (gzip) 0.23% / 0.24% (gzip)
pro async-chunk 94.49 kB / 29.39 kB (gzip) 91.76 kB / 28.79 kB (gzip) -2.89% / -2.05% (gzip)
spa loader 63.08 kB / 21.88 kB (gzip) 63.2 kB / 21.91 kB (gzip) 0.19% / 0.17% (gzip)
spa async-chunk 119.97 kB / 36.7 kB (gzip) 117.17 kB / 36.09 kB (gzip) -2.34% / -1.68% (gzip)

@codecov
Copy link

codecov bot commented Jun 7, 2025

Codecov Report

❌ Patch coverage is 96.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.59%. Comparing base (788d2af) to head (911ea8a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/features/session_replay/aggregate/index.js 77.77% 2 Missing ⚠️
src/loaders/api/register.js 93.54% 1 Missing and 1 partial ⚠️
src/common/harvest/harvester.js 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1495      +/-   ##
==========================================
+ Coverage   88.03%   88.59%   +0.56%     
==========================================
  Files         205      206       +1     
  Lines        7870     7743     -127     
  Branches     1611     1583      -28     
==========================================
- Hits         6928     6860      -68     
+ Misses        817      772      -45     
+ Partials      125      111      -14     
Flag Coverage Δ
unit-tests 81.85% <96.00%> (+0.99%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Jun 7, 2025

Static Badge

Last ran on October 21, 2025 15:26:35 CDT
Checking merge of (911ea8a) into main (788d2af)

@metal-messiah

This comment was marked as outdated.

@metal-messiah metal-messiah changed the title feat: Mfe refactor feat: Prepare agent to utilize v2 harvests for MFE registrations Sep 2, 2025
@metal-messiah metal-messiah marked this pull request as ready for review September 2, 2025 19:45
@ptang-nr ptang-nr self-assigned this Oct 8, 2025
ptang-nr
ptang-nr previously approved these changes Oct 14, 2025
ptang-nr
ptang-nr previously approved these changes Oct 16, 2025
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.

lgtm

@cwli24 cwli24 self-assigned this Oct 16, 2025
ptang-nr
ptang-nr previously approved these changes Oct 16, 2025
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.

Upvote +1

@metal-messiah metal-messiah merged commit a7ac827 into main Oct 22, 2025
35 checks passed
@metal-messiah metal-messiah deleted the mfe-refactor branch October 22, 2025 19:34
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