Skip to content

fix(analytics-core): diagnostics supports multiple script urls#1538

Merged
Mercy811 merged 2 commits into
mainfrom
diagnostics-metadata-support-multiple-scripts
Feb 17, 2026
Merged

fix(analytics-core): diagnostics supports multiple script urls#1538
Mercy811 merged 2 commits into
mainfrom
diagnostics-metadata-support-multiple-scripts

Conversation

@Mercy811
Copy link
Copy Markdown
Contributor

@Mercy811 Mercy811 commented Feb 13, 2026

Summary

Support multiple script URLs in SDK loader metadata

  • registerSdkLoaderMetadata() now accumulates script URLs instead of overwriting. Stored value is an array of normalized URLs; repeated or duplicate-normalized URLs are not added twice.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

Note

Low Risk
Small, localized change to diagnostics URL bookkeeping and matching logic with added test coverage; low blast radius outside error-reporting behavior.

Overview
Updates SDK loader diagnostics metadata to accumulate multiple normalized scriptUrls under GLOBAL_KEY (now stored as an array), deduping repeats and preserving backwards compatibility with the legacy single-string value.

Adjusts uncaught error origin detection to match against any registered script URL (iterating the list) and expands tests to cover array storage, merging/deduping behavior, and matching errors against additional registered URLs.

Written by Cursor Bugbot for commit bd6744b. Configure here.

@Mercy811
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@Mercy811 Mercy811 marked this pull request as ready for review February 13, 2026 20:08
Copy link
Copy Markdown
Collaborator

@daniel-graham-amplitude daniel-graham-amplitude left a comment

Choose a reason for hiding this comment

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

Lgtm!

@Mercy811 Mercy811 merged commit 8ae3b27 into main Feb 17, 2026
8 of 9 checks passed
@Mercy811 Mercy811 deleted the diagnostics-metadata-support-multiple-scripts branch February 17, 2026 23:43
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