@sentry/profiling-node 8.8.0 → 8.9.1

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.
Files changed (81) hide show
  1. package/bindings/cpu_profiler.cc +155 -60
  2. package/lib/cjs/index.js +479 -154
  3. package/lib/cjs/index.js.map +1 -1
  4. package/lib/esm/index.js +478 -154
  5. package/lib/esm/index.js.map +1 -1
  6. package/lib/sentry_cpu_profiler-darwin-arm64-108.node +0 -0
  7. package/lib/sentry_cpu_profiler-darwin-arm64-115.node +0 -0
  8. package/lib/sentry_cpu_profiler-darwin-arm64-127.node +0 -0
  9. package/lib/sentry_cpu_profiler-darwin-arm64-93.node +0 -0
  10. package/lib/sentry_cpu_profiler-darwin-x64-108.node +0 -0
  11. package/lib/sentry_cpu_profiler-darwin-x64-115.node +0 -0
  12. package/lib/sentry_cpu_profiler-darwin-x64-127.node +0 -0
  13. package/lib/sentry_cpu_profiler-darwin-x64-93.node +0 -0
  14. package/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node +0 -0
  15. package/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node +0 -0
  16. package/lib/sentry_cpu_profiler-linux-arm64-glibc-127.node +0 -0
  17. package/lib/sentry_cpu_profiler-linux-arm64-glibc-93.node +0 -0
  18. package/lib/sentry_cpu_profiler-linux-arm64-musl-108.node +0 -0
  19. package/lib/sentry_cpu_profiler-linux-arm64-musl-115.node +0 -0
  20. package/lib/sentry_cpu_profiler-linux-arm64-musl-127.node +0 -0
  21. package/lib/sentry_cpu_profiler-linux-arm64-musl-93.node +0 -0
  22. package/lib/sentry_cpu_profiler-linux-x64-glibc-108.node +0 -0
  23. package/lib/sentry_cpu_profiler-linux-x64-glibc-115.node +0 -0
  24. package/lib/sentry_cpu_profiler-linux-x64-glibc-127.node +0 -0
  25. package/lib/sentry_cpu_profiler-linux-x64-glibc-93.node +0 -0
  26. package/lib/sentry_cpu_profiler-linux-x64-musl-108.node +0 -0
  27. package/lib/sentry_cpu_profiler-linux-x64-musl-115.node +0 -0
  28. package/lib/sentry_cpu_profiler-linux-x64-musl-127.node +0 -0
  29. package/lib/sentry_cpu_profiler-linux-x64-musl-93.node +0 -0
  30. package/lib/sentry_cpu_profiler-win32-x64-108.node +0 -0
  31. package/lib/sentry_cpu_profiler-win32-x64-115.node +0 -0
  32. package/lib/sentry_cpu_profiler-win32-x64-127.node +0 -0
  33. package/lib/sentry_cpu_profiler-win32-x64-93.node +0 -0
  34. package/lib/types/profiling-node/src/cpu_profiler.d.ts +16 -0
  35. package/lib/types/profiling-node/src/cpu_profiler.d.ts.map +1 -0
  36. package/lib/types/profiling-node/src/debug-build.d.ts.map +1 -0
  37. package/lib/types/profiling-node/src/index.d.ts.map +1 -0
  38. package/lib/types/profiling-node/src/integration.d.ts +57 -0
  39. package/lib/types/profiling-node/src/integration.d.ts.map +1 -0
  40. package/lib/types/profiling-node/src/nodeVersion.d.ts.map +1 -0
  41. package/lib/types/{spanProfileUtils.d.ts → profiling-node/src/spanProfileUtils.d.ts} +2 -2
  42. package/lib/types/profiling-node/src/spanProfileUtils.d.ts.map +1 -0
  43. package/lib/types/profiling-node/src/types.d.ts +60 -0
  44. package/lib/types/profiling-node/src/types.d.ts.map +1 -0
  45. package/lib/types/{utils.d.ts → profiling-node/src/utils.d.ts} +30 -4
  46. package/lib/types/profiling-node/src/utils.d.ts.map +1 -0
  47. package/lib/types/types/src/debugMeta.d.ts +28 -0
  48. package/lib/types/types/src/debugMeta.d.ts.map +1 -0
  49. package/lib/types/types/src/measurement.d.ts +24 -0
  50. package/lib/types/types/src/measurement.d.ts.map +1 -0
  51. package/lib/types/types/src/profiling.d.ts +126 -0
  52. package/lib/types/types/src/profiling.d.ts.map +1 -0
  53. package/lib/types-ts3.8/profiling-node/src/cpu_profiler.d.ts +16 -0
  54. package/lib/types-ts3.8/profiling-node/src/integration.d.ts +57 -0
  55. package/lib/types-ts3.8/{spanProfileUtils.d.ts → profiling-node/src/spanProfileUtils.d.ts} +2 -2
  56. package/lib/types-ts3.8/profiling-node/src/types.d.ts +60 -0
  57. package/lib/types-ts3.8/{utils.d.ts → profiling-node/src/utils.d.ts} +30 -4
  58. package/lib/types-ts3.8/types/src/debugMeta.d.ts +28 -0
  59. package/lib/types-ts3.8/types/src/measurement.d.ts +24 -0
  60. package/lib/types-ts3.8/types/src/profiling.d.ts +126 -0
  61. package/package.json +5 -5
  62. package/lib/types/cpu_profiler.d.ts +0 -10
  63. package/lib/types/cpu_profiler.d.ts.map +0 -1
  64. package/lib/types/debug-build.d.ts.map +0 -1
  65. package/lib/types/index.d.ts.map +0 -1
  66. package/lib/types/integration.d.ts +0 -14
  67. package/lib/types/integration.d.ts.map +0 -1
  68. package/lib/types/nodeVersion.d.ts.map +0 -1
  69. package/lib/types/spanProfileUtils.d.ts.map +0 -1
  70. package/lib/types/types.d.ts +0 -100
  71. package/lib/types/types.d.ts.map +0 -1
  72. package/lib/types/utils.d.ts.map +0 -1
  73. package/lib/types-ts3.8/cpu_profiler.d.ts +0 -10
  74. package/lib/types-ts3.8/integration.d.ts +0 -14
  75. package/lib/types-ts3.8/types.d.ts +0 -100
  76. /package/lib/types/{debug-build.d.ts → profiling-node/src/debug-build.d.ts} +0 -0
  77. /package/lib/types/{index.d.ts → profiling-node/src/index.d.ts} +0 -0
  78. /package/lib/types/{nodeVersion.d.ts → profiling-node/src/nodeVersion.d.ts} +0 -0
  79. /package/lib/types-ts3.8/{debug-build.d.ts → profiling-node/src/debug-build.d.ts} +0 -0
  80. /package/lib/types-ts3.8/{index.d.ts → profiling-node/src/index.d.ts} +0 -0
  81. /package/lib/types-ts3.8/{nodeVersion.d.ts → profiling-node/src/nodeVersion.d.ts} +0 -0
