exoscale / egoscale

exoscale golang bindings
https://pkg.go.dev/github.com/exoscale/egoscale/v3
Apache License 2.0
31 stars 15 forks source link

v3 trace: print operation IDs #622

Closed sauterp closed 3 months ago

sauterp commented 3 months ago

Description

To identify which API operations a given call executes we print the operation ID in addition to the request dump when tracing is enabled. For a CLI command the output will look like this:

❯ EXOSCALE_TRACE=1 exo compute -z ch-gva-2 bs list
>>> Operation: list-zones
GET /v2/zone HTTP/1.1
Host: api-ch-gva-2.exoscale.com

...

>>> Operation: list-block-storage-volumes
GET /v2/block-storage HTTP/1.1
Host: api-ch-gva-2.exoscale.com

Checklist

(For exoscale contributors)