Skip to content

Commit

Permalink
chore: add extra logging to gql executor timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <[email protected]>
  • Loading branch information
mattkrick committed Feb 4, 2025
1 parent 260daf3 commit d45d777
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion packages/server/graphql/ResponseStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,17 @@ export default class ResponseStream implements AsyncIterableIterator<ExecutionRe
} catch (e) {
const error =
e instanceof Error ? e : new Error(`GQL executor failed to publish. docId: ${docId}`)
sendToSentry(error, {userId: getUserId(authToken)})
sendToSentry(error, {
userId: getUserId(authToken),
tags: {
authToken: JSON.stringify(authToken),
docId: docId || '',
query: query || '',
variables: JSON.stringify(variables),
socketServerId: socketId,
executorServerId
}
})
return this.next()
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/server/graphql/handleGraphQLTrebuchetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const handleGraphQLTrebuchetRequest = async (
authToken: JSON.stringify(authToken),
docId: docId || '',
query: query || '',
variables: JSON.stringify(variables)
variables: JSON.stringify(variables),
socketServerId: socketId
}
})
return {
Expand Down

0 comments on commit d45d777

Please sign in to comment.