All prometheus_client example uses push_to_gateway function to push metrics to the prometheus gateway.
https://github.com/prometheus/client_python#exporting-to-a-pushgateway
The push_to_gateway method uses PUT as http method: https://github.com/prometheus/client_python/blob/v0.14.1/prometheus_client/exposition.py#L448
meanwhile pushadd_to_gateway uses POST as HTTP method:
https://github.com/prometheus/client_python/blob/v0.14.1/prometheus_client/exposition.py#L479
would be nice to add support to PUT method as well so that developers can switch gateways with no code change.
All prometheus_client example uses push_to_gateway function to push metrics to the prometheus gateway.
https://github.com/prometheus/client_python#exporting-to-a-pushgateway
The
push_to_gatewaymethod uses PUT as http method: https://github.com/prometheus/client_python/blob/v0.14.1/prometheus_client/exposition.py#L448meanwhile
pushadd_to_gatewayuses POST as HTTP method:https://github.com/prometheus/client_python/blob/v0.14.1/prometheus_client/exposition.py#L479
would be nice to add support to PUT method as well so that developers can switch gateways with no code change.