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

Analytics: track integration environment #1479

Merged
merged 1 commit into from Oct 20, 2020
Merged

Conversation

JackuB
Copy link
Contributor

@JackuB JackuB commented Oct 16, 2020

This will help us capture debug/analytics data if CLI is running e.g. in a specific IDE version.

@JackuB JackuB requested review from a team as code owners October 16, 2020 14:48
@ghost ghost requested review from admons and aviadhahami October 16, 2020 14:48
Copy link
Contributor

@maxjeffos maxjeffos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than needing to modify test/analytics.test.ts to add
integrationEnvironment and integrationEnvironmentVersion to a few spots to fix the tests.

@@ -162,3 +168,41 @@ describe('analytics-sources - getIntegrationVersion', () => {
).toBe('1.2.3-Crystal');
});
});

describe('analytics-sources - getIntegrationEnvironment', () => {
it('integration environment is empty by default', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick and I'm by no means perfect at this myself (naming is hard), but I understand that one should try to make the describe + the it sort of flow like a sentence. So you could make this

it('returns empty environment by default', () => {

Then you'd have getIntegrationEnvironment returns empty environment by default.

Similarly for the others.

This will help us capture if CLI is running e.g. in a specific IDE version
@JackuB
Copy link
Contributor Author

JackuB commented Oct 19, 2020

Rebased, simplified the function to always empty empty string instead of undefined, just to be consistent with the integrationName as well.

@JackuB JackuB merged commit 1bbebd1 into master Oct 20, 2020
@JackuB JackuB deleted the feat/track-integration-env branch October 20, 2020 14:34
@snyksec
Copy link

snyksec commented Oct 20, 2020

🎉 This PR is included in version 1.419.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
Projects
None yet
3 participants