Skip to content

Commit

Permalink
fix: Sentry env (GQL)
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Aug 22, 2023
1 parent 7f59c78 commit 1b864ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/graphql/apollo-sentry-plugin.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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) {
Expand Down

1 comment on commit 1b864ad

@vercel
Copy link

@vercel vercel bot commented on 1b864ad Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

visualization-tool – ./

visualization-tool-git-main-ixt1.vercel.app
visualization-tool-alpha.vercel.app
visualization-tool-ixt1.vercel.app

Please sign in to comment.