newrelic / newrelic/newrelic-java-agent
Additional options for passing attributes to `noticeError`, specifically a way to pass a string for `error_class`
@obenkenobi is already working on this.
Since Aug 4, 2026.
- Dominant language
- Java
- Stars
- 240
- Forks
- 170
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
Is your feature request related to a problem? Please describe.
Our current Java API has a number of iterations of noticeError(), each passing different attributes. You can pass an error message as a string, a boolean for ‘expected’ or ‘not expected’, a map of custom attributes, and a throwable exception object. However, it isn’t possible to fully populate an error manually, passing strings for all common attributes (error_class, error_message, stack trace, status code, etc.)
Feature Description
An update to our noticeError API to add additional attributes, such as title and all other common error attributes. This will require updates to the agent spec.
Describe Alternatives
There has been workarounds mostly creating a throwable object and adding it to the noticeError API. This approach has flaws such as not being able capture the thrown exception as it is being thrown.
Additional context
Priority
Nice to Have
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.