The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat(studio): dedicated telemetry events for org audit log drains (#46733)
Jordi Enric895726505f1c
diff --git a/apps/studio/components/interfaces/LogDrains/OrgAuditLogDrains.tsx b/apps/studio/components/interfaces/LogDrains/OrgAuditLogDrains.tsxindex ef1a849ce07..08737854684 100644--- a/apps/studio/components/interfaces/LogDrains/OrgAuditLogDrains.tsx+++ b/apps/studio/components/interfaces/LogDrains/OrgAuditLogDrains.tsx@@ -210,7 +210,7 @@ export function OrgAuditLogDrains() {isLoading={isLoading}existingDrainNames={(logDrains ?? []).map((drain) => drain.name)}onSaveClick={(type) => {- track('log_drain_save_button_clicked', { destination: type })+ track('audit_log_drain_save_button_clicked', { destination: type })}}onSubmit={({ name, description, type, ...values }) => {const logDrainValues = {@@ -245,7 +245,7 @@ export function OrgAuditLogDrains() {onNewDrainClick={handleNewClick}onDeleteDrain={(drain) => {deleteLogDrain({ token: drain.token, slug })- track('log_drain_removed', { destination: drain.type })+ track('audit_log_drain_removed', { destination: drain.type })}}onTestDrain={(drain) => testLogDrain({ token: drain.token, slug })}/>diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.tsindex c55879f79ef..a06cd36d605 100644--- a/packages/common/telemetry-constants.ts+++ b/packages/common/telemetry-constants.ts@@ -2509,6 +2509,66 @@ export interface LogDrainRemovedEvent {groups: TelemetryGroups}+/**+ * User clicked the save destination button in the add audit log drain sheet.+ *+ * @group Events+ * @source studio+ * @page /dashboard/org/{slug}/audit-log-drains (LogDrainDestinationSheetForm)+ */+export interface AuditLogDrainSaveButtonClickedEvent {+ action: 'audit_log_drain_save_button_clicked'+ properties: {+ /**+ * Type of the destination saved+ */+ destination:+ | 'postgres'+ | 'bigquery'+ | 'clickhouse'+ | 'webhook'+ | 'datadog'+ | 'loki'+ | 'sentry'+ | 's3'+ | 'axiom'+ | 'last9'+ | 'otlp'+ | 'syslog'+ }+ groups: Omit<TelemetryGroups, 'project'>+}++/**+ * User confirmed removal of an audit log drain destination in the delete-confirm modal.+ *+ * @group Events+ * @source studio+ * @page /dashboard/org/{slug}/audit-log-drains+ */+export interface AuditLogDrainRemovedEvent {+ action: 'audit_log_drain_removed'+ properties: {+ /**+ * Type of the destination removed+ */+ destination:+ | 'postgres'+ | 'bigquery'+ | 'clickhouse'+ | 'webhook'+ | 'datadog'+ | 'loki'+ | 'sentry'+ | 's3'+ | 'axiom'+ | 'last9'+ | 'otlp'+ | 'syslog'+ }+ groups: Omit<TelemetryGroups, 'project'>+}+type AdvisorCategory = 'PERFORMANCE' | 'SECURITY'type AdvisorLevel = 'ERROR' | 'WARN' | 'INFO'@@ -3425,6 +3485,8 @@ export type TelemetryEvent =| SidebarOpenedEvent| LogDrainSaveButtonClickedEvent| LogDrainRemovedEvent+ | AuditLogDrainSaveButtonClickedEvent+ | AuditLogDrainRemovedEvent| AdvisorDetailOpenedEvent| AdvisorAssistantButtonClickedEvent| QueryPerformanceAIExplanationButtonClickedEvent