Skip to content

Commit 9a78f9a

Browse files
committed
switch to internal diagnostics channel with node bug patch (#3002)
1 parent 3ca0123 commit 9a78f9a

File tree

29 files changed

+222
-78
lines changed

29 files changed

+222
-78
lines changed

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"eslint:recommended",
77
"standard"
88
],
9+
"plugins": [
10+
"mocha",
11+
"n"
12+
],
913
"env": {
1014
"node": true,
1115
"es2020": true
@@ -18,6 +22,7 @@
1822
"object-curly-spacing": [2, "always"],
1923
"import/no-extraneous-dependencies": 2,
2024
"standard/no-callback-literal": 0,
21-
"no-prototype-builtins": 0
25+
"no-prototype-builtins": 0,
26+
"n/no-restricted-require": [2, ["diagnostics_channel"]]
2227
}
2328
}

LICENSE-3rdparty.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dev,esbuild,MIT,Copyright (c) 2020 Evan Wallace
4040
dev,eslint,MIT,Copyright JS Foundation and other contributors https://js.foundation
4141
dev,eslint-config-standard,MIT,Copyright Feross Aboukhadijeh
4242
dev,eslint-plugin-import,MIT,Copyright 2015 Ben Mosher
43+
dev,eslint-plugin-n,MIT,Copyright 2015 Toru Nagashima
4344
dev,eslint-plugin-node,MIT,Copyright 2015 Toru Nagashima
4445
dev,eslint-plugin-promise,ISC,jden and other contributors
4546
dev,eslint-plugin-standard,MIT,Copyright 2015 Jamund Ferguson

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"eslint": "^8.23.0",
109109
"eslint-config-standard": "^11.0.0-beta.0",
110110
"eslint-plugin-import": "^2.8.0",
111+
"eslint-plugin-n": "^15.7.0",
111112
"eslint-plugin-node": "^5.2.1",
112113
"eslint-plugin-promise": "^3.6.0",
113114
"eslint-plugin-standard": "^3.0.1",

packages/datadog-core/src/storage/async_resource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const { createHook, executionAsyncResource } = require('async_hooks')
4-
const { channel } = require('diagnostics_channel')
4+
const { channel } = require('../../../diagnostics_channel')
55

66
const beforeCh = channel('dd-trace:storage:before')
77
const afterCh = channel('dd-trace:storage:after')

packages/datadog-instrumentations/src/helpers/instrument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const dc = require('diagnostics_channel')
3+
const dc = require('../../../diagnostics_channel')
44
const semver = require('semver')
55
const instrumentations = require('./instrumentations')
66
const { AsyncResource } = require('async_hooks')

packages/datadog-instrumentations/src/helpers/register.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const { channel } = require('diagnostics_channel')
3+
const { channel } = require('../../../diagnostics_channel')
44
const path = require('path')
55
const semver = require('semver')
66
const Hook = require('./hook')

packages/dd-trace/src/appsec/gateway/channels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const dc = require('diagnostics_channel')
3+
const dc = require('../../../../diagnostics_channel')
44

55
// TODO: use TBD naming convention
66
// or directly use http plugin's channels

packages/dd-trace/src/appsec/iast/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { enableAllAnalyzers, disableAllAnalyzers } = require('./analyzers')
33
const web = require('../../plugins/util/web')
44
const { storage } = require('../../../../datadog-core')
55
const overheadController = require('./overhead-controller')
6-
const dc = require('diagnostics_channel')
6+
const dc = require('../../../../diagnostics_channel')
77
const iastContextFunctions = require('./iast-context')
88
const { enableTaintTracking, disableTaintTracking, createTransaction, removeTransaction } = require('./taint-tracking')
99

packages/dd-trace/src/appsec/iast/telemetry/logs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const dc = require('diagnostics_channel')
3+
const dc = require('../../../../../diagnostics_channel')
44
const logCollector = require('./log_collector')
55
const { sendData } = require('../../../telemetry/send-data')
66
const log = require('../../../log')

packages/dd-trace/src/dcitm.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
// TODO: Figure out why we can't use the internal version.
4+
// eslint-disable-next-line n/no-restricted-require
35
const dc = require('diagnostics_channel')
46

57
const CHANNEL_PREFIX = 'dd-trace:bundledModuleLoadStart'

0 commit comments

Comments
 (0)