mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -2,8 +2,8 @@ import { ANALYTICS_EVENTS } from "@snapotter/shared";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("ANALYTICS_EVENTS", () => {
|
||||
it("has exactly 15 event keys", () => {
|
||||
expect(Object.keys(ANALYTICS_EVENTS)).toHaveLength(15);
|
||||
it("has exactly 24 event keys", () => {
|
||||
expect(Object.keys(ANALYTICS_EVENTS)).toHaveLength(24);
|
||||
});
|
||||
|
||||
it("contains the expected keys", () => {
|
||||
@@ -22,6 +22,15 @@ describe("ANALYTICS_EVENTS", () => {
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("FEEDBACK_SUBMITTED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("SPONSOR_CLICKED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("INSTANCE_STARTED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("EDITOR_OPENED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("EDITOR_TOOL_USED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("EDITOR_EXPORTED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("PIPELINE_OPENED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("PIPELINE_STEP_ADDED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("PIPELINE_SAVED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("PIPELINE_TEMPLATE_SELECTED");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("AUTH_LOGIN");
|
||||
expect(ANALYTICS_EVENTS).toHaveProperty("AUTH_LOGIN_FAILED");
|
||||
});
|
||||
|
||||
it("all event values are strings", () => {
|
||||
|
||||
Reference in New Issue
Block a user