@sentry/profiling-node 8.9.2 → 8.11.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.
Files changed (41) hide show
  1. package/bindings/cpu_profiler.cc +7 -5
  2. package/lib/cjs/index.js +83 -33
  3. package/lib/cjs/index.js.map +1 -1
  4. package/lib/esm/index.js +85 -35
  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/integration.d.ts +18 -0
  35. package/lib/types/integration.d.ts.map +1 -1
  36. package/lib/types/spanProfileUtils.d.ts.map +1 -1
  37. package/lib/types/utils.d.ts +3 -1
  38. package/lib/types/utils.d.ts.map +1 -1
  39. package/lib/types-ts3.8/integration.d.ts +18 -0
  40. package/lib/types-ts3.8/utils.d.ts +3 -1
  41. package/package.json +5 -5
@@ -27,15 +27,33 @@ declare class ContinuousProfiler {
27
27
  * @param chunk
28
28
  */
29
29
  private _flush;
30
+ /**
31
+ * Stops the profile and clears chunk instrumentation from global scope
32
+ * @returns void
33
+ */
34
+ private _stopChunkProfiling;
30
35
  /**
31
36
  * Starts the profiler and registers the flush timer for a given chunk.
32
37
  * @param chunk
33
38
  */
34
39
  private _startChunkProfiling;
40
+ /**
41
+ * Attaches profiling information to spans that were started
42
+ * during a profiling session.
43
+ */
44
+ private _setupSpanChunkInstrumentation;
45
+ /**
46
+ * Clear profiling information from global context when a profile is not running.
47
+ */
48
+ private _teardownSpanChunkInstrumentation;
35
49
  /**
36
50
  * Initializes new profile chunk metadata
37
51
  */
38
52
  private _initializeChunk;
53
+ /**
54
+ * Assigns thread_id and thread name context to a profiled event.
55
+ */
56
+ private _assignThreadIdContext;
39
57
  /**
40
58
  * Resets the current chunk state.
41
59
  */
@@ -1,5 +1,7 @@
1
1
  import { Client, ContinuousThreadCpuProfile, DebugImage, DsnComponents, Envelope, Event, EventEnvelopeHeaders, Profile, ProfileChunk, ProfileChunkEnvelope, SdkInfo, ThreadCpuProfile } from '@sentry/types';
2
2
  import { RawChunkCpuProfile, RawThreadCpuProfile } from './types';
3
+ export declare const PROFILER_THREAD_ID_STRING: string;
4
+ export declare const PROFILER_THREAD_NAME: string;
3
5
  /**
4
6
  * Enriches the profile with threadId of the current thread.
5
7
  * This is done in node as we seem to not be able to get the info from C native code.
@@ -18,7 +20,7 @@ export declare function createProfilingEvent(client: Client, profile: RawThreadC
18
20
  /**
19
21
  * Creates a profiling chunk envelope item, if the profile does not pass validation, returns null.
20
22
  */
21
- export declare function createProfilingChunkEvent(start_timestamp: number, client: Client, options: {
23
+ export declare function createProfilingChunkEvent(client: Client, options: {
22
24
  release?: string;
23
25
  environment?: string;
24
26
  }, profile: RawChunkCpuProfile, identifiers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/profiling-node",
3
- "version": "8.9.2",
3
+ "version": "8.11.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",
@@ -77,10 +77,10 @@
77
77
  "test": "cross-env SENTRY_PROFILER_BINARY_DIR=lib jest --config jest.config.js"
78
78
  },
79
79
  "dependencies": {
80
- "@sentry/core": "8.9.2",
81
- "@sentry/node": "8.9.2",
82
- "@sentry/types": "8.9.2",
83
- "@sentry/utils": "8.9.2",
80
+ "@sentry/core": "8.11.0",
81
+ "@sentry/node": "8.11.0",
82
+ "@sentry/types": "8.11.0",
83
+ "@sentry/utils": "8.11.0",
84
84
  "detect-libc": "^2.0.2",
85
85
  "node-abi": "^3.61.0"
86
86
  },