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

Create a new set_error_group_callback public API and set a new error_group agent attribute #1845

Closed
fallwith opened this issue Feb 28, 2023 · 5 comments · Fixed by #1858
Closed
Assignees

Comments

@fallwith
Copy link
Contributor

fallwith commented Feb 28, 2023

A new public set_error_group_callback API endpoint must be created in adherence with the APIs/error_group.md internal specifications doc.

The API must accept as its only argument an instance of a Ruby Proc which can be either a proc or lambda but will be referred to generically here as a proc.

The proc itself must accept as argument(s) - the exception class instance for a noticed error and as much other information the agent has at notice time such as the transaction name, the transaction user attributes, any web app info such as request URI, response code, and status, etc. It must return exactly one string value: the desired error group to associate the error with. See the APIs/error_group.md internal specifications doc for a full list of ideal inputs.

When the Ruby agent notices an error, it will check to see if it has an error group callback proc that was supplied by the customer. If so, it will invoke that callback with the error instance and expect to get back either a non empty string, a nil, or an empty string. If the agent receives a nil or an empty string, it discards these and takes no new action compared to what it currently does to process the noticed error. If the agent receives a non empty string, it will use the string as the value for a new error_group agent attribute that is sent up within the agent attributes hash for the noticed error.

@workato-integration
Copy link

@fallwith fallwith changed the title Create a new error_group_callback public API and set a new error_group agent attribute Create a new set_error_group_callback public API and set a new error_group agent attribute Feb 28, 2023
@fallwith
Copy link
Contributor Author

fallwith commented Mar 4, 2023

Hey team! Please add your planning poker estimate with Zenhub @hannahramadan @kaylareopelle @tannalynn

@kaylareopelle
Copy link
Contributor

This is expected to be called once and only once right after the agent initializes

@kaylareopelle
Copy link
Contributor

Add method tracer accepts a stabby lambda/proc as an argument: https://rubydoc.info/gems/newrelic_rpm/NewRelic%2FAgent%2FMethodTracer%2FClassMethods:add_method_tracer

@fallwith
Copy link
Contributor Author

Addressed by #1858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants