Skip to content
Snippets Groups Projects

Add opensearch client to write API log events

Merged Pieter van Staden requested to merge 5-opensearch-for-apilogs into main
15 files
+ 848
7
Compare changes
  • Side-by-side
  • Inline

Files

+ 2
0
@@ -99,6 +99,8 @@ func (api Api) Handler(baseCtx context.Context, apiGatewayProxyReq events.APIGat
res.Headers[api.requestIDHeaderKey] = ctx.RequestID()
}
if err := api.Service.WriteValues(ctx.StartTime(), time.Now(), ctx.RequestID(), map[string]interface{}{
"direction": "incoming",
"type": "api",
"request_id": ctx.RequestID(),
"request": ctx.Request(),
"response": res},
Loading