Add appName to TelemetryProperties (#4111)

This commit is contained in:
Chris Estreich 2025-05-29 10:09:40 -07:00 committed by GitHub
parent 3139971f4a
commit 170fde848a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 1 deletions

View file

@ -181,6 +181,7 @@ describe("RooCodeTelemetryClient", () => {
const client = new RooCodeTelemetryClient(mockAuthService)
const providerProperties = {
appName: "roo-code",
appVersion: "1.0.0",
vscodeVersion: "1.60.0",
platform: "darwin",

View file

@ -181,6 +181,7 @@ describe("TelemetryClient", () => {
const client = new TelemetryClient(mockAuthService)
const providerProperties = {
appName: "roo-code",
appVersion: "1.0.0",
vscodeVersion: "1.60.0",
platform: "darwin",

View file

@ -52,6 +52,7 @@ export enum TelemetryEventName {
*/
export const appPropertiesSchema = z.object({
appName: z.string(),
appVersion: z.string(),
vscodeVersion: z.string(),
platform: z.string(),

View file

@ -1633,8 +1633,11 @@ export class ClineProvider
const { mode, apiConfiguration, language } = await this.getState()
const task = this.getCurrentCline()
const packageJSON = this.context.extension?.packageJSON
return {
appVersion: this.context.extension?.packageJSON?.version,
appName: packageJSON?.name ?? Package.name,
appVersion: packageJSON?.version ?? Package.version,
vscodeVersion: vscode.version,
platform: process.platform,
editorName: vscode.env.appName,

View file

@ -1,4 +1,5 @@
import posthog from "posthog-js"
import { TelemetrySetting } from "@roo/TelemetrySetting"
class TelemetryClient {
@ -28,6 +29,7 @@ class TelemetryClient {
if (!TelemetryClient.instance) {
TelemetryClient.instance = new TelemetryClient()
}
return TelemetryClient.instance
}