Skip to content

Commit 6de633a

Browse files
committed
Fix detection of stacks originating from dd-trace
When an error is logged, its message is redacted unless it's originating from with the tracer. Previously it would only detect it as coming from within the tracer if the filepath was within the `packages` directory. This meant that some errors originating from the tracer would be redacted even though they shouldn't. This problem can be traced back to the following PR: #3593
1 parent 62593f2 commit 6de633a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dd-trace/src/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function globMatch (pattern, subject) {
6666
function calculateDDBasePath (dirname) {
6767
const dirSteps = dirname.split(path.sep)
6868
const packagesIndex = dirSteps.lastIndexOf('packages')
69-
return dirSteps.slice(0, packagesIndex + 1).join(path.sep) + path.sep
69+
return dirSteps.slice(0, packagesIndex).join(path.sep) + path.sep
7070
}
7171

7272
function hasOwn (object, prop) {

0 commit comments

Comments
 (0)