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(js-sdk): add script loader to set up Sentry Javascript SDK #2406

Merged
merged 77 commits into from
Dec 10, 2024

Conversation

buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Nov 12, 2024

📜 Description

This will be merged into feat/js-sdk-integration branch, not main so it's easier to split up PRs and at the end just merge feat/js-sdk-integration into main

💡 Motivation and Context

PR Nr 1 of JS SDK integration

This adds the JS SDK CDN to the document's header so we can access the JS SDK through Dart

💚 How did you test it?

Unit test, integration test, manual check of html document

Screenshot 2024-11-12 at 17 02 12

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

Copy link
Contributor

github-actions bot commented Nov 12, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 3f97c2e

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.83%. Comparing base (13c8257) to head (3f97c2e).
Report is 1 commits behind head on feat/js-sdk-integration.

Files with missing lines Patch % Lines
...ib/src/web/script_loader/sentry_script_loader.dart 75.00% 3 Missing ⚠️
...tter/lib/src/integrations/web_sdk_integration.dart 75.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           feat/js-sdk-integration    #2406      +/-   ##
===========================================================
+ Coverage                    85.04%   85.83%   +0.79%     
===========================================================
  Files                          257       84     -173     
  Lines                         9194     2895    -6299     
===========================================================
- Hits                          7819     2485    -5334     
+ Misses                        1375      410     -965     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@buenaflor buenaflor marked this pull request as draft November 12, 2024 16:14
@buenaflor buenaflor marked this pull request as ready for review December 5, 2024 10:38
Copy link
Collaborator

@denrase denrase left a comment

Choose a reason for hiding this comment

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

Looking good, just some minor comments/questions from my side.

flutter/example/integration_test/utils.dart Outdated Show resolved Hide resolved
flutter/lib/src/web/script_loader/web_script_dom_api.dart Outdated Show resolved Hide resolved
flutter/test/web/sentry_script_loader_test.dart Outdated Show resolved Hide resolved
@buenaflor buenaflor merged commit 2e89903 into feat/js-sdk-integration Dec 10, 2024
48 of 49 checks passed
@buenaflor buenaflor deleted the feat/sentry-script-loader branch December 10, 2024 16:45
@buenaflor buenaflor mentioned this pull request Jan 13, 2025
buenaflor added a commit that referenced this pull request Jan 14, 2025
* feat(js-sdk): add script loader to set up Sentry Javascript SDK (#2406)

* update

* update

* updaet

* Update sentry_js_sdk_version.dart

* temporary ci change

* fix test

* fix compilation

* fix compilation

* fix

* fix test

* update

* fix test

* fix test

* update

* update

* update

* fix analyze

* update

* update

* update validation

* update

* update

* update

* rethrow on automated test mode

* update rethrow

* update

* update tests

* update appending

* update web

* add trusted types and add tests

* formatting

* update comment

* add as browser test

* fix min_version

* fix warnings

* add another test file

* update

* update comment

* try out web integration test

* update

* use ubuntu latest for web

* see if it runs

* update

* fix job

* fix job

* run chromedriver in background

* run correct port

* update

* update

* setup chrome action

* update

* run chrome first

* try

* update

* update

* remove file

* update

* update

* fix tests

* update

* update docs and test cases

* add todo

* update

* update

* add doc and fix tests

* update tests

* update

* update

* Update web_sdk_test.dart

* add test with automatedTestMode false

* update

* remove debug

* remove fn

* update restore flutter onError

* fix analyze

* Update flutter.yml

* feat: sentry web api (#2489)

* update

* update

* update test

* update

* update

* update

* update

* update doc

* update

* update

* update

* update test

* update

* update tests

* use tryCatchSync

* formatting

* fix sentry_flutter_test

* fix analyze

* update test

* fix tests

* update test

* update test

* update scripts

* ignore sentry_web in coverage

* update test

* temporary

* update

* test

* update tests

* update test with mocks

* fix analyze

* update

* update names

* fix test

* update

* update integration

* update comment

* update flutter enricher

* update test

* update

* update flag name

* update

* update binding creation condition

* update

* update integration test

* fix tests

* feat(js-sdk): enable global error handler and dedupe integration (#2566)

* add default integrations

* fix integration test

* feat(js-sdk): use js transport (#2563)

* add envelope sending

* add test

* add test

* update message

* update payload api

* update

* update payload api

* revert hasNativeIntegration

* update

* dont remove scope observer

* fix integration test

* cleanup

* update test

* update test

* cleanup integration test

* improve envelope capturing

* clean up

* fix analyze

* fix tests

* update

* formatting

* fix integration test

* use buckets

* fix log string

* update mocks

* update mocks

* process succeessful envelope items

* update CHANGELOG
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.

4 participants