mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 08:46:58 +02:00
chore: Add tags to sentry's event loop blocked integration (#19126)
This commit is contained in:
parent
89fc91bed6
commit
a82e3c8ede
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user