sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Include `event.contexts.device.processor_count` for browser and node

Open timfish opened this issue 3 years ago • 1 comments

Problem Statement

Most platforms now have a way to get the CPU count.

Solution Brainstorm

In browsers navigator.hardwareConcurrency has been around for a while. Safari apparently caps this as 2 for iOS and 8 for macOS.

Node.js has had os.cpus() since pre v1.

timfish avatar Jul 30 '22 13:07 timfish

We’ve been tracking this as a span on transactions for performance monitoring. https://github.com/getsentry/sentry-javascript/blob/7a0dc5458cf92acae1cdf257121da1d3029c4b29/packages/tracing/src/browser/metrics/index.ts#L386

AbhiPrasad avatar Jul 30 '22 17:07 AbhiPrasad