Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#9151 Add mod runtime and IDB error events to lexicon #9345

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
49 changes: 48 additions & 1 deletion src/telemetry/lexicon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const LexiconTags = {
MOD_RUNTIME: "mod runtime",
ENTERPRISE: "enterprise",
TEAM: "team",
OBSOLETE: "obsolete",
} as const;

type LexiconTag = ValueOf<typeof LexiconTags>;
Expand All @@ -47,6 +48,14 @@ interface LexiconEventEntry {
* Tags to categorize the event in the Mixpanel interface. Typically used to group related events together.
*/
tags?: LexiconTag[];
/**
* True if the event should be hidden from the Mixpanel interface. Hidden events are still tracked (granted they are
* reported to Mixpanel), but since they are hidden they will be discouraged from being used in reports.
*
* "Hidden" is the preferred way to deprecate or make an event obsolete, and differs from "dropped" in that it is less
* severe; dropped events are intercepted by Mixpanel and not reported at all, and is thus error-prone.
*/
hidden?: boolean;
}

/**
Expand Down Expand Up @@ -192,6 +201,44 @@ export const lexicon: LexiconMap = {
"DevTools in the Extension Console or on internal chrome pages).",
tags: [LexiconTags.PAGE_EDITOR],
},
GOOGLE_FILE_PICKER_EVENT: {
description: "[OBSOLETE] This event is no longer in use.",
hidden: true,
tags: [LexiconTags.OBSOLETE],
},
HANDLE_CONTEXT_MENU: {
description:
"Triggered by running a Context Menu starter brick, as a result of a user clicking a PixieBrix context menu item on a modified web page.\n" +
"\n" +
"Does not necessarily indicate a successful mod run.",
tags: [LexiconTags.MOD_RUNTIME],
},
HANDLE_QUICK_BAR: {
description:
"Triggered by running a Quickbar mod, as a result of opening the Quickbar on a modified web page and selecting " +
"a mod to run by clicking on the mod or pressing 'enter' on the keyboard with the mod highlighted." +
"\n" +
"Does not necessarily indicate a successful mod run.",
tags: [LexiconTags.MOD_RUNTIME],
},
IDB_RECLAIM_QUOTA: {
description:
"Reported when a user clicks the 'Reclaim Space' button on the IndexedDB (IDB) error display in the Extension " +
"Console when the user gets a 'Insufficient storage space available to PixieBrix' error.",
tags: [LexiconTags.EXTENSION_CONSOLE],
},
IDB_RECOVER_CONNECTION: {
description:
"Reported when a user clicks the 'Recover Connection' button on the IndexedDB (IDB) error display in the Extension " +
"Console when the user gets a 'Error connecting to local database' error.",
tags: [LexiconTags.EXTENSION_CONSOLE],
},
Copy link
Collaborator Author

@mnholtz mnholtz Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer note that IDBReclaimQuota and IDBRecoverConnection events have never been reported to Mixpanel before; you can verify this by the lack of entries for either events in the lexicon right now (Mixpanel with automatically make empty lexicon entries for new events, but only once the event has been reported to mixpanel for the first time)

Not sure what the action item is here; just wanted to give a heads up for those that are invested in IDB issues

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDB_UNRESPONSIVE_BANNER: {
description:
"Reported when the error banner containing the message 'We're having trouble connecting to your browser's local database, please restart " +
"your browser' for IndexedDB (IDB) errors is shown in the Extension Console",
tags: [LexiconTags.EXTENSION_CONSOLE],
},
};

/**
Expand Down Expand Up @@ -245,7 +292,7 @@ export function transformLexiconMapToRequestSchema(
"com.mixpanel": {
tags: entry.tags,
displayName: getDisplayName(eventKey),
hidden: false,
hidden: entry.hidden ?? false,
dropped: false,
},
},
Expand Down
Loading