Skip to content

Feature: Add global --verbose flag for API debugging #79

Description

@Vaishnav88sk

Is your feature request related to a problem? Please describe.

When troubleshooting authentication errors, connectivity issues, or unexpected command results, it's often difficult to see exactly which API endpoints the CLI is calling without using an external proxy or packet sniffer. Users hit opaque errors and struggle to identify if they are hitting the wrong regional endpoint.

Describe the solution you'd like

I propose adding a global -v/--verbose flag to the CLI (src/main.rs). When passed, it will enable verbose debugging of HTTP requests made by reqwest::Client inside src/api_client.rs. Specifically, it will eprintln! the HTTP method and full URL of every API request before it is dispatched, writing securely to stderr so it does not interfere with standard stdout parsing.

Describe alternatives you've considered

Using RUST_LOG=trace is an alternative, but it exposes too much internal library noise (like Tokio and Hyper internals) which overwhelms the user. A dedicated verbose flag is standard and much more user-friendly.

Additional context & Real-world Use Case

Authentication Troubleshooting: A user configuring Coralogix CLI behind a strict corporate proxy or investigating a 403 Forbidden API Key error is confused. By running cx metrics query 'up' -v, they immediately see the exact GET https://ng-api-grpc.eu2.coralogix.com/... URL being requested, realizing their region configuration is pointing to eu2 instead of us1. This saves hours of support back-and-forth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions