feat: add tracking for secrets management events #1491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, we don't track when users interact with the secrets management UI, which limits our ability to understand how users are managing secrets and whether they're accessing this functionality from the check editor sidepanel or the config page. This makes it difficult to measure feature adoption and understand user workflows.
Solution
This PR adds comprehensive tracking for secrets management interactions. When users create, edit, or delete secrets, we now track these actions with high-level context only:
check_editor_sidepanel_feature_tabsorconfig_page_secrets_tab) to distinguish where the UI is being accessedempty_stateorheader_action)Note: We intentionally do not track secret names or any other secret details to maintain user privacy and avoid tracking sensitive information.
The implementation:
secretsManagementEvents.tswith 6 tracking eventsSecretsManagementSourcetype to avoid repetition across the codebaseSecretsManagementUIto track button clicks and successful operationsSecretEditModalto track successful create/update operationsSecretsPanelandSecretsManagementTab) to pass the appropriate source contextsourceprop