Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

fix: allow non-objects for plugins to disable automatic tracing#720

Merged
kjin merged 4 commits intogoogleapis:masterfrom
kjin:disable-monkeypatch
Apr 10, 2018
Merged

fix: allow non-objects for plugins to disable automatic tracing#720
kjin merged 4 commits intogoogleapis:masterfrom
kjin:disable-monkeypatch

Conversation

@kjin
Copy link
Copy Markdown
Contributor

@kjin kjin commented Apr 9, 2018

Fixes #719

This change allows users to disable automatic tracing by passing a non-object value (such as false) for the value of config.plugins. It takes advantage of extend's behavior of allowing non-object values to override object values, and vice versa.

Since we do not recommend disabling plugins I have not documented this feature.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 9, 2018
@kjin kjin force-pushed the disable-monkeypatch branch from 23331f8 to 5259f57 Compare April 9, 2018 17:49
Copy link
Copy Markdown
Contributor

@ofrobots ofrobots 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, if you add tests.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2018

Codecov Report

Merging #720 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #720   +/-   ##
=======================================
  Coverage   90.74%   90.74%           
=======================================
  Files          28       28           
  Lines        1491     1491           
  Branches      294      294           
=======================================
  Hits         1353     1353           
  Misses         59       59           
  Partials       79       79
Impacted Files Coverage Δ
src/index.ts 91.78% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eafaa45...8c77f11. Read the comment docs.

@kjin
Copy link
Copy Markdown
Contributor Author

kjin commented Apr 9, 2018

@ofrobots PTAL

Copy link
Copy Markdown
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

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

LGTM w/ nit.

Comment thread src/index.ts Outdated
const config = extend(
true, {[FORCE_NEW]: projectConfig[FORCE_NEW]}, defaultConfig,
envSetConfig, projectConfig, envConfig);
envSetConfig, projectConfig, envConfig, {plugins: {/**/}});

This comment was marked as spam.

@kjin kjin merged commit 068260c into googleapis:master Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants