Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/shared/datadogMirroredEvents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ describe('isDatadogMirroredEvent', () => {
expect(isDatadogMirroredEvent('comfy.desktop.install.dispatched')).toBe(false)
})

// The SSO dashboards and monitors live in Datadog, so the hosted-view sign-in
// mirrors every stage; the Firebase bridge's sign_in_started stays PostHog-only.
it.each([
['comfy.desktop.auth.host_sign_in', true],
['comfy.desktop.auth.sign_in_failed', true],
['comfy.desktop.auth.sign_in_started', false]
])('mirrors %s: %s', (name, mirrored) => {
expect(isDatadogMirroredEvent(name)).toBe(mirrored)
})

it('returns false for unknown event names', () => {
expect(isDatadogMirroredEvent('comfy.desktop.not.a.real.event')).toBe(false)
})
Expand Down
5 changes: 5 additions & 0 deletions src/shared/datadogMirroredEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export const DATADOG_MIRRORED_EVENT_NAMES: ReadonlySet<string> = new Set([
// Sign-in failures — alert if a provider's auth bridge breaks (OAuth
// config drift, IdP outage, loopback-port contention).
'comfy.desktop.auth.sign_in_failed',
// Hosted-view SSO sign-in, one event per stage (requested / completed /
// failed). Mirrored whole, like install.phase: the SSO dashboards and
// monitors live in Datadog and need requested/completed as the denominator;
// monitors filter on `stage:failed` and group by `reason` / `http_status`.
'comfy.desktop.auth.host_sign_in',
// SDK-level volume guards — Datadog should alert if either fires
// because the call site is misbehaving (loop, missing dedup, etc.)
// and the SDK had to step in. One emit per process per event-name.
Expand Down
Loading