Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nathanjcochran
Copy link
Collaborator

@nathanjcochran nathanjcochran commented Oct 24, 2025

This PR adds support for tracking analytics events.

  • Events are not sent if analytics is disabled via the analytics config option, the --analytics flag, the TIGER_ANALYTICS env var, or any of the following env vars: DO_NOT_TRACK, NO_TELEMETRY, DISABLE_TELEMETRY.
  • Events are not sent if the user is not authenticated.
  • We track one event per command execution or MCP tool call.
  • Events for CLI commands are named: Run <command>. For example, Run tiger service create.
  • Events for MCP tools are named: Call <tool_name> tool. For example, Call service_create tool.
  • CLI events include any args that were passed (there are currently no commands that pass sensitive information in args)
  • CLI events include any flags that were set, but explicitly exclude sensitive flags like --password, --new-password, etc.
  • MCP events include tool arguments as properties, but explicitly exclude sensitive properties like password, query, etc.
  • All events include a success property. If false, the event will also include an error property containing the error message.
  • We do not currently track the state of the config or any env vars that were set. We could do this as a follow-up if we want, but I wanted to avoid tracking too much unnecessary information, at least to start with. Tracking just the explicit flags/arguments seems like a good place to start.

Closes AGE-207

Related PRs:

@nathanjcochran nathanjcochran self-assigned this Oct 24, 2025
Comment on lines -42 to -46
func NewTigerClient(apiKey string) (*ClientWithResponses, error) {
cfg, err := config.Load()
if err != nil {
return nil, fmt.Errorf("failed to load config: %w", err)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We were often loading the config multiple times, because this function loads it internally. I decided to pass it in as an argument instead, since it's usually already been loaded by the caller.

@nathanjcochran nathanjcochran marked this pull request as ready for review October 24, 2025 21:33
@nathanjcochran nathanjcochran requested a review from cevian October 27, 2025 14:33
@cevian
Copy link
Contributor

cevian commented Oct 28, 2025

We also need to check the following env variables:

  • DO_NOT_TRACK
  • NO_TELEMETRY
  • DISABLE_TELEMETRY

@nathanjcochran
Copy link
Collaborator Author

We also need to check the following env variables:

DO_NOT_TRACK
NO_TELEMETRY
DISABLE_TELEMETRY

Done here: e9494bc

@nathanjcochran nathanjcochran merged commit 58fa1b3 into main Nov 4, 2025
2 checks passed
@nathanjcochran nathanjcochran deleted the nathan/analytics branch November 4, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants