@datadog/pprof 5.19.0 → 5.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/src/otel-thread-ctx.d.ts +0 -4
- package/out/src/otel-thread-ctx.js +20 -21
- package/out/src/otel-thread-ctx.js.map +1 -1
- package/package.json +5 -5
- package/prebuilds/darwin-arm64/dd_pprof.node.abi108.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi111.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi115.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi120.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi127.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi131.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi137.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi141.node +0 -0
- package/prebuilds/darwin-arm64/dd_pprof.node.abi147.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi108.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi111.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi115.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi120.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi127.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi131.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi137.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi141.node +0 -0
- package/prebuilds/darwin-x64/dd_pprof.node.abi147.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi108.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi111.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi115.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi120.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi127.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi131.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi137.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi141.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.musl.node.abi147.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi108.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi111.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi115.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi120.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi127.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi131.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi137.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi141.node +0 -0
- package/prebuilds/linux-arm64/dd_pprof.node.abi147.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi108.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi111.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi115.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi120.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi127.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi131.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi137.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi141.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.musl.node.abi147.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi108.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi111.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi115.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi120.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi127.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi131.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi137.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi141.node +0 -0
- package/prebuilds/linux-x64/dd_pprof.node.abi147.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi108.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi111.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi115.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi120.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi127.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi131.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi137.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi141.node +0 -0
- package/prebuilds/win32-x64/dd_pprof.node.abi147.node +0 -0
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
export interface ProcessContextAttributes {
|
|
7
7
|
readonly 'threadlocal.schema_version': 'nodejs_v1_dev';
|
|
8
8
|
readonly 'threadlocal.attribute_key_map': readonly string[];
|
|
9
|
-
readonly 'threadlocal.js_object_record_offset': number;
|
|
10
|
-
readonly 'threadlocal.tagged_size': number;
|
|
11
|
-
readonly 'threadlocal.js_map_table_offset': number;
|
|
12
|
-
readonly 'threadlocal.ordered_hash_map_header_size': number;
|
|
13
9
|
}
|
|
14
10
|
/**
|
|
15
11
|
* A thread-context record. Construct with `new ThreadContext(...)`; install
|
|
@@ -37,34 +37,32 @@ const path_1 = require("path");
|
|
|
37
37
|
const node_async_hooks_1 = require("node:async_hooks");
|
|
38
38
|
const async_context_frame_1 = require("./async-context-frame");
|
|
39
39
|
const SCHEMA_VERSION = 'nodejs_v1_dev';
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
// the OTEP anyway, so the fallbacks just keep processContextAttributes
|
|
44
|
-
// consistent in shape.
|
|
45
|
-
let JS_OBJECT_RECORD_OFFSET = 0x18;
|
|
46
|
-
let TAGGED_SIZE = 8;
|
|
47
|
-
let JS_MAP_TABLE_OFFSET = 0x18;
|
|
48
|
-
let ORDERED_HASH_MAP_HEADER_SIZE = 0x10;
|
|
40
|
+
// Why this process can't honor the schema, if it can't. Only meaningful on
|
|
41
|
+
// Linux, the one platform the reader contract covers.
|
|
42
|
+
let whyUnpublishable = () => undefined;
|
|
49
43
|
// Debug accessor (not part of the stable API; for tests / reader dev).
|
|
50
44
|
let _currentRecordBytes = () => undefined;
|
|
51
45
|
exports._currentRecordBytes = _currentRecordBytes;
|
|
52
46
|
if (process.platform === 'linux') {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
54
47
|
const findBinding = require('node-gyp-build');
|
|
55
48
|
const addon = findBinding((0, path_1.join)(__dirname, '..', '..'));
|
|
56
|
-
JS_OBJECT_RECORD_OFFSET = addon.otelThreadCtxJsObjectRecordOffset;
|
|
57
|
-
TAGGED_SIZE = addon.otelThreadCtxTaggedSize;
|
|
58
|
-
JS_MAP_TABLE_OFFSET = addon.otelThreadCtxJsMapTableOffset;
|
|
59
|
-
ORDERED_HASH_MAP_HEADER_SIZE = addon.otelThreadCtxOrderedHashMapHeaderSize;
|
|
60
49
|
exports.ThreadContext = addon.threadContext;
|
|
50
|
+
whyUnpublishable = () => {
|
|
51
|
+
if (!(0, async_context_frame_1.isAsyncContextFrameActive)()) {
|
|
52
|
+
return `async_context_frame support is unavailable: ${(0, async_context_frame_1.asyncContextFrameHint)()}`;
|
|
53
|
+
}
|
|
54
|
+
if (!addon.otelThreadCtxRecordSlotOffsetHolds) {
|
|
55
|
+
return 'V8 does not place internal fields where the addon was built to expect them';
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
};
|
|
61
59
|
let als;
|
|
62
60
|
function ensureHook() {
|
|
63
61
|
if (als)
|
|
64
62
|
return als;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
const reason = whyUnpublishable();
|
|
64
|
+
if (reason) {
|
|
65
|
+
throw new Error(`otel thread-ctx writer can't publish on this Node: ${reason}.`);
|
|
68
66
|
}
|
|
69
67
|
als = new node_async_hooks_1.AsyncLocalStorage();
|
|
70
68
|
addon.otelThreadCtxStoreAls(als);
|
|
@@ -137,6 +135,11 @@ else {
|
|
|
137
135
|
* duplicates.
|
|
138
136
|
*/
|
|
139
137
|
function getProcessContextAttributes(keys) {
|
|
138
|
+
// A reader would find nothing or mis-walk, so don't declare the schema.
|
|
139
|
+
const reason = whyUnpublishable();
|
|
140
|
+
if (reason) {
|
|
141
|
+
throw new Error(`can't declare ${SCHEMA_VERSION} on this Node: ${reason}.`);
|
|
142
|
+
}
|
|
140
143
|
if (!Array.isArray(keys)) {
|
|
141
144
|
throw new TypeError('keys must be an array of attribute names');
|
|
142
145
|
}
|
|
@@ -157,10 +160,6 @@ function getProcessContextAttributes(keys) {
|
|
|
157
160
|
return Object.freeze({
|
|
158
161
|
'threadlocal.schema_version': SCHEMA_VERSION,
|
|
159
162
|
'threadlocal.attribute_key_map': Object.freeze(keys.slice()),
|
|
160
|
-
'threadlocal.js_object_record_offset': JS_OBJECT_RECORD_OFFSET,
|
|
161
|
-
'threadlocal.tagged_size': TAGGED_SIZE,
|
|
162
|
-
'threadlocal.js_map_table_offset': JS_MAP_TABLE_OFFSET,
|
|
163
|
-
'threadlocal.ordered_hash_map_header_size': ORDERED_HASH_MAP_HEADER_SIZE,
|
|
164
163
|
});
|
|
165
164
|
}
|
|
166
165
|
//# sourceMappingURL=otel-thread-ctx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel-thread-ctx.js","sourceRoot":"","sources":["../../ts/src/otel-thread-ctx.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;
|
|
1
|
+
{"version":3,"file":"otel-thread-ctx.js","sourceRoot":"","sources":["../../ts/src/otel-thread-ctx.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AA+PH,kEA6BC;AA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AAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,4BAA4B,EAAE,cAAc;QAC5C,+BAA+B,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;KAC7D,CAA6B,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/pprof",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.0",
|
|
4
4
|
"description": "pprof support for Node.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
"license": "Apache-2.0",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"node-gyp-build": "^4.8.4",
|
|
41
|
-
"pprof-format": "^2.3.
|
|
41
|
+
"pprof-format": "^2.3.2",
|
|
42
42
|
"source-map": "^0.8.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/mocha": "^10.0.1",
|
|
46
|
-
"@types/node": "26.
|
|
46
|
+
"@types/node": "26.6.3",
|
|
47
47
|
"@types/semver": "^7.8.0",
|
|
48
48
|
"@types/sinon": "^22.0.0",
|
|
49
49
|
"@types/tmp": "^0.2.3",
|
|
50
50
|
"clang-format": "^1.8.0",
|
|
51
51
|
"codecov": "^3.8.3",
|
|
52
52
|
"deep-copy": "^1.4.2",
|
|
53
|
-
"eslint-plugin-n": "^18.
|
|
53
|
+
"eslint-plugin-n": "^18.4.0",
|
|
54
54
|
"gts": "^7.0.0",
|
|
55
55
|
"js-green-licenses": "^4.0.0",
|
|
56
56
|
"mocha": "^11.8.0",
|
|
57
|
-
"nan": "^2.
|
|
57
|
+
"nan": "^2.29.0",
|
|
58
58
|
"nyc": "^18.0.0",
|
|
59
59
|
"semver": "^7.8.5",
|
|
60
60
|
"sinon": "^22.1.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|