Skip to content

Commit

Permalink
feat: App metrics page for composeWebhook apps (#18712)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiina303 committed Nov 17, 2023
1 parent f2da9dc commit 0137b9d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/scenes/apps/AppMetricsScene.tsx
Expand Up @@ -80,6 +80,11 @@ export function AppMetrics(): JSX.Element {
label: <>onEvent metrics</>,
content: <MetricsTab tab={AppMetricsTab.OnEvent} />,
},
showTab(AppMetricsTab.ComposeWebhook) && {
key: AppMetricsTab.ComposeWebhook,
label: <>composeWebhook metrics</>,
content: <MetricsTab tab={AppMetricsTab.ComposeWebhook} />,
},
showTab(AppMetricsTab.ExportEvents) && {
key: AppMetricsTab.ExportEvents,
label: <>exportEvents metrics</>,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/scenes/apps/appMetricsSceneLogic.ts
Expand Up @@ -28,6 +28,7 @@ export enum AppMetricsTab {
Logs = 'logs',
ProcessEvent = 'processEvent',
OnEvent = 'onEvent',
ComposeWebhook = 'composeWebhook',
ExportEvents = 'exportEvents',
ScheduledTask = 'scheduledTask',
HistoricalExports = 'historical_exports',
Expand All @@ -36,6 +37,7 @@ export enum AppMetricsTab {
export const TabsWithMetrics = [
AppMetricsTab.ProcessEvent,
AppMetricsTab.OnEvent,
AppMetricsTab.ComposeWebhook,
AppMetricsTab.ExportEvents,
AppMetricsTab.ScheduledTask,
AppMetricsTab.HistoricalExports,
Expand Down Expand Up @@ -95,6 +97,7 @@ const DEFAULT_DATE_FROM = '-30d'
const INITIAL_TABS: Array<AppMetricsTab> = [
AppMetricsTab.ProcessEvent,
AppMetricsTab.OnEvent,
AppMetricsTab.ComposeWebhook,
AppMetricsTab.ExportEvents,
AppMetricsTab.ScheduledTask,
]
Expand Down
20 changes: 20 additions & 0 deletions frontend/src/scenes/apps/constants.tsx
Expand Up @@ -47,6 +47,26 @@ export const DescriptionColumns: Record<string, Description> = {
</>
),
},
[AppMetricsTab.ComposeWebhook]: {
successes: 'Events processed',
successes_tooltip: (
<>
These events were successfully processed by the <i>composeWebhook</i> app method on the first try.
</>
),
successes_on_retry: 'Events processed on retry',
successes_on_retry_tooltip: (
<>
These events were successfully processed by the <i>composeWebhook</i> app method after being retried.
</>
),
failures: 'Failed events',
failures_tooltip: (
<>
These events had errors when being processed by the <i>composeWebhook</i> app method.
</>
),
},
[AppMetricsTab.ExportEvents]: {
successes: 'Events delivered',
successes_tooltip: (
Expand Down

0 comments on commit 0137b9d

Please sign in to comment.