Skip to content

Conversation

@yasithrashan
Copy link

@yasithrashan yasithrashan commented Nov 26, 2025

Add telemetry tracking for AI features with user identification and event-driven architecture.

Changes

  • User Identification: Track unique user IDs for BI Intel authentication method
  • AI Telemetry Events: Track AI query submissions, code generation, and revert actions

Resolves: wso2/product-ballerina-integrator#1627

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2025

CLA assistant check
All committers have signed the CLA.

@yasithrashan yasithrashan force-pushed the feature-ai-design-mode branch from 459a94b to eb66b00 Compare November 27, 2025 14:30
let cachedBiIntelId: string | undefined = undefined;
let isInitializing = false;

export function initializeTelemetryContext(): void {
Copy link
Contributor

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?

Copy link
Author

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.

@yasithrashan yasithrashan force-pushed the feature-ai-design-mode branch 4 times, most recently from 5b5714c to 47c672b Compare December 1, 2025 04:41
@yasithrashan yasithrashan force-pushed the feature-ai-design-mode branch from 47c672b to 1e5e7af Compare December 1, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants