Skip to content

Commit

Permalink
Remove tracing reference
Browse files Browse the repository at this point in the history
  • Loading branch information
dschom committed Aug 30, 2022
1 parent b222962 commit 20736c4
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions packages/fxa-shared/nestjs/sentry/sentry.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
import { ApolloError } from 'apollo-server';
import * as Sentry from '@sentry/node';
import '@sentry/tracing';
import { Transaction } from '@sentry/types';

import { ExtraContext, reportRequestException } from './reporting';
Expand All @@ -33,30 +32,7 @@ export async function createContext(ctx: any): Promise<Context> {

export const SentryPlugin: ApolloServerPlugin<Context> = {
requestDidStart({ request, context }) {
// Set the transacion name if request has an operation name defined
if (!!request.operationName) {
context.transaction.setName('GQL ' + request.operationName!);
}

return {
willSendResponse({ context }) {
// Finalizes transactionand sends it off to Sentry
context.transaction.finish();
},
executionDidStart() {
return {
// Create child span for each field resolved
willResolveField({ context, info }) {
const span = context.transaction.startChild({
op: 'resolver',
description: `${info.parentType.name}.${info.fieldName}`,
});
return () => {
span.finish();
};
},
};
},
didEncounterErrors({ context, errors, operation }) {
// If we couldn't parse the operation, don't
// do anything here
Expand Down

0 comments on commit 20736c4

Please sign in to comment.