@sentry/profiling-node 8.37.1 → 8.39.0-dev.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/lib/cjs/index.js +1 -53
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +2 -54
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +1 -1
- package/lib/sentry_cpu_profiler-darwin-arm64-108.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-115.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-127.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-93.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-108.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-115.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-127.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-93.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-108.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-115.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-127.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-93.node +0 -0
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -582,71 +582,19 @@ function makeProfileChunkEnvelope(
|
|
|
582
582
|
]);
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
const debugIdStackParserCache = new WeakMap();
|
|
586
|
-
|
|
587
585
|
/**
|
|
588
586
|
* Cross reference profile collected resources with debug_ids and return a list of debug images.
|
|
589
587
|
* @param {string[]} resource_paths
|
|
590
588
|
* @returns {DebugImage[]}
|
|
591
589
|
*/
|
|
592
590
|
function applyDebugMetadata(client, resource_paths) {
|
|
593
|
-
const debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds;
|
|
594
|
-
if (!debugIdMap) {
|
|
595
|
-
return [];
|
|
596
|
-
}
|
|
597
|
-
|
|
598
591
|
const options = client.getOptions();
|
|
599
592
|
|
|
600
593
|
if (!options || !options.stackParser) {
|
|
601
594
|
return [];
|
|
602
595
|
}
|
|
603
596
|
|
|
604
|
-
|
|
605
|
-
const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(options.stackParser);
|
|
606
|
-
if (cachedDebugIdStackFrameCache) {
|
|
607
|
-
debugIdStackFramesCache = cachedDebugIdStackFrameCache;
|
|
608
|
-
} else {
|
|
609
|
-
debugIdStackFramesCache = new Map();
|
|
610
|
-
debugIdStackParserCache.set(options.stackParser, debugIdStackFramesCache);
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
// Build a map of filename -> debug_id.
|
|
614
|
-
const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {
|
|
615
|
-
let parsedStack;
|
|
616
|
-
|
|
617
|
-
const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);
|
|
618
|
-
if (cachedParsedStack) {
|
|
619
|
-
parsedStack = cachedParsedStack;
|
|
620
|
-
} else {
|
|
621
|
-
parsedStack = options.stackParser(debugIdStackTrace);
|
|
622
|
-
debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
for (let i = parsedStack.length - 1; i >= 0; i--) {
|
|
626
|
-
const stackFrame = parsedStack[i];
|
|
627
|
-
const file = stackFrame && stackFrame.filename;
|
|
628
|
-
|
|
629
|
-
if (stackFrame && file) {
|
|
630
|
-
acc[file] = debugIdMap[debugIdStackTrace] ;
|
|
631
|
-
break;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return acc;
|
|
635
|
-
}, {});
|
|
636
|
-
|
|
637
|
-
const images = [];
|
|
638
|
-
|
|
639
|
-
for (const resource of resource_paths) {
|
|
640
|
-
if (resource && filenameDebugIdMap[resource]) {
|
|
641
|
-
images.push({
|
|
642
|
-
type: 'sourcemap',
|
|
643
|
-
code_file: resource,
|
|
644
|
-
debug_id: filenameDebugIdMap[resource] ,
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
return images;
|
|
597
|
+
return utils.getDebugImagesForResources(options.stackParser, resource_paths);
|
|
650
598
|
}
|
|
651
599
|
|
|
652
600
|
const MAX_PROFILE_DURATION_MS = 30 * 1000;
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _nullishCoalesce, _optionalChain, _optionalChainDelete } from '@sentry/utils';
|
|
2
2
|
import { spanIsSampled, spanToJSON, defineIntegration, getRootSpan, getCurrentScope, getIsolationScope, getGlobalScope } from '@sentry/core';
|
|
3
|
-
import { logger, GLOBAL_OBJ, parseSemver, forEachEnvelopeItem, createEnvelope, uuid4, dsnToString, LRUMap, consoleSandbox } from '@sentry/utils';
|
|
3
|
+
import { logger, GLOBAL_OBJ, parseSemver, forEachEnvelopeItem, createEnvelope, getDebugImagesForResources, uuid4, dsnToString, LRUMap, consoleSandbox } from '@sentry/utils';
|
|
4
4
|
import { platform as platform$1, arch as arch$1 } from 'node:os';
|
|
5
5
|
import cjsPath, { resolve, join } from 'node:path';
|
|
6
6
|
import { versions, env } from 'node:process';
|
|
@@ -590,71 +590,19 @@ function makeProfileChunkEnvelope(
|
|
|
590
590
|
]);
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
const debugIdStackParserCache = new WeakMap();
|
|
594
|
-
|
|
595
593
|
/**
|
|
596
594
|
* Cross reference profile collected resources with debug_ids and return a list of debug images.
|
|
597
595
|
* @param {string[]} resource_paths
|
|
598
596
|
* @returns {DebugImage[]}
|
|
599
597
|
*/
|
|
600
598
|
function applyDebugMetadata(client, resource_paths) {
|
|
601
|
-
const debugIdMap = GLOBAL_OBJ._sentryDebugIds;
|
|
602
|
-
if (!debugIdMap) {
|
|
603
|
-
return [];
|
|
604
|
-
}
|
|
605
|
-
|
|
606
599
|
const options = client.getOptions();
|
|
607
600
|
|
|
608
601
|
if (!options || !options.stackParser) {
|
|
609
602
|
return [];
|
|
610
603
|
}
|
|
611
604
|
|
|
612
|
-
|
|
613
|
-
const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(options.stackParser);
|
|
614
|
-
if (cachedDebugIdStackFrameCache) {
|
|
615
|
-
debugIdStackFramesCache = cachedDebugIdStackFrameCache;
|
|
616
|
-
} else {
|
|
617
|
-
debugIdStackFramesCache = new Map();
|
|
618
|
-
debugIdStackParserCache.set(options.stackParser, debugIdStackFramesCache);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// Build a map of filename -> debug_id.
|
|
622
|
-
const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {
|
|
623
|
-
let parsedStack;
|
|
624
|
-
|
|
625
|
-
const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);
|
|
626
|
-
if (cachedParsedStack) {
|
|
627
|
-
parsedStack = cachedParsedStack;
|
|
628
|
-
} else {
|
|
629
|
-
parsedStack = options.stackParser(debugIdStackTrace);
|
|
630
|
-
debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
for (let i = parsedStack.length - 1; i >= 0; i--) {
|
|
634
|
-
const stackFrame = parsedStack[i];
|
|
635
|
-
const file = stackFrame && stackFrame.filename;
|
|
636
|
-
|
|
637
|
-
if (stackFrame && file) {
|
|
638
|
-
acc[file] = debugIdMap[debugIdStackTrace] ;
|
|
639
|
-
break;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
return acc;
|
|
643
|
-
}, {});
|
|
644
|
-
|
|
645
|
-
const images = [];
|
|
646
|
-
|
|
647
|
-
for (const resource of resource_paths) {
|
|
648
|
-
if (resource && filenameDebugIdMap[resource]) {
|
|
649
|
-
images.push({
|
|
650
|
-
type: 'sourcemap',
|
|
651
|
-
code_file: resource,
|
|
652
|
-
debug_id: filenameDebugIdMap[resource] ,
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
return images;
|
|
605
|
+
return getDebugImagesForResources(options.stackParser, resource_paths);
|
|
658
606
|
}
|
|
659
607
|
|
|
660
608
|
const MAX_PROFILE_DURATION_MS = 30 * 1000;
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"8.
|
|
1
|
+
{"type":"module","version":"8.39.0-dev.0","sideEffects":false}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/types/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"A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AAI,CAarB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAuBxD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,IAAI,mBAAmB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAepH;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,IAAI,kBAAkB,CAW9F;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,QAAQ,CAUvF;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,CA2BhF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,CAAC,EAAE,aAAa,GAClB,oBAAoB,CAOtB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,CAAC,EAAE,aAAa,GAClB,oBAAoB,CAQtB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CAQtG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/profiling-node",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.39.0-dev.0",
|
|
4
4
|
"description": "Official Sentry SDK for Node.js Profiling",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/profiling-node",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"test": "cross-env SENTRY_PROFILER_BINARY_DIR=lib jest --config jest.config.js"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@sentry/core": "8.
|
|
79
|
-
"@sentry/node": "8.
|
|
80
|
-
"@sentry/types": "8.
|
|
81
|
-
"@sentry/utils": "8.
|
|
78
|
+
"@sentry/core": "8.39.0-dev.0",
|
|
79
|
+
"@sentry/node": "8.39.0-dev.0",
|
|
80
|
+
"@sentry/types": "8.39.0-dev.0",
|
|
81
|
+
"@sentry/utils": "8.39.0-dev.0",
|
|
82
82
|
"detect-libc": "^2.0.2",
|
|
83
83
|
"node-abi": "^3.61.0"
|
|
84
84
|
},
|