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

Sampling based nodejs profiler.


Version published
Weekly downloads
590K
increased by2.47%
Maintainers
12
Weekly downloads
 
Created
Source

Sentry

Official Sentry Profiling SDK for NodeJS

Usage 🔥

import * as Sentry from '@sentry/node';
import '@sentry/tracing';
import { ProfilingIntegration } from '@sentry/profiling-node'.

Sentry.init({
  dsn: 'https://7fa19397baaf433f919fbe02228d5470@o1137848.ingest.sentry.io/6625302',
  debug: true,
  tracesSampleRate: 1,
  profilesSampleRate: 1, // Set sampling rate
  integrations: [new ProfilingIntegration()]
});

Sentry will automatically profile all transactions

const transaction = Sentry.startTransaction({ name: 'I will do some work' });

// The code between startTransaction and transaction.finish will be profiled

transaction.finish();

FAQ 💭

When should I not use this package

Todo: explain possible problems

Can the profiler leak PII to Sentry?

Todo: unlikely as we do not collect function arguments unless function calls are somehow created per user

What is the profiler overhead?

Todo: explain overhead and difference for kLazyLogging vs kEagerLogging

Will starting the profiler on main thread automatically profile worker threads too?

No, it will not (see WORKERS.md for an explanation)

What happens in the event of a profiler crash?

Todo: Check if napi will crash main process if worker is terminated while profiling. Todo: Check what happens if it crashes on main thread.

Keywords

FAQs

Package last updated on 03 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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