Skip to content

Commit

Permalink
Record API key id
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Jan 16, 2025
1 parent ca37a1d commit 443a831
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const server = new ApolloServer({
const { requestContext } = event ||
req || { requestContext: { identity: {} } };

Bugsnag.addMetadata('apiKeyId', requestContext.identity.apiKeyId);

return {
user: await loadUser(requestContext.identity.apiKeyId),
invokedFunctionArn: context ? context.invokedFunctionArn : '',
Expand Down

0 comments on commit 443a831

Please sign in to comment.