@sentry/profiling-node 8.0.0-alpha.2 → 8.0.0-alpha.3
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/README.md +4 -6
- package/lib/index.js +1671 -545
- package/lib/index.js.map +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-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-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-93.node +0 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/integration.d.ts +7 -26
- package/lib/types/integration.d.ts.map +1 -1
- package/lib/types/spanProfileUtils.d.ts +17 -0
- package/lib/types/spanProfileUtils.d.ts.map +1 -0
- package/lib/types/utils.d.ts +1 -25
- package/lib/types/utils.d.ts.map +1 -1
- package/lib/types-ts3.8/index.d.ts +1 -1
- package/lib/types-ts3.8/integration.d.ts +7 -26
- package/lib/types-ts3.8/spanProfileUtils.d.ts +17 -0
- package/lib/types-ts3.8/utils.d.ts +1 -25
- package/package.json +15 -6
- package/lib/types/hubextensions.d.ts +0 -29
- package/lib/types/hubextensions.d.ts.map +0 -1
- package/lib/types-ts3.8/hubextensions.d.ts +0 -29
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { nodeProfilingIntegration } from './integration';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NodeClient } from '@sentry/node-experimental';
|
|
2
|
+
/** Exported only for tests. */
|
|
3
|
+
export declare const _nodeProfilingIntegration: () => {
|
|
4
|
+
name: string;
|
|
5
|
+
setup(client: NodeClient): void;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* We need this integration in order to send data to Sentry. We hook into the event processor
|
|
4
9
|
* and inspect each event to see if it is a transaction event and if that transaction event
|
|
5
10
|
* contains a profile on it's metadata. If that is the case, we create a profiling event envelope
|
|
6
11
|
* and delete the profile from the transaction metadata.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated Use `nodeProfilingIntegration` instead.
|
|
9
12
|
*/
|
|
10
|
-
export declare
|
|
11
|
-
/**
|
|
12
|
-
* @inheritDoc
|
|
13
|
-
*/
|
|
14
|
-
readonly name: string;
|
|
15
|
-
getCurrentHub?: () => Hub;
|
|
16
|
-
constructor();
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
handleGlobalEvent(event: Event): Promise<Event>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* We need this integration in order to send data to Sentry. We hook into the event processor
|
|
28
|
-
* and inspect each event to see if it is a transaction event and if that transaction event
|
|
29
|
-
* contains a profile on it's metadata. If that is the case, we create a profiling event envelope
|
|
30
|
-
* and delete the profile from the transaction metadata.
|
|
31
|
-
*/
|
|
32
|
-
export declare const nodeProfilingIntegration: () => IntegrationFnResult;
|
|
13
|
+
export declare const nodeProfilingIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
33
14
|
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAwB5D,+BAA+B;AAC/B,eAAO,MAAM,yBAAyB;;kBAGpB,UAAU;CA6HF,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,mDAA+C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NodeClient } from '@sentry/node-experimental';
|
|
2
|
+
import type { CustomSamplingContext, Span } from '@sentry/types';
|
|
3
|
+
import { CpuProfilerBindings } from './cpu_profiler';
|
|
4
|
+
export declare const MAX_PROFILE_DURATION_MS: number;
|
|
5
|
+
/**
|
|
6
|
+
* Takes a transaction and determines if it should be profiled or not. If it should be profiled, it returns the
|
|
7
|
+
* profile_id, otherwise returns undefined. Takes care of setting profile context on transaction as well
|
|
8
|
+
*/
|
|
9
|
+
export declare function maybeProfileSpan(client: NodeClient | undefined, span: Span, customSamplingContext?: CustomSamplingContext): string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Stops the profiler for profile_id and returns the profile
|
|
12
|
+
* @param transaction
|
|
13
|
+
* @param profile_id
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function stopSpanProfile(span: Span, profile_id: string | undefined): ReturnType<(typeof CpuProfilerBindings)['stopProfiling']> | null;
|
|
17
|
+
//# sourceMappingURL=spanProfileUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spanProfileUtils.d.ts","sourceRoot":"","sources":["../../src/spanProfileUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,uBAAuB,QAAY,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,IAAI,EAAE,IAAI,EACV,qBAAqB,CAAC,EAAE,qBAAqB,GAC5C,MAAM,GAAG,SAAS,CAkFpB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,UAAU,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,eAAe,CAAC,CAAC,GAAG,IAAI,CAuBlE"}
|
package/lib/types/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Envelope, Event } from '@sentry/types';
|
|
2
2
|
import type { Profile, ProfiledEvent, RawThreadCpuProfile, ThreadCpuProfile } from './types';
|
|
3
3
|
import type { DebugImage } from './types';
|
|
4
4
|
/**
|
|
@@ -23,30 +23,6 @@ export declare function createProfilingEventFromTransaction(event: ProfiledEvent
|
|
|
23
23
|
* @returns {Profile | null}
|
|
24
24
|
*/
|
|
25
25
|
export declare function createProfilingEvent(profile: RawThreadCpuProfile, event: Event): Profile | null;
|
|
26
|
-
/**
|
|
27
|
-
* Creates an envelope from a profiling event.
|
|
28
|
-
* @param {Event} Profile
|
|
29
|
-
* @param {DsnComponents} dsn
|
|
30
|
-
* @param {SdkMetadata} metadata
|
|
31
|
-
* @param {string|undefined} tunnel
|
|
32
|
-
* @returns {Envelope|null}
|
|
33
|
-
*/
|
|
34
|
-
export declare function createProfilingEventEnvelope(event: ProfiledEvent, dsn: DsnComponents, metadata?: SdkMetadata, tunnel?: string): EventEnvelope | null;
|
|
35
|
-
/**
|
|
36
|
-
* Check if event metadata contains profile information
|
|
37
|
-
* @param {Event}
|
|
38
|
-
* @returns {boolean}
|
|
39
|
-
*/
|
|
40
|
-
export declare function isProfiledTransactionEvent(event: Event): event is ProfiledEvent;
|
|
41
|
-
/**
|
|
42
|
-
* Due to how profiles are attached to event metadata, we may sometimes want to remove them to ensure
|
|
43
|
-
* they are not processed by other Sentry integrations. This can be the case when we cannot construct a valid
|
|
44
|
-
* profile from the data we have or some of the mechanisms to send the event (Hub, Transport etc) are not available to us.
|
|
45
|
-
*
|
|
46
|
-
* @param {Event | ProfiledEvent} event
|
|
47
|
-
* @returns {Event}
|
|
48
|
-
*/
|
|
49
|
-
export declare function maybeRemoveProfileFromSdkMetadata(event: Event | ProfiledEvent): Event;
|
|
50
26
|
/**
|
|
51
27
|
* Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
|
|
52
28
|
* @param {unknown} rate
|
package/lib/types/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,QAAQ,EAAE,KAAK,EAA2B,MAAM,eAAe,CAAC;AAQvF,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA6B1C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,gBAAgB,CAe7G;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI,CAiCxF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAc/F;AA6ED;;;;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;;;;;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,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CA+DtF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { nodeProfilingIntegration } from './integration';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NodeClient } from '@sentry/node-experimental';
|
|
2
|
+
/** Exported only for tests. */
|
|
3
|
+
export declare const _nodeProfilingIntegration: () => {
|
|
4
|
+
name: string;
|
|
5
|
+
setup(client: NodeClient): void;
|
|
6
|
+
};
|
|
2
7
|
/**
|
|
3
8
|
* We need this integration in order to send data to Sentry. We hook into the event processor
|
|
4
9
|
* and inspect each event to see if it is a transaction event and if that transaction event
|
|
5
10
|
* contains a profile on it's metadata. If that is the case, we create a profiling event envelope
|
|
6
11
|
* and delete the profile from the transaction metadata.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated Use `nodeProfilingIntegration` instead.
|
|
9
12
|
*/
|
|
10
|
-
export declare
|
|
11
|
-
/**
|
|
12
|
-
* @inheritDoc
|
|
13
|
-
*/
|
|
14
|
-
readonly name: string;
|
|
15
|
-
getCurrentHub?: () => Hub;
|
|
16
|
-
constructor();
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
handleGlobalEvent(event: Event): Promise<Event>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* We need this integration in order to send data to Sentry. We hook into the event processor
|
|
28
|
-
* and inspect each event to see if it is a transaction event and if that transaction event
|
|
29
|
-
* contains a profile on it's metadata. If that is the case, we create a profiling event envelope
|
|
30
|
-
* and delete the profile from the transaction metadata.
|
|
31
|
-
*/
|
|
32
|
-
export declare const nodeProfilingIntegration: () => IntegrationFnResult;
|
|
13
|
+
export declare const nodeProfilingIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
33
14
|
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NodeClient } from '@sentry/node-experimental';
|
|
2
|
+
import { CustomSamplingContext, Span } from '@sentry/types';
|
|
3
|
+
import { CpuProfilerBindings } from './cpu_profiler';
|
|
4
|
+
export declare const MAX_PROFILE_DURATION_MS: number;
|
|
5
|
+
/**
|
|
6
|
+
* Takes a transaction and determines if it should be profiled or not. If it should be profiled, it returns the
|
|
7
|
+
* profile_id, otherwise returns undefined. Takes care of setting profile context on transaction as well
|
|
8
|
+
*/
|
|
9
|
+
export declare function maybeProfileSpan(client: NodeClient | undefined, span: Span, customSamplingContext?: CustomSamplingContext): string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Stops the profiler for profile_id and returns the profile
|
|
12
|
+
* @param transaction
|
|
13
|
+
* @param profile_id
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function stopSpanProfile(span: Span, profile_id: string | undefined): ReturnType<(typeof CpuProfilerBindings)['stopProfiling']> | null;
|
|
17
|
+
//# sourceMappingURL=spanProfileUtils.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Envelope, Event } from '@sentry/types';
|
|
2
2
|
import { Profile, ProfiledEvent, RawThreadCpuProfile, ThreadCpuProfile } from './types';
|
|
3
3
|
import { DebugImage } from './types';
|
|
4
4
|
/**
|
|
@@ -23,30 +23,6 @@ export declare function createProfilingEventFromTransaction(event: ProfiledEvent
|
|
|
23
23
|
* @returns {Profile | null}
|
|
24
24
|
*/
|
|
25
25
|
export declare function createProfilingEvent(profile: RawThreadCpuProfile, event: Event): Profile | null;
|
|
26
|
-
/**
|
|
27
|
-
* Creates an envelope from a profiling event.
|
|
28
|
-
* @param {Event} Profile
|
|
29
|
-
* @param {DsnComponents} dsn
|
|
30
|
-
* @param {SdkMetadata} metadata
|
|
31
|
-
* @param {string|undefined} tunnel
|
|
32
|
-
* @returns {Envelope|null}
|
|
33
|
-
*/
|
|
34
|
-
export declare function createProfilingEventEnvelope(event: ProfiledEvent, dsn: DsnComponents, metadata?: SdkMetadata, tunnel?: string): EventEnvelope | null;
|
|
35
|
-
/**
|
|
36
|
-
* Check if event metadata contains profile information
|
|
37
|
-
* @param {Event}
|
|
38
|
-
* @returns {boolean}
|
|
39
|
-
*/
|
|
40
|
-
export declare function isProfiledTransactionEvent(event: Event): event is ProfiledEvent;
|
|
41
|
-
/**
|
|
42
|
-
* Due to how profiles are attached to event metadata, we may sometimes want to remove them to ensure
|
|
43
|
-
* they are not processed by other Sentry integrations. This can be the case when we cannot construct a valid
|
|
44
|
-
* profile from the data we have or some of the mechanisms to send the event (Hub, Transport etc) are not available to us.
|
|
45
|
-
*
|
|
46
|
-
* @param {Event | ProfiledEvent} event
|
|
47
|
-
* @returns {Event}
|
|
48
|
-
*/
|
|
49
|
-
export declare function maybeRemoveProfileFromSdkMetadata(event: Event | ProfiledEvent): Event;
|
|
50
26
|
/**
|
|
51
27
|
* Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
|
|
52
28
|
* @param {unknown} rate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/profiling-node",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
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",
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"main": "lib/index.js",
|
|
10
10
|
"types": "lib/types/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
".": {
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./lib/types/index.d.ts",
|
|
16
|
+
"default": "./lib/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
11
20
|
"typesVersions": {
|
|
12
21
|
"<4.9": {
|
|
13
22
|
"lib/types/index.d.ts": [
|
|
@@ -19,7 +28,7 @@
|
|
|
19
28
|
"sentry-prune-profiler-binaries": "scripts/prune-profiler-binaries.js"
|
|
20
29
|
},
|
|
21
30
|
"engines": {
|
|
22
|
-
"node": ">=14.
|
|
31
|
+
"node": ">=14.18"
|
|
23
32
|
},
|
|
24
33
|
"publishConfig": {
|
|
25
34
|
"access": "public"
|
|
@@ -68,10 +77,10 @@
|
|
|
68
77
|
"node-abi": "^3.52.0"
|
|
69
78
|
},
|
|
70
79
|
"devDependencies": {
|
|
71
|
-
"@sentry/core": "8.0.0-alpha.
|
|
72
|
-
"@sentry/node-experimental": "8.0.0-alpha.
|
|
73
|
-
"@sentry/types": "8.0.0-alpha.
|
|
74
|
-
"@sentry/utils": "8.0.0-alpha.
|
|
80
|
+
"@sentry/core": "8.0.0-alpha.3",
|
|
81
|
+
"@sentry/node-experimental": "8.0.0-alpha.3",
|
|
82
|
+
"@sentry/types": "8.0.0-alpha.3",
|
|
83
|
+
"@sentry/utils": "8.0.0-alpha.3",
|
|
75
84
|
"@types/node": "16.18.70",
|
|
76
85
|
"@types/node-abi": "^3.0.0",
|
|
77
86
|
"clang-format": "^1.8.0",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { NodeClient } from '@sentry/node-experimental';
|
|
2
|
-
import type { CustomSamplingContext, Hub, Transaction, TransactionContext } from '@sentry/types';
|
|
3
|
-
import { CpuProfilerBindings } from './cpu_profiler';
|
|
4
|
-
export declare const MAX_PROFILE_DURATION_MS: number;
|
|
5
|
-
type StartTransaction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
|
|
6
|
-
/**
|
|
7
|
-
* Takes a transaction and determines if it should be profiled or not. If it should be profiled, it returns the
|
|
8
|
-
* profile_id, otherwise returns undefined. Takes care of setting profile context on transaction as well
|
|
9
|
-
*/
|
|
10
|
-
export declare function maybeProfileTransaction(client: NodeClient | undefined, transaction: Transaction, customSamplingContext?: CustomSamplingContext): string | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Stops the profiler for profile_id and returns the profile
|
|
13
|
-
* @param transaction
|
|
14
|
-
* @param profile_id
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function stopTransactionProfile(transaction: Transaction, profile_id: string | undefined): ReturnType<(typeof CpuProfilerBindings)['stopProfiling']> | null;
|
|
18
|
-
/**
|
|
19
|
-
* Wraps startTransaction and stopTransaction with profiling related logic.
|
|
20
|
-
* startProfiling is called after the call to startTransaction in order to avoid our own code from
|
|
21
|
-
* being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.
|
|
22
|
-
*/
|
|
23
|
-
export declare function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: StartTransaction): StartTransaction;
|
|
24
|
-
/**
|
|
25
|
-
* This patches the global object and injects the Profiling extensions methods
|
|
26
|
-
*/
|
|
27
|
-
export declare function addProfilingExtensionMethods(): void;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=hubextensions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hubextensions.d.ts","sourceRoot":"","sources":["../../src/hubextensions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,uBAAuB,QAAY,CAAC;AAEjD,KAAK,gBAAgB,GAAG,CACtB,IAAI,EAAE,GAAG,EACT,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,CAAC,EAAE,qBAAqB,KAC1C,WAAW,CAAC;AAEjB;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,WAAW,EAAE,WAAW,EACxB,qBAAqB,CAAC,EAAE,qBAAqB,GAC5C,MAAM,GAAG,SAAS,CAuEpB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,UAAU,CAAC,CAAC,OAAO,mBAAmB,CAAC,CAAC,eAAe,CAAC,CAAC,GAAG,IAAI,CAuBlE;AAED;;;;GAIG;AACH,wBAAgB,4CAA4C,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,gBAAgB,CA6EjH;AA4BD;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { NodeClient } from '@sentry/node-experimental';
|
|
2
|
-
import { CustomSamplingContext, Hub, Transaction, TransactionContext } from '@sentry/types';
|
|
3
|
-
import { CpuProfilerBindings } from './cpu_profiler';
|
|
4
|
-
export declare const MAX_PROFILE_DURATION_MS: number;
|
|
5
|
-
type StartTransaction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
|
|
6
|
-
/**
|
|
7
|
-
* Takes a transaction and determines if it should be profiled or not. If it should be profiled, it returns the
|
|
8
|
-
* profile_id, otherwise returns undefined. Takes care of setting profile context on transaction as well
|
|
9
|
-
*/
|
|
10
|
-
export declare function maybeProfileTransaction(client: NodeClient | undefined, transaction: Transaction, customSamplingContext?: CustomSamplingContext): string | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Stops the profiler for profile_id and returns the profile
|
|
13
|
-
* @param transaction
|
|
14
|
-
* @param profile_id
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function stopTransactionProfile(transaction: Transaction, profile_id: string | undefined): ReturnType<(typeof CpuProfilerBindings)['stopProfiling']> | null;
|
|
18
|
-
/**
|
|
19
|
-
* Wraps startTransaction and stopTransaction with profiling related logic.
|
|
20
|
-
* startProfiling is called after the call to startTransaction in order to avoid our own code from
|
|
21
|
-
* being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.
|
|
22
|
-
*/
|
|
23
|
-
export declare function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: StartTransaction): StartTransaction;
|
|
24
|
-
/**
|
|
25
|
-
* This patches the global object and injects the Profiling extensions methods
|
|
26
|
-
*/
|
|
27
|
-
export declare function addProfilingExtensionMethods(): void;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=hubextensions.d.ts.map
|