-
Notifications
You must be signed in to change notification settings - Fork 188
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
chore: improve types and documentation for telemetry #6176
Changes from 3 commits
ec7a80e
d1f6d78
869592e
1d0f293
63b9b01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1510,9 +1510,6 @@ export const connect = ( | |
'Connection Attempt', | ||
{ | ||
is_favorite: connectionInfo.savedConnectionType === 'favorite', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drive by, these attributes aren't meaningful anymore with multiple connections There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are they, though? We still have the concept of a favourite that we haven't removed. Can't ever remove it if we don't keep stats on whether it gets used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggested removing them because the significance of is_favorite is not the same as it was before. Earlier is_favorite was the only way to differentiate wether a connection is saved or recent but now all the connections are saved and is_favorite is more UI related, allowing us to group connections together. So for the telemetry point that it used to represent earlier, it does not make sense to keep it anymore. However if we would like to track connections being marked as favorite maybe we can introduce a different attribute? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh ok, so is favorite is still a thing, then i will keep it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and is recent doesn't make sense because everything saved now right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think is_recent can be dropped, yes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok re-added is_favorite then! thanks! |
||
is_recent: | ||
!!connectionInfo.lastUsed && | ||
connectionInfo.savedConnectionType !== 'favorite', | ||
is_new: isNewConnection(getState(), connectionInfo.id), | ||
}, | ||
connectionInfo | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -489,7 +489,7 @@ class CrudStoreImpl | |
* to update if the labels change at some point. | ||
*/ | ||
modeForTelemetry() { | ||
return this.state.view.toLowerCase(); | ||
return this.state.view.toLowerCase() as 'list' | 'json' | 'table'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a better way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { createIpcTrack, createIpcSendTrack } from './ipc-track'; | ||
export type { TelemetryServiceOptions } from './generic-track'; | ||
export type { TrackFunction } from './types'; | ||
export type { TrackFunction, IdentifyTraits } from './types'; |
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'm not understanding what these
as const
bits are doing and why they would be necessary. Why not give the whole object a type?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.
as in move
as const
at the end? They are there sostage_action
is not considered a stringThere 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.
ah wait, you are right this should not be needed here though. I'll take another look and remove them where is redundant