-
Notifications
You must be signed in to change notification settings - Fork 60
Implement telemetry tracking for AI features #1010
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
base: feature-ai-design-mode
Are you sure you want to change the base?
Implement telemetry tracking for AI features #1010
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
459a94b to
eb66b00
Compare
workspaces/ballerina/ballerina-extension/src/features/telemetry/events.ts
Outdated
Show resolved
Hide resolved
workspaces/ballerina/ballerina-extension/src/features/telemetry/telemetry-event-emitter.ts
Outdated
Show resolved
Hide resolved
workspaces/ballerina/ballerina-extension/src/features/telemetry/components.ts
Show resolved
Hide resolved
| let cachedBiIntelId: string | undefined = undefined; | ||
| let isInitializing = false; | ||
|
|
||
| export function initializeTelemetryContext(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both getLoginMethod() and getBiIntelId() are async functions. If we use await every time, the code will wait and slow down. Instead, we fetch and cache these values once during extension startup. Then we can access them instantly without waiting.
Additionally, this is a base pattern that allows us to add more async properties in the future without needing to await them each time.
5b5714c to
47c672b
Compare
47c672b to
1e5e7af
Compare
Add telemetry tracking for AI features with user identification and event-driven architecture.
Changes
Resolves: wso2/product-ballerina-integrator#1627