proxy: Create disconnect events (#7535)

## Problem

It's not possible to get the duration of the session from proxy events.

## Summary of changes

* Added a separate events folder in s3, to record disconnect events. 
* Disconnect events are exactly the same as normal events, but also have
`disconnect_timestamp` field not empty.
* @oruen suggested to fill it with the same information as the original
events to avoid potentially heavy joins.
This commit is contained in:
Anna Khanova
2024-04-29 15:22:13 +02:00
committed by GitHub
parent 90cadfa986
commit 1684bbf162
5 changed files with 102 additions and 45 deletions

View File

@@ -279,7 +279,7 @@ async fn handle_client(
// doesn't yet matter as pg-sni-router doesn't report analytics logs
ctx.set_success();
ctx.log();
ctx.log_connect();
// Starting from here we only proxy the client's traffic.
info!("performing the proxy pass...");