complete performance and reliability follow-ups
This commit is contained in:
@@ -93,4 +93,14 @@ describe("observability integrations", () => {
|
||||
expect(await profile("render", () => "ok")).toBe("ok");
|
||||
expect(profiles[0]).toMatchObject({ name: "render", durationMs: 4 });
|
||||
});
|
||||
|
||||
test("operation exporter failures reach diagnostics without recursive telemetry", async () => {
|
||||
const diagnostics: string[] = [];
|
||||
const tracer = createOperationTracer({
|
||||
exporter: { export: () => Promise.reject(new Error("offline")) },
|
||||
diagnostic: (message) => diagnostics.push(message),
|
||||
});
|
||||
await expect(tracer.span("database", "query", async () => 1)).resolves.toBe(1);
|
||||
expect(diagnostics).toEqual(["operation span export failed"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user