mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
chore: Add tags to sentry's event loop blocked integration (#19126)
This commit is contained in:
@@ -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<string, string>) {
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user