From 9a92db91bd89944e9c0d419fd9a9d3bab4638387 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 22 Mar 2022 12:34:15 -0400 Subject: [PATCH] fix --- src/class/Client.ts | 3 +++ src/events/CommandHandler.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/class/Client.ts b/src/class/Client.ts index 37234b9..6c6ea11 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -72,6 +72,9 @@ export default class Client extends eris.Client { Sentry.init({ dsn: 'https://323f6626a7104be7859088750b91abe1@sentry.libraryofcode.org/2', tracesSampleRate: 0.25, + integrations: [ + new Sentry.Integrations.Http({ tracing: true }), + ], }); } diff --git a/src/events/CommandHandler.ts b/src/events/CommandHandler.ts index 44c7c44..583314e 100644 --- a/src/events/CommandHandler.ts +++ b/src/events/CommandHandler.ts @@ -1,6 +1,7 @@ /* eslint-disable no-useless-return */ import { Message, TextChannel, NewsChannel } from 'eris'; import * as Sentry from '@sentry/node'; +import * as Tracing from '@sentry/tracing'; import { Client, Event } from '../class'; export default class CommandHandler extends Event { @@ -28,6 +29,9 @@ export default class CommandHandler extends Event { this.client.util.signale.log(`User '${message.author.username}#${message.author.discriminator}' ran command '${resolved.cmd.name}' in '${message.channel.id}'.`); try { const transaction = Sentry.startTransaction({ name: 'command-handler' }); + Sentry.configureScope((scope) => { + scope.setSpan(transaction); + }); await resolved.cmd.run(message, resolved.args); transaction.finish(); } catch (err) {