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

chore: splitting BasePlugin into browser and node #981

Merged
merged 8 commits into from
May 12, 2020

Conversation

obecny
Copy link
Member

@obecny obecny commented Apr 24, 2020

Which problem is this PR solving?

Short description of the changes

  • Splitting the Base Plugin to avoid dependency from node in browser

@obecny obecny added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 24, 2020
@obecny obecny self-assigned this Apr 24, 2020
@codecov-io
Copy link

codecov-io commented Apr 28, 2020

Codecov Report

Merging #981 into master will decrease coverage by 0.05%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #981      +/-   ##
==========================================
- Coverage   94.95%   94.90%   -0.06%     
==========================================
  Files         210      211       +1     
  Lines        8571     8576       +5     
  Branches      772      772              
==========================================
  Hits         8139     8139              
- Misses        432      437       +5     
Impacted Files Coverage Δ
...ntelemetry-core/src/platform/BaseAbstractPlugin.ts 60.00% <60.00%> (ø)
...opentelemetry-core/src/platform/node/BasePlugin.ts 81.08% <100.00%> (ø)
...ages/opentelemetry-core/src/platform/node/index.ts 100.00% <100.00%> (ø)
...pentelemetry-core/test/platform/BasePlugin.test.ts 93.10% <100.00%> (ø)
...ckages/opentelemetry-core/src/common/NoopLogger.ts 60.00% <0.00%> (-20.00%) ⬇️

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

There are conflicts that need to be resolved but this lgtm

@@ -10,7 +10,7 @@
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts --exclude 'test/platform/browser/**/*.ts'",
Copy link
Member

Choose a reason for hiding this comment

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

Just curious to know, why do we have to do this? Also, do you think we should add this to other common packages like api, tracing etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

if there are only dedicated tests for browser then this is the way to avoid testing them in mocha. Some of our packages already have things like this, for example collector has common tests and then separate for node and browser.

@mayurkale22 mayurkale22 added the Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label May 11, 2020
@dyladan dyladan merged commit 2c9ed63 into open-telemetry:master May 12, 2020
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
…n-telemetry#981)

* feat: add new instrumentations into auto-instrumentations-node

* test: test to make sure all installed instrumentations are added

* fix: register the added instrumentations

* test: remove the redundant test

* fix: add fs instrumentation back I missed during conflict resolution

* fix: add config argument to RouterInstrumentation

* style: lint it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants