Skip to content
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

[CLI] Measure AsyncAPI DX metrics #1161

Closed
Tracked by #5
Amzani opened this issue Feb 15, 2024 · 3 comments · Fixed by #1304
Closed
Tracked by #5

[CLI] Measure AsyncAPI DX metrics #1161

Amzani opened this issue Feb 15, 2024 · 3 comments · Fixed by #1304
Labels
enhancement New feature or request released

Comments

@Amzani
Copy link
Collaborator

Amzani commented Feb 15, 2024

Related to Amzani/asyncapi-metrics-dashboard#5

After merging #859, we need to track unique AsyncAPI Files and users, see Amzani/asyncapi-metrics-dashboard#2

Definition of done

  • We expected to use the .asyncapi-analytics file to store user IDs (UUID v4 is perfect)
  • We use SHA1 (FileName) for identifying AsyncAPI File Names
  • Analytics documentation is updated to inform users about what we collect
  • We don't impact CLI performance

Example of hardcoded values I've used for testing purpose in base.ts

async finally(error: Error | undefined): Promise<any> {
    await super.finally(error);
    this.metricsMetadata['success'] = error === undefined;
    this.metricsMetadata['user'] = 'c320a14b-37f7-4a44-bdf0-9bf3ec22b652';
    this.metricsMetadata['source'] = this.generateSHA1(this.specFile?.getSource() || '');
    console.log('getFileURL', this.specFile?.getSource(), 'hash', this.generateSHA1(this.specFile?.getSource() || ''));
    await this.recordActionFinished(this.id as string, this.metricsMetadata, this.specFile?.text());
  }

@Amzani Amzani added the enhancement New feature or request label Feb 15, 2024
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@peter-rr
Copy link
Member

peter-rr commented Mar 8, 2024

/progress 100
Tracking for unique AsyncAPI files and users already implemented.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants