-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently we don't offer a way to expose the details of the API requests the CLI or other SDK consumers to users, making troubleshooting difficult. With the new `middleware` feature available in Progenitor, we can now inject our own logger using the `reqwest-tracing` crate. This gives us output like: ./target/debug/oxide --debug disk list --project will | jq . { "timestamp": "2025-02-26T17:29:23.354297Z", "level": "DEBUG", "fields": { "message": "close", "time.busy": "16.7ms", "time.idle": "365ms" }, "target": "oxide::tracing", "span": { "host": "oxide.sys.r3.oxide-preview.com", "http.request.method": "GET", "http.response.content_length": 998, "http.response.status_code": 200, "oxide.request_id": "c5e7d65e-bcb2-4ade-a817-6f13b681b19b", "url": "https://oxide.sys.r3.oxide-preview.com/v1/disks?project=will", "name": "Oxide API Request" }, "spans": [] } We will also log the first KiB of the request body, if present. This should be enough to capture the details human-readable requests, e.g. an OxQL query, but avoid too much noise from something like a disk import. The `--debug` flag will enable debug logs for both the CLI and any dependencies, such as `hyper`. To view only CLI logs, set `RUST_LOG=oxide=debug`. Closes #1014.
- Loading branch information
1 parent
077ec52
commit c6a1fd2
Showing
12 changed files
with
392 additions
and
88 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.