Skip to content

Commit

Permalink
front: Add plan code to actions metrics (#2509)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Nov 13, 2023
1 parent 1389379 commit caa4318
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion front/lib/actions/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { statsDClient } from "@app/logger/withlogging";
// Record an event and a log for the action error.
const logActionError = (
loggerArgs: {
workspace: { sId: string; name: string };
workspace: { sId: string; name: string; plan_code: string | null };
action: string;
app: DustAppType;
},
Expand Down Expand Up @@ -63,6 +63,7 @@ export async function runActionStreamed(
workspace: {
sId: owner.sId,
name: owner.name,
plan_code: auth.plan()?.code || null,
},
action: actionName,
app: action.app,
Expand All @@ -74,6 +75,7 @@ export async function runActionStreamed(
`action:${actionName}`,
`workspace:${owner.sId}`,
`workspace_name:${owner.name}`,
`workspace_plan_code:${auth.plan()?.code || null}`,
];

statsDClient.increment("use_actions.count", 1, tags);
Expand Down Expand Up @@ -146,6 +148,7 @@ export async function runAction(
workspace: {
sId: owner.sId,
name: owner.name,
plan_code: auth.plan()?.code || null,
},
action: actionName,
app: action.app,
Expand All @@ -157,6 +160,7 @@ export async function runAction(
`action:${actionName}`,
`workspace:${owner.sId}`,
`workspace_name:${owner.name}`,
`workspace_plan_code:${auth.plan()?.code || null}`,
];

statsDClient.increment("use_actions.count", 1, tags);
Expand Down

0 comments on commit caa4318

Please sign in to comment.