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

Logs NATS errors #10767

Open
jvillafanez opened this issue Dec 12, 2024 · 0 comments
Open

Logs NATS errors #10767

jvillafanez opened this issue Dec 12, 2024 · 0 comments

Comments

@jvillafanez
Copy link
Member

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

oCIS might be slow processing events. NATS might consider some of the services as slow consumers, which might cause problems such as losing events or disconnections.

Right now, it isn't possible to track down those errors, which could also have other causes. Troubleshooting is difficult.

Describe the solution you'd like

At least we should log the error so we know we have some slow consumers that could be the cause of errors. The log should show the affected service (postprocessing, antivirus, etc) and the replica if the service.
This will also help to identify which services should be scaled to help with the load.

Describe alternatives you've considered

Additional context

Based on https://docs.nats.io/running-a-nats-service/nats_admin/slow_consumers#slow-consumers-identified-in-the-client , there is an ErrorHandler we can set from the options while connecting to the NATS server. We should be able to inject a custom handler that would use our service's logger to show the NATS error in our logs.

We probably need to open a hole through reva in order to reach go-micro because the connection is created there. At the moment, we don't have an available option we can use from oCIS in order to set the error handler.

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

1 participant