@@ -21,19 +21,19 @@ def influx_udp_thread(host, port, period=15.0, registry=ppc.PUSH_REGISTRY):
2121 return _sync_wrap (client )
2222
2323
24- def influx_http_async (url , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
24+ def influx_http_async (url , verb = "POST" , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
2525 client = ppc .AsyncBatchClient (
2626 format = ppc .InfluxFormat (registry = registry ),
27- transport = ppc .AioHttpTransport (url ),
27+ transport = ppc .AioHttpTransport (url , verb ),
2828 period = period ,
2929 )
3030 return _async_wrap (client )
3131
3232
33- def influx_http_thread (url , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
33+ def influx_http_thread (url , verb = "POST" , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
3434 client = ppc .ThreadBatchClient (
3535 format = ppc .InfluxFormat (registry = registry ),
36- transport = ppc .SyncHttpTransport (url ),
36+ transport = ppc .SyncHttpTransport (url , verb ),
3737 period = period ,
3838 )
3939 return _sync_wrap (client )
@@ -89,6 +89,24 @@ def statsd_udp_stream(host, port, registry=ppc.PUSH_REGISTRY):
8989 return _sync_wrap (client )
9090
9191
92+ def openmetrics_http_async (url , verb = "POST" , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
93+ client = ppc .AsyncBatchClient (
94+ format = ppc .OpenMetricsFormat (registry = registry ),
95+ transport = ppc .AioHttpTransport (url , verb ),
96+ period = period ,
97+ )
98+ return _async_wrap (client )
99+
100+
101+ def openmetrics_http_thread (url , verb = "POST" , period = 15.0 , registry = ppc .PUSH_REGISTRY ):
102+ client = ppc .ThreadBatchClient (
103+ format = ppc .OpenMetricsFormat (registry = registry ),
104+ transport = ppc .SyncHttpTransport (url , verb ),
105+ period = period ,
106+ )
107+ return _sync_wrap (client )
108+
109+
92110#
93111# decorator AND context manager
94112#
0 commit comments