mirror of
https://github.com/valitydev/woody_erlang.git
synced 2024-11-06 02:15:19 +00:00
TD-788: Fixes 'host' labels values in hackney metrics (#34)
* TD-788: Fixes 'host' labels values in hackney metrics * Temporarily disables codecov report upload
This commit is contained in:
parent
3e2337a818
commit
81219ba540
1
.github/workflows/erlang-checks.yml
vendored
1
.github/workflows/erlang-checks.yml
vendored
@ -36,3 +36,4 @@ jobs:
|
||||
rebar-version: ${{ needs.setup.outputs.rebar-version }}
|
||||
use-thrift: true
|
||||
thrift-version: ${{ needs.setup.outputs.thrift-version }}
|
||||
upload-coverage: false
|
||||
|
@ -90,15 +90,15 @@ increment_counter([hackney, nb_requests], Value) ->
|
||||
increment_counter([hackney, total_requests], Value) ->
|
||||
prometheus_counter:inc(registry(), ?TOTAL_REQUESTS, [], Value);
|
||||
increment_counter([hackney, Host, nb_requests], Value) ->
|
||||
prometheus_gauge:inc(registry(), ?HOST_NB_REQUESTS, [{host, Host}], Value);
|
||||
prometheus_gauge:inc(registry(), ?HOST_NB_REQUESTS, [Host], Value);
|
||||
increment_counter([hackney, Host, connect_timeout], Value) ->
|
||||
prometheus_counter:inc(registry(), ?HOST_CONNECT_TIMEOUT, [{host, Host}], Value);
|
||||
prometheus_counter:inc(registry(), ?HOST_CONNECT_TIMEOUT, [Host], Value);
|
||||
increment_counter([hackney, Host, connect_error], Value) ->
|
||||
prometheus_counter:inc(registry(), ?HOST_CONNECT_ERROR, [{host, Host}], Value);
|
||||
prometheus_counter:inc(registry(), ?HOST_CONNECT_ERROR, [Host], Value);
|
||||
increment_counter([hackney_pool, Host, new_connection], Value) ->
|
||||
prometheus_counter:inc(registry(), ?HOST_NEW_CONNECTION, [{host, Host}], Value);
|
||||
prometheus_counter:inc(registry(), ?HOST_NEW_CONNECTION, [Host], Value);
|
||||
increment_counter([hackney_pool, Host, reuse_connection], Value) ->
|
||||
prometheus_counter:inc(registry(), ?HOST_REUSE_CONNECTION, [{host, Host}], Value);
|
||||
prometheus_counter:inc(registry(), ?HOST_REUSE_CONNECTION, [Host], Value);
|
||||
increment_counter(_Name, _Value) ->
|
||||
ok.
|
||||
|
||||
@ -110,7 +110,7 @@ decrement_counter(Name) ->
|
||||
decrement_counter([hackney, nb_requests], Value) ->
|
||||
prometheus_gauge:dec(registry(), ?NB_REQUESTS, [], Value);
|
||||
decrement_counter([hackney, Host, nb_requests], Value) ->
|
||||
prometheus_gauge:dec(registry(), ?HOST_NB_REQUESTS, [{host, Host}], Value);
|
||||
prometheus_gauge:dec(registry(), ?HOST_NB_REQUESTS, [Host], Value);
|
||||
decrement_counter(_Name, _Value) ->
|
||||
ok.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user