fix: align proposed telemetry dims

Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Nicky LeachandPaperclip committed 2026-07-14 16:39:13 +00:00
1 parent 2f3a61a116
commit 2c3d3fb652
5 files changed
+202 -79

No files matched your search

+18 -18
View File
@@ -58,32 +58,32 @@ describe("TelemetryClient runtime event gate", () => {
const { client, stateFactory } = makeClient();
trackSkillCreated(client, {
skill_id: "11111111-1111-4111-8111-111111111111",
creation_source: "blank",
sharing_scope: "company",
category_count: 1,
file_count: 2,
skillId: "11111111-1111-4111-8111-111111111111",
creationSource: "blank",
sharingScope: "company",
categoryCount: 1,
fileCount: 2,
});
trackSkillVersionSaved(client, {
skill_id: "11111111-1111-4111-8111-111111111111",
revision_number: 2,
file_type: "skill",
skillId: "11111111-1111-4111-8111-111111111111",
revisionNumber: 2,
fileType: "skill",
});
trackSkillTestRun(client, {
skill_id: "11111111-1111-4111-8111-111111111111",
skillId: "11111111-1111-4111-8111-111111111111",
status: "queued",
run_source: "run",
ad_hoc: true,
template_used: false,
runSource: "run",
adHoc: true,
templateUsed: false,
});
trackSkillForked(client, {
skill_id: "22222222-2222-4222-8222-222222222222",
fork_from_skill_id: "11111111-1111-4111-8111-111111111111",
source_type: "catalog",
sharing_scope: "private",
reassign_agent_count: 0,
skillId: "22222222-2222-4222-8222-222222222222",
forkFromSkillId: "11111111-1111-4111-8111-111111111111",
sourceType: "catalog",
sharingScope: "private",
reassignAgentCount: 0,
});
trackSkillShareLinkCopied(client, { sharing_scope: "public_link" });
trackSkillShareLinkCopied(client, { sharingScope: "public_link" });
await client.flush();
+37 -37
View File
@@ -95,22 +95,22 @@ export function trackSkillImported(
export function trackSkillCreated(
client: TelemetryClient,
dims: {
skill_id: string;
creation_source: RawDimension<"blank" | "fork" | "project_scan">;
sharing_scope: RawDimension<"private" | "company" | "public_link">;
category_count: number;
file_count: number;
skillId: string;
creationSource: RawDimension<"blank" | "fork" | "project_scan">;
sharingScope: RawDimension<"private" | "company" | "public_link">;
categoryCount: number;
fileCount: number;
},
): void {
client.track(
// @ts-expect-error -- proposed-telemetry(https://github.com/paperclipai/paperclip/issues/2411): measure successful Skill Studio skill creation funnel
"skill.created",
{
skill_id: dims.skill_id,
creation_source: dims.creation_source,
sharing_scope: dims.sharing_scope,
category_count: dims.category_count,
file_count: dims.file_count,
skill_id: dims.skillId,
creation_source: asEventDimension(dims.creationSource),
sharing_scope: asEventDimension(dims.sharingScope),
category_count: dims.categoryCount,
file_count: dims.fileCount,
},
);
}
@@ -118,18 +118,18 @@ export function trackSkillCreated(
export function trackSkillVersionSaved(
client: TelemetryClient,
dims: {
skill_id: string;
revision_number: number;
file_type: RawDimension<"skill" | "markdown" | "reference" | "script" | "asset" | "other">;
skillId: string;
revisionNumber: number;
fileType: RawDimension<"skill" | "markdown" | "reference" | "script" | "asset" | "other">;
},
): void {
client.track(
// @ts-expect-error -- proposed-telemetry(https://github.com/paperclipai/paperclip/issues/2411): measure Skill Studio editor save and version creation usage
"skill.version_saved",
{
skill_id: dims.skill_id,
revision_number: dims.revision_number,
file_type: dims.file_type,
skill_id: dims.skillId,
revision_number: dims.revisionNumber,
file_type: asEventDimension(dims.fileType),
},
);
}
@@ -137,22 +137,22 @@ export function trackSkillVersionSaved(
export function trackSkillTestRun(
client: TelemetryClient,
dims: {
skill_id: string;
skillId: string;
status: RawDimension<"queued" | "running" | "succeeded" | "failed" | "cancelled">;
run_source: RawDimension<"run" | "rerun">;
ad_hoc: boolean;
template_used: boolean;
runSource: RawDimension<"run" | "rerun">;
adHoc: boolean;
templateUsed: boolean;
},
): void {
client.track(
// @ts-expect-error -- proposed-telemetry(https://github.com/paperclipai/paperclip/issues/2411): measure Skill Studio validation loop usage
"skill.test_run",
{
skill_id: dims.skill_id,
status: dims.status,
run_source: dims.run_source,
ad_hoc: dims.ad_hoc,
template_used: dims.template_used,
skill_id: dims.skillId,
status: asEventDimension(dims.status),
run_source: asEventDimension(dims.runSource),
ad_hoc: dims.adHoc,
template_used: dims.templateUsed,
},
);
}
@@ -160,22 +160,22 @@ export function trackSkillTestRun(
export function trackSkillForked(
client: TelemetryClient,
dims: {
skill_id: string;
fork_from_skill_id: string;
source_type: RawDimension<"local_path" | "github" | "url" | "catalog" | "skills_sh">;
sharing_scope: RawDimension<"private" | "company" | "public_link">;
reassign_agent_count: number;
skillId: string;
forkFromSkillId: string;
sourceType: RawDimension<"local_path" | "github" | "url" | "catalog" | "skills_sh">;
sharingScope: RawDimension<"private" | "company" | "public_link">;
reassignAgentCount: number;
},
): void {
client.track(
// @ts-expect-error -- proposed-telemetry(https://github.com/paperclipai/paperclip/issues/2411): measure Skill Studio fork completion and reassignment demand
"skill.forked",
{
skill_id: dims.skill_id,
fork_from_skill_id: dims.fork_from_skill_id,
source_type: dims.source_type,
sharing_scope: dims.sharing_scope,
reassign_agent_count: dims.reassign_agent_count,
skill_id: dims.skillId,
fork_from_skill_id: dims.forkFromSkillId,
source_type: asEventDimension(dims.sourceType),
sharing_scope: asEventDimension(dims.sharingScope),
reassign_agent_count: dims.reassignAgentCount,
},
);
}
@@ -183,14 +183,14 @@ export function trackSkillForked(
export function trackSkillShareLinkCopied(
client: TelemetryClient,
dims: {
sharing_scope: RawDimension<"private" | "company" | "public_link">;
sharingScope: RawDimension<"private" | "company" | "public_link">;
},
): void {
client.track(
// @ts-expect-error -- proposed-telemetry(https://github.com/paperclipai/paperclip/issues/2411): exercise triage of low-signal share-link copy proposal
"skill.share_link",
{
sharing_scope: dims.sharing_scope,
sharing_scope: asEventDimension(dims.sharingScope),
},
);
}