Skip to content

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Jan 8, 2026

closes #18437
closes JS-1272

This adds a new type ServerRuntimeOptions inside @sentry/core, a type which can be used for all SDKs without OpenTelemetry suppport. In case OpenTelemetry support is needed OpenTelemetryServerRuntimeOptions are exported from @sentry/node-core, which extends ServerRuntimeOptions with the options which are needed to support OTel.

For now we don't have a nice testing strategy for Bun yet, and I didn't want to copy paste all Node integration/e2e tests just for this, I'm still up for suggestions.

@JPeer264 JPeer264 self-assigned this Jan 8, 2026
@linear
Copy link

linear bot commented Jan 8, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 11,295 - 11,856 -5%
GET With Sentry 1,906 17% 2,093 -9%
GET With Sentry (error only) 7,399 66% 7,678 -4%
POST Baseline 1,147 - 1,312 -13%
POST With Sentry 578 50% 671 -14%
POST With Sentry (error only) 1,020 89% 1,172 -13%
MYSQL Baseline 3,859 - 3,612 +7%
MYSQL With Sentry 481 12% 549 -12%
MYSQL With Sentry (error only) 3,108 81% 3,059 +2%

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding! Had a naming suggestion and I have another question: What about Cloudflare and Vercel edge? Both are based on the ServerRuntimeClient so I'm wondering if we can use these options as well. Also, both are WinterTC compliant 😅

Not saying the other runtimes have to happen in this PR. I'm more interested in the general approach we're taking here.

*
* @see https://wintercg.org/
*/
export interface BaseWinterTCOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies for the naming bike shedding in advance 😅 Feel free to disregard/overrule me but should we call this something more user-friendly? Something like ServerRuntimeOptions?

This would match the ServerRuntimeClientOptions we already have for the respective client.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would 2nd this. WinterTC hasn't been around for long and might change name again!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes total sense. I like it more than WinterTCOptions

@JPeer264
Copy link
Member Author

JPeer264 commented Jan 8, 2026

What about Cloudflare and Vercel edge?

You are absolutely right, theoretically also Deno right?

Not saying the other runtimes have to happen in this PR. I'm more interested in the general approach we're taking here.

Once this PR lands I'll do a follow up right with the other runtimes/SDKs.

@JPeer264 JPeer264 force-pushed the jp/align-types branch 2 times, most recently from fb8136c to 569cc6f Compare January 9, 2026 07:40
@JPeer264 JPeer264 changed the title feat(core): Consolidate bun and node types with BaseWinterTCOptions feat(node-core): Consolidate bun and node types with BaseWinterTCOptions Jan 12, 2026
@JPeer264
Copy link
Member Author

@Lms24 as a quick update. The types had to be moved from core to node-core due to OTel, as there is no OTel dependency in core for good reasons.

@JPeer264 JPeer264 requested a review from Lms24 January 12, 2026 13:36
*
* @see https://wintercg.org/
*/
export interface ServerRuntimeOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, let's ensure that ServerRuntimeOptions only includes the options that can be used across all SDKs using or extending from ServerRuntimeClient.

For the remaining options shared by Node and Bun, we can do whatever makes the most sense. Happy to leave this up to you.

Thanks! :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the description. The new option with OTel support is now called OpenTelemetryServerRuntimeOptions

@JPeer264 JPeer264 changed the title feat(node-core): Consolidate bun and node types with BaseWinterTCOptions feat(core,node-core): Consolidate bun and node types with ServerRuntimeOptions Jan 13, 2026
@JPeer264 JPeer264 requested a review from Lms24 January 13, 2026 14:07
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for reworking the hierarchy!

@JPeer264 JPeer264 merged commit d350c81 into develop Jan 13, 2026
210 checks passed
@JPeer264 JPeer264 deleted the jp/align-types branch January 13, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend BunOptions and NodeOptions from new, common WinterTCOptions base type

4 participants