feat: Add validateStatus config to grpc plugin
What does this PR do?
Adding validateStatus configuration option to grpc plugin. Allowing users to determine which grpc status codes are actually errors in a trace.
Motivation
We want to handle application errors, especially ones that we know are expected (like bad input, duplicate entry, etc) as not actually errors in Datadog, especially when considered by metrics like apdex.
https://github.com/DataDog/dd-trace-js/issues/3762 based off of my feature request here.
Plugin Checklist
- [x] Unit tests.
- [x] TypeScript definitions.
- [x] TypeScript tests.
- [ ] API documentation.
- [x] CircleCI jobs/workflows.
- [x] Plugin is exported.
Additional Notes
Security
Datadog employees:
- [ ] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance. - [ ] This PR doesn't touch any of that.
Unsure? Have a question? Request a review!
@Qard is there anything else I need to do myself to get this PR moving forward? Want to make sure I didn't miss anything to make it as easy as possible for the DD team to look at this and hopefully merge
@tlhunter Can you do something with this while you're on ER?
@Qard @jbertran any update on this?
@Qard any update on this PR? Would love to do whatever I can to help move this along.
This pull request has been marked as stale due to 90 days of inactivity.
If this is still relevant, please update or comment to keep it open.
If this should be kept open indefinitely, please apply the label keep-open.
Otherwise, it will be automatically closed after 14 days.
@rctbusk sorry for the very late reply. It seems like this has been implemented by now with two new environment variables in https://github.com/DataDog/dd-trace-js/pull/4800
I am very sorry this was not picked up before and I want to thank you again for the effort to improve this! The code was LGTM and I guess this could have been an alternative implementation.