-
Notifications
You must be signed in to change notification settings - Fork 36
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
Collect cluster information for telemetry. #543
Conversation
Codecov Report
@@ Coverage Diff @@
## master #543 +/- ##
==========================================
- Coverage 68.28% 68.22% -0.07%
==========================================
Files 96 96
Lines 5774 5785 +11
Branches 1002 1018 +16
==========================================
+ Hits 3943 3947 +4
- Misses 1831 1838 +7
Continue to review full report at Codecov.
|
src/tkn.ts
Outdated
@@ -138,27 +139,32 @@ export class TknImpl implements Tkn { | |||
const kubectlCheck = RegExp('kubectl:\\s*command not found'); | |||
if (kubectlCheck.test(getStderrString(result.error))) { | |||
const tknMessage = 'Please install kubectl.'; | |||
telemetryLogCommand('kubeclt_not_found', tknMessage); |
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.
The name of telemetryLogCommand
function is worry me, as you are not reporting of execution of command. Maybe we need another function to report such info.
src/telemetry.ts
Outdated
return telemetryProps; | ||
} | ||
|
||
export function telemetryClusterInfo(commandId: string, message?: string): 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.
I was thinking to have common function for sending telemetry data.
I don't think that having separate function for every possible telemetry data is good.
Also it is not clear what commandId
means in context of this function.
Fix: #526