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(sdk-trace-web): web worker support #2719

Merged
merged 4 commits into from
Jan 20, 2022

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Jan 17, 2022

Which problem is this PR solving?

This is an initial bootstrap on test facilities on web workers. Packages that target web platforms without specific instrumentation on browsing context API should be able to run their test suites on web workers too.

  • Added guidance of Web API usages.
  • Removed window references in generic functions in sdk-trace-web.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Basically, we are running the test suites again on a web worker environment with karma. If tests that are not intended to run won web workers, they should be relocated to the test/window directory.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #2719 (78ada97) into main (e32879a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2719   +/-   ##
=======================================
  Coverage   93.22%   93.23%           
=======================================
  Files         157      158    +1     
  Lines        5432     5436    +4     
  Branches     1141     1141           
=======================================
+ Hits         5064     5068    +4     
  Misses        368      368           
Impacted Files Coverage Δ
...ckages/opentelemetry-sdk-trace-web/karma.worker.js 100.00% <100.00%> (ø)
packages/opentelemetry-sdk-trace-web/src/utils.ts 95.00% <100.00%> (ø)

@legendecas legendecas changed the title test(sdk-trace-web): run sdk tests on web worker feat(sdk-trace-web): web worker support Jan 19, 2022
@legendecas legendecas marked this pull request as ready for review January 19, 2022 03:14
@legendecas legendecas requested a review from a team January 19, 2022 03:14
Copy link
Member

@johnbley johnbley left a comment

Choose a reason for hiding this comment

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

LGTM; thanks for diligently splitting out the window-specific tests.

@dyladan
Copy link
Member

dyladan commented Jan 20, 2022

thanks for diligently splitting out the window-specific tests.

Agreed

@vmarchaud vmarchaud added the enhancement New feature or request label Jan 20, 2022
@vmarchaud vmarchaud merged commit 04f9edd into open-telemetry:main Jan 20, 2022
@legendecas legendecas deleted the karma-worker branch January 21, 2022 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants