prometheus / common

Go libraries shared across Prometheus components and libraries.
Apache License 2.0
259 stars 306 forks source link

Fix HTTPClientConfig JSON marshalling #651

Closed pracucci closed 3 weeks ago

pracucci commented 3 weeks ago

I think https://github.com/prometheus/common/pull/416 introduced an issue. json marshalling doesn't support inline and so when HTTPClientConfig gets marshalled to JSON it gets marshalled to something like this:

{"http_headers":{"Headers":{"Header-Name":{}}}

while I would expect something like this:

{"http_headers":{"Header-Name":{}}

This PR should fix it.

roidelapluie commented 3 weeks ago

Thanks!