PureStorage-OpenConnect / pure-fa-openmetrics-exporter

Pure Storage OpenMetrics exporter for FlashArray
Apache License 2.0
18 stars 26 forks source link

Extended HTTP User-Agent #112

Closed genegr closed 3 months ago

genegr commented 3 months ago

Fixes issue #102 Extended HTTP User-Agent header to include the original caller.

Not immediate to automate testing. Fastest option is to run the container with debug mode enabled, use curl to query the exporter and check the output of the debug log. The output should show something like the following, where the original User-Agent curl/7.81.0 is included in the comment part of the User-Agent header.

`


POST  /api/2.30/login  HTTP/1.1
HOST   : 10.225.112.90
HEADERS:
    Accept: application/json
    Api-Token: 77f6c791-e5d3-4381-841e-7ddde4e75c45
    Content-Type: application/json
    User-Agent: Pure_FA_OpenMetrics_exporter/1.0 (curl/7.81.0)
    X-Auth-Token:
BODY   :
***** NO CONTENT *****
------------------------------------------------------------------------------`

Also adding a fake User-Agent header to the curl command line should show that in the log headers.