feat(telemetry): Sentry + PostHog quality pass (#546)

Comprehensive telemetry quality improvements across Sentry and PostHog, grounded in an audit of the live data plus current best-practice research.

Sentry: job_id/instance_id tags, operational fingerprinting, PII-safe settings context on bug events, web tag population + extension-noise filtering, an early-crash buffer, http status/method kept on breadcrumbs, and a gated-off-by-default performance-tracing re-enable (tracesSampler that zeroes db/redis/queue-poll root spans + drops the Redis integration) with worker job spans and canonical-host cron monitors.

PostHog: history_change SPA pageviews, instance_id super property for fleet rollups, enriched tool_used (formats, byte sizes, is_batch, execution_hint, real error_kind taxonomy), the previously-dead result_saved/batch_processed/ai_bundle_prompted events fired, search click-through, editor + Automate authoring + auth instrumentation, a before_send PII boundary, and minimal opt-in landing-site pageviews.
This commit is contained in:
SnapOtter
2026-07-17 01:51:48 +00:00
committed by GitHub
parent 9247947704
commit 86251434b5
36 changed files with 936 additions and 54 deletions
+7 -3
View File
@@ -71,19 +71,23 @@ describe("buildWebBeforeSend", () => {
expect(buildWebBeforeSend(() => false)(baseEvent(), {})).toBeNull();
});
it("keeps the breadcrumb trail, redacting paths/urls and dropping data payloads", () => {
it("keeps the breadcrumb trail, redacting urls but keeping safe fetch status/method", () => {
const send = buildWebBeforeSend(() => true);
const out = send(
baseEvent({
breadcrumbs: [
{ message: "fetch https://host/user.png", category: "fetch", data: { url: "x" } },
{
message: "fetch https://host/user.png",
category: "fetch",
data: { url: "https://host/user.png", status_code: 500, method: "POST" },
},
{ message: "open /Users/a/secret.pdf", category: "console", level: "warning" },
],
}),
{},
)!;
expect(out.breadcrumbs).toEqual([
{ message: "fetch <url>", category: "fetch" },
{ message: "fetch <url>", category: "fetch", data: { status_code: 500, method: "POST" } },
{ message: "open <path>", category: "console", level: "warning" },
]);
});