-
Notifications
You must be signed in to change notification settings - Fork 1
Add analytics tracking #87
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
Conversation
| func NewTigerClient(apiKey string) (*ClientWithResponses, error) { | ||
| cfg, err := config.Load() | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to load config: %w", err) | ||
| } |
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.
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.
cd8286d to
c0636b7
Compare
c0636b7 to
4c56145
Compare
|
We also need to check the following env variables:
|
Done here: e9494bc |
0ffa8c1 to
f7c29de
Compare
This PR adds support for tracking analytics events.
analyticsconfig option, the--analyticsflag, theTIGER_ANALYTICSenv var, or any of the following env vars:DO_NOT_TRACK,NO_TELEMETRY,DISABLE_TELEMETRY.Run <command>. For example,Run tiger service create.Call <tool_name> tool. For example,Call service_create tool.--password,--new-password, etc.password,query, etc.successproperty. Iffalse, the event will also include anerrorproperty containing the error message.Closes AGE-207
Related PRs: