diff --git a/packages/core/src/errors/error-reporter.ts b/packages/core/src/errors/error-reporter.ts index ccbcd05582..21097dcb61 100644 --- a/packages/core/src/errors/error-reporter.ts +++ b/packages/core/src/errors/error-reporter.ts @@ -132,7 +132,12 @@ export class ErrorReporter { ]; const eventLoopBlockIntegration = withEventLoopBlockDetection - ? await this.getEventLoopBlockIntegration() + ? // The EventLoopBlockIntegration doesn't automatically include the + // same tags, so we set them explicitly. + await this.getEventLoopBlockIntegration({ + server_name: serverName, + server_type: serverType, + }) : []; init({ @@ -262,10 +267,14 @@ export class ErrorReporter { if (tags) event.tags = { ...event.tags, ...tags }; } - private async getEventLoopBlockIntegration() { + private async getEventLoopBlockIntegration(tags: Record) { try { const { eventLoopBlockIntegration } = await import('@sentry/node-native'); - return [eventLoopBlockIntegration()]; + return [ + eventLoopBlockIntegration({ + staticTags: tags, + }), + ]; } catch { this.logger.debug( "Sentry's event loop block integration is disabled, because the native binary for `@sentry/node-native` was not found",