databricks-cli/cmd/root
shreyas-goenka f3bf33da27
Add `cmd-exec-id` to user agent (#1808)
## Changes

This PR adds the `cmd-exec-id` field to the user agent. This allows us
to correlate multiple HTTP requests made from the CLI.

### Why Not Use HTTP traceparent?
We considered using the traceparent header in HTTP as an alternative,
but it's not a good fit for our use case. Here's why:
1. Purpose of traceparent: It's designed to trace a single HTTP request
across a distributed system as it moves through subsystems and proxies.
2. Our requirement: We need to trace multiple HTTP requests made during
a single command execution in the CLI.

For more details about how traceparent itself works and how it's used in
the Go SDK, see
https://github.com/databricks/databricks-sdk-go/pull/914.

## Tests
Unit test
2024-11-01 14:08:09 +00:00
..
args.go Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
auth.go Improve token refresh flow (#1434) 2024-05-16 10:22:09 +00:00
auth_options.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_options_test.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_test.go Upgrade Go SDK to 0.44.0 (#1679) 2024-08-15 13:23:07 +00:00
bundle.go Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
bundle_test.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
io.go Use Go SDK Iterators when listing resources with the CLI (#1202) 2024-02-21 14:16:36 +00:00
logger.go Always log with text format by default (#1096) 2024-01-03 09:39:33 +00:00
progress_logger.go Fix streaming of stdout, stdin, stderr in cobra test runner (#1742) 2024-09-02 13:43:17 +00:00
progress_logger_test.go Remove dependency on global state for the root command (#606) 2023-07-26 11:17:09 +00:00
root.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
silent_err.go Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
user_agent.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
user_agent_command.go Move code for including command name in user agent (#203) 2023-02-15 10:33:35 +01:00
user_agent_command_exec_id.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_command_exec_id_test.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_command_test.go Add `cmd-exec-id` to user agent (#1808) 2024-11-01 14:08:09 +00:00
user_agent_upstream.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
user_agent_upstream_test.go Let caller set BRICKS_UPSTREAM for user agent (#196) 2023-02-03 17:05:58 +01:00