@@ -1,100 +0,0 @@
1
- import type { Event } from '@sentry/types';
2
- interface Sample {
3
- stack_id: number;
4
- thread_id: string;
5
- elapsed_since_start_ns: string;
6
- }
7
- type Stack = number[];
8
- type Frame = {
9
- function: string;
10
- file: string;
11
- lineno: number;
12
- colno: number;
13
- };
14
- interface Measurement {
15
- unit: string;
16
- values: {
17
- elapsed_since_start_ns: number;
18
- value: number;
19
- }[];
20
- }
21
- export interface DebugImage {
22
- code_file: string;
23
- type: string;
24
- debug_id: string;
25
- image_addr?: string;
26
- image_size?: number;
27
- image_vmaddr?: string;
28
- }
29
- export interface ProfiledEvent extends Event {
30
- sdkProcessingMetadata: {
31
- profile?: RawThreadCpuProfile;
32
- };
33
- }
34
- export interface RawThreadCpuProfile {
35
- profile_id?: string;
36
- stacks: ReadonlyArray<Stack>;
37
- samples: ReadonlyArray<Sample>;
38
- frames: ReadonlyArray<Frame>;
39
- resources: ReadonlyArray<string>;
40
- profiler_logging_mode: 'eager' | 'lazy';
41
- measurements: Record<string, Measurement>;
42
- }
43
- export interface ThreadCpuProfile {
44
- stacks: ReadonlyArray<Stack>;
45
- samples: ReadonlyArray<Sample>;
46
- frames: ReadonlyArray<Frame>;
47
- thread_metadata: Record<string, {
48
- name?: string;
49
- priority?: number;
50
- }>;
51
- queue_metadata?: Record<string, {
52
- label: string;
53
- }>;
54
- }
55
- export interface PrivateV8CpuProfilerBindings {
56
- startProfiling(name: string): void;
57
- stopProfiling(name: string, threadId: number, collectResources: boolean): RawThreadCpuProfile | null;
58
- getFrameModule(abs_path: string): string;
59
- }
60
- export interface V8CpuProfilerBindings {
61
- startProfiling(name: string): void;
62
- stopProfiling(name: string): RawThreadCpuProfile | null;
63
- }
64
- export interface Profile {
65
- event_id: string;
66
- version: string;
67
- os: {
68
- name: string;
69
- version: string;
70
- build_number: string;
71
- };
72
- runtime: {
73
- name: string;
74
- version: string;
75
- };
76
- device: {
77
- architecture: string;
78
- is_emulator: boolean;
79
- locale: string;
80
- manufacturer: string;
81
- model: string;
82
- };
83
- timestamp: string;
84
- release: string;
85
- environment: string;
86
- platform: string;
87
- profile: ThreadCpuProfile;
88
- debug_meta?: {
89
- images: DebugImage[];
90
- };
91
- transaction: {
92
- name: string;
93
- id: string;
94
- trace_id: string;
95
- active_thread_id: string;
96
- };
97
- measurements: Record<string, Measurement>;
98
- }
99
- export {};
100
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,UAAU,MAAM;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,KAAK,KAAK,GAAG,MAAM,EAAE,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,sBAAsB,EAAE,MAAM,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,qBAAqB,EAAE;QACrB,OAAO,CAAC,EAAE,mBAAmB,CAAC;KAC/B,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7B,SA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AAgB,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;;;;;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;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CA0DtG"}
@@ -1,10 +0,0 @@
1
- import { PrivateV8CpuProfilerBindings, V8CpuProfilerBindings } from './types';
2
- /**
3
- * Imports cpp bindings based on the current platform and architecture.
4
- */
5
- export declare function importCppBindingsModule(): PrivateV8CpuProfilerBindings;
6
- declare const PrivateCpuProfilerBindings: PrivateV8CpuProfilerBindings;
7
- declare const CpuProfilerBindings: V8CpuProfilerBindings;
8
- export { PrivateCpuProfilerBindings };
9
- export { CpuProfilerBindings };
10
- //# sourceMappingURL=cpu_profiler.d.ts.map
@@ -1,14 +0,0 @@
1
- import { NodeClient } from '@sentry/node';
2
- /** Exported only for tests. */
3
- export declare const _nodeProfilingIntegration: () => {
4
- name: string;
5
- setup(client: NodeClient): void;
6
- };
7
- /**
8
- * We need this integration in order to send data to Sentry. We hook into the event processor
9
- * and inspect each event to see if it is a transaction event and if that transaction event
10
- * contains a profile on it's metadata. If that is the case, we create a profiling event envelope
11
- * and delete the profile from the transaction metadata.
12
- */
13
- export declare const nodeProfilingIntegration: () => import("@sentry/types").Integration;
14
- //# sourceMappingURL=integration.d.ts.map
@@ -1,100 +0,0 @@
1
- import { Event } from '@sentry/types';
2
- interface Sample {
3
- stack_id: number;
4
- thread_id: string;
5
- elapsed_since_start_ns: string;
6
- }
7
- type Stack = number[];
8
- type Frame = {
9
- function: string;
10
- file: string;
11
- lineno: number;
12
- colno: number;
13
- };
14
- interface Measurement {
15
- unit: string;
16
- values: {
17
- elapsed_since_start_ns: number;
18
- value: number;
19
- }[];
20
- }
21
- export interface DebugImage {
22
- code_file: string;
23
- type: string;
24
- debug_id: string;
25
- image_addr?: string;
26
- image_size?: number;
27
- image_vmaddr?: string;
28
- }
29
- export interface ProfiledEvent extends Event {
30
- sdkProcessingMetadata: {
31
- profile?: RawThreadCpuProfile;
32
- };
33
- }
34
- export interface RawThreadCpuProfile {
35
- profile_id?: string;
36
- stacks: ReadonlyArray<Stack>;
37
- samples: ReadonlyArray<Sample>;
38
- frames: ReadonlyArray<Frame>;
39
- resources: ReadonlyArray<string>;
40
- profiler_logging_mode: 'eager' | 'lazy';
41
- measurements: Record<string, Measurement>;
42
- }
43
- export interface ThreadCpuProfile {
44
- stacks: ReadonlyArray<Stack>;
45
- samples: ReadonlyArray<Sample>;
46
- frames: ReadonlyArray<Frame>;
47
- thread_metadata: Record<string, {
48
- name?: string;
49
- priority?: number;
50
- }>;
51
- queue_metadata?: Record<string, {
52
- label: string;
53
- }>;
54
- }
55
- export interface PrivateV8CpuProfilerBindings {
56
- startProfiling(name: string): void;
57
- stopProfiling(name: string, threadId: number, collectResources: boolean): RawThreadCpuProfile | null;
58
- getFrameModule(abs_path: string): string;
59
- }
60
- export interface V8CpuProfilerBindings {
61
- startProfiling(name: string): void;
62
- stopProfiling(name: string): RawThreadCpuProfile | null;
63
- }
64
- export interface Profile {
65
- event_id: string;
66
- version: string;
67
- os: {
68
- name: string;
69
- version: string;
70
- build_number: string;
71
- };
72
- runtime: {
73
- name: string;
74
- version: string;
75
- };
76
- device: {
77
- architecture: string;
78
- is_emulator: boolean;
79
- locale: string;
80
- manufacturer: string;
81
- model: string;
82
- };
83
- timestamp: string;
84
- release: string;
85
- environment: string;
86
- platform: string;
87
- profile: ThreadCpuProfile;
88
- debug_meta?: {
89
- images: DebugImage[];
90
- };
91
- transaction: {
92
- name: string;
93
- id: string;
94
- trace_id: string;
95
- active_thread_id: string;
96
- };
97
- measurements: Record<string, Measurement>;
98
- }
99
- export {};
100
- //# sourceMappingURL=types.d.ts.map