From 1b864ad8d9ed9c158915393f4ee027e246395501 Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Tue, 22 Aug 2023 09:22:33 +0200 Subject: [PATCH] fix: Sentry env (GQL) --- app/graphql/apollo-sentry-plugin.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/graphql/apollo-sentry-plugin.ts b/app/graphql/apollo-sentry-plugin.ts index 4185079f4..f83e32cb4 100644 --- a/app/graphql/apollo-sentry-plugin.ts +++ b/app/graphql/apollo-sentry-plugin.ts @@ -1,6 +1,7 @@ +import * as Sentry from "@sentry/nextjs"; import { ApolloServerPlugin, GraphQLRequest } from "apollo-server-plugin-base"; -import { Sentry } from "@/sentry.server.config"; +import { getSentryEnv } from "@/sentry-utils"; const getDataCubeIri = (req: GraphQLRequest) => { const { variables, operationName } = req; @@ -25,6 +26,9 @@ const plugin: ApolloServerPlugin = { const transaction = Sentry.startTransaction({ op: "gql", name: "GQL - Unnamed", // this will be the default name, unless the gql query has a name + tags: { + environment: getSentryEnv(), + }, }); if (!!request.operationName) {