Send events to EventGate from the proxy.

Post events to the EventGate server from the proxy, asynchronously, from a @ServerResponseFilter that runs on every request.

We save the incoming query in RoutingContext from either the request body (POST requests) or the query HTTP query param (GET requests).

I've validated the events produced by this MR against a local EventGate; they work!

There are a few TODOs (tagged with phab IDs) and also some areas for discussion/improvement (examples: should we log it when a POST request has the query param set? and what about metrics on eventgate errors?) but these should be addressed in follow-ups.

Extracting the error message was interesting: the records holding the error responses all have a message field, so I needed to get that value. However, they are of various different types and all private anyway. The solution is to have them implement a public interface that has a getMessage() method, which reaches into the record's "message" field.

Bug: T429407

Bug: T431482

Bug: T431481

@trueg @gmodena

Edited by Lerickson

Merge request reports

Loading