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

Treatment of errors in Orion #20

Closed
staceytay opened this issue Jan 19, 2018 · 2 comments
Closed

Treatment of errors in Orion #20

staceytay opened this issue Jan 19, 2018 · 2 comments

Comments

@staceytay
Copy link
Contributor

staceytay commented Jan 19, 2018

Context

At present all errors from a service are treated as errors on Orion and so treated as errors on New Relic. However, for SSO, we have a use case where we would like to ignore HTTP 401s for the login endpoints (this is the case when a user gives incorrect login credentials) and treat that as a non-error.

I tried to do this by creating a custom decoder for login, but that didn't work because it's not possible to change the endpointError variable from the decoder. At present, I can't think of a clean way to send a HTTP 401 to clients and still not treat that as an error.

Impact

NR is reporting a 20% error rate for SSO on prod, but they're mostly rpc error: code = Unauthenticated desc = Unauthorized took 71.696791ms errors which are used to return a 401, making it hard to detect legitimate errors on NR.

Proposed Solution

One workaround that I can think of is to ignore such errors in the New Relic config, as in https://docs.newrelic.com/docs/agents/go-agent/configuration/go-agent-configuration#error-ignore-status. Hence, it'll be great if Orion could provide an API or some way for services to customise this.

@ankurs
Copy link
Contributor

ankurs commented Jan 22, 2018

This is WIP!

ankurs added a commit that referenced this issue Jan 22, 2018
@ankurs
Copy link
Contributor

ankurs commented Jan 22, 2018

fixed,
call modifiers.DontLogError(ctx) from you function, before throwing error

@ankurs ankurs closed this as completed Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants