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:
Aleksey Kashapov 2024-04-16 16:18:20 +03:00 committed by GitHub
parent 3e2337a818
commit 81219ba540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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.