mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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
|
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({
|
init({
|
||||||
@@ -262,10 +267,14 @@ export class ErrorReporter {
|
|||||||
if (tags) event.tags = { ...event.tags, ...tags };
|
if (tags) event.tags = { ...event.tags, ...tags };
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getEventLoopBlockIntegration() {
|
private async getEventLoopBlockIntegration(tags: Record<string, string>) {
|
||||||
try {
|
try {
|
||||||
const { eventLoopBlockIntegration } = await import('@sentry/node-native');
|
const { eventLoopBlockIntegration } = await import('@sentry/node-native');
|
||||||
return [eventLoopBlockIntegration()];
|
return [
|
||||||
|
eventLoopBlockIntegration({
|
||||||
|
staticTags: tags,
|
||||||
|
}),
|
||||||
|
];
|
||||||
} catch {
|
} catch {
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
"Sentry's event loop block integration is disabled, because the native binary for `@sentry/node-native` was not found",
|
"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