Open lucacome opened 2 months ago
https://github.com/nginxinc/nginx-plus-go-client/releases/tag/v2.0.0 now supports passing a context to the API calls, so we need to pass a context to c.nginxClient.GetStats()
c.nginxClient.GetStats()
https://github.com/nginxinc/nginx-prometheus-exporter/blob/262228e3d7e89c88433a627b0c5df779fa08b876/collector/nginx_plus.go#L621-L625
Figure out if we want to pass a context or a timeout. We already have a timeout that users can set for scraping metrics https://github.com/nginxinc/nginx-prometheus-exporter/blob/262228e3d7e89c88433a627b0c5df779fa08b876/exporter.go#L95 it probably makes sense to use the same value.
I think that makes sense to use as the same timeout.
https://github.com/nginxinc/nginx-plus-go-client/releases/tag/v2.0.0 now supports passing a context to the API calls, so we need to pass a context to
c.nginxClient.GetStats()
https://github.com/nginxinc/nginx-prometheus-exporter/blob/262228e3d7e89c88433a627b0c5df779fa08b876/collector/nginx_plus.go#L621-L625
Figure out if we want to pass a context or a timeout. We already have a timeout that users can set for scraping metrics https://github.com/nginxinc/nginx-prometheus-exporter/blob/262228e3d7e89c88433a627b0c5df779fa08b876/exporter.go#L95 it probably makes sense to use the same value.