types(node): add profilesSampleRate#6318
Conversation
size-limit report 📦
|
Lms24
left a comment
There was a problem hiding this comment.
So full disclosure, I haven't had a look at how profiling works under the hood but given that users have to add the ProfilingIntegration in their init options, wouldn't it make more sense to pass the profilesSampleRate as an option in the constructor of the integration? WDYT?
Replay is doing it this way at the moment: Replay Setup
|
So I elected for initially going with #6310, but I think it makes sense to keep it node only for now and do it in the browser later. A top level option for profiling matches tracing, and the other SDKs at the moment, so I would prefer that so that JavaScript is not the only SDK that works this way. @JonasBa can we add a doc string for this? We also need to update https://docs.sentry.io/platforms/node/configuration/options/ |
I didn't know this, so yes, in that case it makes sense to keep it as a top level option in the Node SDK. |
| */ | ||
| export interface NodeClientOptions extends ClientOptions<NodeTransportOptions>, BaseNodeOptions {} | ||
| export interface NodeClientOptions extends ClientOptions<NodeTransportOptions>, BaseNodeOptions { | ||
| profilesSampleRate?: number; |
There was a problem hiding this comment.
Can we add a JSDoc here, explaining what this option does?
|
Hey @JonasBa @Lms24 @AbhiPrasad |
|
Hey @tomgrossman, thanks for writing in! We will fix this! |
|
This is addressed by #6409, will be part of the next release. |
|
@tomgrossman oversight on my part - I should have double checked the type name 😞 |
Adds profilesSampleRate to the Node SDK init options.
Adding this because we got 3 emails last week about the typescript error by our customers and asking them to @ts-expect-error is not really acceptable.