@@ -20,19 +20,25 @@ type Recorder struct {
2020 errChan chan error
2121}
2222
23- // RouteCall records that a route was called
23+ // RouteCall records when a route is called, the request and response
2424type RouteCall struct {
25- RouteID string `json:"route_id"`
26- Request * RouteCallRequest `json:"request"`
25+ // RouteCallID is a unique identifier for the route call for help with debugging
26+ RouteCallID string `json:"route_call_id"`
27+ // RouteID is the identifier of the route that was called
28+ RouteID string `json:"route_id"`
29+ // Request is the request made to the route
30+ Request * RouteCallRequest `json:"request"`
31+ // Response is the response from the route
2732 Response * RouteCallResponse `json:"response"`
2833}
2934
3035// RouteCallRequest records the request made to a route
3136type RouteCallRequest struct {
32- Method string `json:"method"`
33- URL * url.URL `json:"url"`
34- Header http.Header `json:"header"`
35- Body []byte `json:"body"`
37+ Method string `json:"method"`
38+ URL * url.URL `json:"url"`
39+ RemoteAddr string `json:"caller"`
40+ Header http.Header `json:"header"`
41+ Body []byte `json:"body"`
3642}
3743
3844// RouteCallResponse records the response from a route
0 commit comments