-
Notifications
You must be signed in to change notification settings - Fork 70
170 - re-enabled request logger and made compatible with Avro #214
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
Conversation
636b6f1
to
51ac74e
Compare
Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good for the most part! What could be improved:
- If RIG is started with
REQUEST_LOG=asdf
, I'd expect RIG to fail on startup. Instead, RIG returns500 Internal Server Error
when hit with a request, without emitting a warning of any kind. - RIG fails the same way for
REQUEST_LOG=
, which really should only disable request logging. - RIG also fails for
REQUEST_LOG=kafka
in case Kafka is not configured.- RIG should fail on startup if this is set and Kafka is not enabled.
- If Kafka is enabled but there's a connection issue, the request logger should emit a warning but the service response should not be affected - the client shouldn't see a 500 just because its request couldn't be logged successfully.
Hmm, do you think it's necessary to shutdown entire RIG when env var is misconfigured or kafka is not set, but logger (with kafka value) is? In the first case, I guess it makes sense - Kafka works in a similar way when you misconfigure something. In the second case, I'm not sure -- warning seems enough for me. |
I wouldn't shut down a running instance, but I would prevent starting a new one with this configuration. |
Added my first shot, but you can more or less see the direction in git diff. In general, goal is:
|
Please rename
👍
Above I wrote "RIG fails the same way for REQUEST_LOG=, which really should only disable request logging." - still feel the same way. Why do you prefer exit in this case?
👍
👍 if with "produce fail" you mean "produce warning".
👍 |
…ues for empty strings
Added filtering for env var value that should prevent failing on cases like |
Description
Fixed API Gateway's request logger to work with latest Kafka client/interface & added integration with Avro.
Split integration tests into 2 parts - Kafka without Avro & Kafka with Avro -- reason is easier configuration and less issues in tests themselves.
Closes #170
Closes #201
What's missing:
What to look out for
Process
The goal is to improve not only the code in this PR but also our skills! The "rules":
Have fun!