Devx 73 http trace headers#31
Open
asingh9-godaddy wants to merge 3 commits intogodaddy:mainfrom
Open
Conversation
Introduce cliTraceHeaders() with godaddy-cli/<packageVersion> and a fresh UUID v7 request id. Wire into GraphQL getRequestHeaders, REST ensureRequiredRequestHeaders, OAuth token exchange, and webhook event-types fetch. Document why presigned S3 PUT keeps only signed headers.
Move CLI_USER_AGENT and cliTraceHeaders to src/shared/cli-trace.ts so core, services, and webhook code depend on a neutral layer instead of core importing services. Use lowercase `user-agent` and `x-request-id` keys everywhere to match ensureRequiredRequestHeaders in core/api.ts. Relocate unit tests alongside the shared module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What-
Adds a shared User-Agent (godaddy-cli/ from the package manifest) and a per-request x-request-id (UUID v7) on outbound calls: REST (apiRequestEffect), GraphQL (getRequestHeaders), OAuth token exchange, and webhook event-types. Centralized in src/shared/cli-trace.ts with lowercase header keys to match existing REST behavior. Presigned S3 PUTs are unchanged (signed headers only).
Why-
Improves server-side traceability in logs (e.g. Kibana) by consistently identifying the CLI and correlating individual requests.
How to verify-
pnpm exec tsc --noEmit
pnpm run build
pnpm vitest run
Changelog-
minor, see -.changeset/cli-http-trace-headers.md