mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-22 07:30:37 +00:00
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:
@@ -156,17 +156,15 @@ pub async fn serve_websocket(
|
||||
Err(e) => {
|
||||
// todo: log and push to ctx the error kind
|
||||
ctx.set_error_kind(e.get_error_kind());
|
||||
ctx.log();
|
||||
Err(e.into())
|
||||
}
|
||||
Ok(None) => {
|
||||
ctx.set_success();
|
||||
ctx.log();
|
||||
Ok(())
|
||||
}
|
||||
Ok(Some(p)) => {
|
||||
ctx.set_success();
|
||||
ctx.log();
|
||||
ctx.log_connect();
|
||||
p.proxy_pass().await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user