Socket
Socket
Sign inDemoInstall

@sentry/profiling-node

Package Overview
Dependencies
Maintainers
12
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/profiling-node - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

19

lib/hubextensions.js

@@ -14,5 +14,6 @@ "use strict";

return function wrappedStartTransaction(transactionContext, customSamplingContext) {
var _a, _b;
var _a;
const client = this.getClient();
// @ts-expect-error profilesSampleRate is not part of the options type yet
const profilesSampleRate = (_b = (_a = this.getClient()) === null || _a === void 0 ? void 0 : _a.getOptions().profilesSampleRate) !== null && _b !== void 0 ? _b : undefined;
const profilesSampleRate = (_a = client === null || client === void 0 ? void 0 : client.getOptions().profilesSampleRate) !== null && _a !== void 0 ? _a : undefined;
const transaction = startTransaction.call(this, transactionContext, customSamplingContext);

@@ -37,3 +38,8 @@ // We create "unique" transaction names to avoid concurrent transactions with same names

const originalFinish = transaction.finish.bind(transaction);
// @TODO remove this
const start = transaction.startChild({
op: 'sentry.startProfiling'
});
cpu_profiler_1.CpuProfilerBindings.startProfiling(uniqueTransactionName);
start.finish();
if ((0, env_1.isDebugBuild)()) {

@@ -58,3 +64,8 @@ utils_1.logger.log('[Profiling] started profiling transaction: ' + transactionContext.name);

}
// @TODO remove this
const stop = transaction.startChild({
op: 'sentry.stopProfiling'
});
profile = cpu_profiler_1.CpuProfilerBindings.stopProfiling(uniqueTransactionName);
stop.finish();
if (maxDurationTimeoutID) {

@@ -87,6 +98,2 @@ global.clearTimeout(maxDurationTimeoutID);

const profile = onProfileHandler();
// If we receive a profile, set the logging mode that was used as a tag
if (profile) {
transaction.setTag('profiler_logging_mode', profile.profiler_logging_mode);
}
// @ts-expect-error profile is not a part of sdk metadata so we expect error until it becomes part of the official SDK.

@@ -93,0 +100,0 @@ transaction.setMetadata({ profile });

{
"name": "@sentry/profiling-node",
"version": "0.0.5",
"version": "0.0.6",
"description": "Sampling based nodejs profiler.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc