fix: wire OTLP logs for diagnostics
This commit is contained in:
@@ -25,4 +25,31 @@ describe("diagnostic-events", () => {
|
||||
|
||||
expect(seqs).toEqual([1, 2]);
|
||||
});
|
||||
|
||||
test("emits message-flow events", async () => {
|
||||
resetDiagnosticEventsForTest();
|
||||
const types: string[] = [];
|
||||
const stop = onDiagnosticEvent((evt) => types.push(evt.type));
|
||||
|
||||
emitDiagnosticEvent({
|
||||
type: "webhook.received",
|
||||
channel: "telegram",
|
||||
updateType: "telegram-post",
|
||||
});
|
||||
emitDiagnosticEvent({
|
||||
type: "message.queued",
|
||||
channel: "telegram",
|
||||
source: "telegram",
|
||||
queueDepth: 1,
|
||||
});
|
||||
emitDiagnosticEvent({
|
||||
type: "session.state",
|
||||
state: "processing",
|
||||
reason: "run_started",
|
||||
});
|
||||
|
||||
stop();
|
||||
|
||||
expect(types).toEqual(["webhook.received", "message.queued", "session.state"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user