Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error extensions as custom attributes on errors #280

Closed
edds opened this issue Nov 22, 2023 · 1 comment · Fixed by #281
Closed

Add error extensions as custom attributes on errors #280

edds opened this issue Nov 22, 2023 · 1 comment · Fixed by #281

Comments

@edds
Copy link
Contributor

edds commented Nov 22, 2023

Is your feature request related to a problem? Please describe.

The current error helper passes errors through to NewRelic but doesn't pass on any custom attributes. This can make it hard to see how many different variations of errors we're getting.

Feature Description

The ApolloServer standard for errors is to have an extensions field which contains useful information which we'd like attached to our errors in NewRelic. From the docs it looks like this:

throw new GraphQLError(message, {
  extensions: { code: 'YOUR_ERROR_CODE', myCustomExtensions },
});

Would you accept a PR to change the error helper to something like:

instrumentationApi.agent.errors.add(transaction, error, error.extensions)

Which would pass through the extensions as custom attributes an allow us to see them in NewRelic Errors Inbox.

Priority

Please help us better understand this feature request by choosing a priority from the following options:
Really Want

@workato-integration
Copy link

@newrelic-node-agent-team newrelic-node-agent-team added this to Triage Needed: Unprioritized Features in Node.js Engineering Board Nov 22, 2023
Node.js Engineering Board automation moved this from Triage Needed: Unprioritized Features to Done: Issues recently completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging a pull request may close this issue.

1 participant