fix(relay): log event kind on the HTTP bridge /events line (#5291)

The HTTP bridge request log recorded route, status, and accepted but not
the event kind, so typing indicators (kind 7) and their deletions (kind
5)
were indistinguishable from real messages (kind 9). Every agent turn
produced
accepted:true lines whether or not a message was actually sent, which
twice
led debuggers to conclude a silent agent had published successfully.

Add kind to the Ok outcome and the tracing::info line so the publish
path is
self-describing without a database query.

Closes #4676

Signed-off-by: Taksh <takshkothari09@gmail.com>
This commit is contained in:
Taksh Kothari
2026-08-12 04:14:28 +05:30
committed by GitHub
parent 397796c5f3
commit e8153f8f27

View File

@@ -654,12 +654,13 @@ pub async fn submit_event(
submit_event_authed(&state, &tenant, &headers, &body, pubkey, event_id_bytes).await;
match &outcome {
SubmitOutcome::Ok { accepted, .. } => {
SubmitOutcome::Ok { accepted, kind, .. } => {
tracing::info!(
pubkey = %pubkey_hex,
route = "/events",
status = 200u16,
accepted,
kind,
"HTTP bridge request"
);
}
@@ -713,6 +714,7 @@ enum SubmitOutcome {
/// Ingest pipeline ran and returned a result (accepted or not).
Ok {
accepted: bool,
kind: u32,
response: Json<Value>,
},
/// JSON parse failure before ingest — log category/line/column, not msg.
@@ -843,6 +845,7 @@ async fn submit_event_authed(
}));
SubmitOutcome::Ok {
accepted: result.accepted,
kind: kind_u32,
response,
}
}