Commit Graph

2 Commits

Author SHA1 Message Date
shreyas-goenka f3bf33da27
Add `cmd-exec-id` to user agent ()
## 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
Pieter Noordhuis 3851b59bbd
Move code for including command name in user agent () 2023-02-15 10:33:35 +01:00