Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekel committed Dec 8, 2018
1 parent 24179b2 commit 4b6cb03
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For example:
"replacement": "***" // optional. default: '__MASKED__' - The default value to replace
},
"hideErrors": { // optional. default: all errors will be tagged with error=true and set with sampling priority 1
"users": [404, 409] // optional. tag selected services errors with error=false and don't set their sampling priority to 1. i.e. hide 404 & 409 errors of the `users` service
"users": [404, 409] // optional. don't tag selected services errors with error=true and don't set their sampling priority to 1. i.e. hide 404 & 409 errors of the `users` service
},
"debug": true // optional. default: false - Sets sampling priority to 1 to force sampling of all requests
}
Expand Down
4 changes: 1 addition & 3 deletions hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ const opentracingError = (options = {}) => {
span = params.span;
}

if (options.hideErrors && options.hideErrors[path] && options.hideErrors[path].includes(code)) {
span.setTag(opentracing.Tags.ERROR, false);
} else {
if (!options.hideErrors || !options.hideErrors[path] || !options.hideErrors[path].includes(code)) {
span.setTag(opentracing.Tags.SAMPLING_PRIORITY, 1);
span.setTag(opentracing.Tags.ERROR, true);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feathers-opentracing",
"version": "2.2.3",
"version": "2.2.4",
"description": "OpenTracing integration for FeathersJS services",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 4b6cb03

Please sign in to comment.