From f312f0a0f697ca31d490d112d0ce0fa365437564 Mon Sep 17 00:00:00 2001 From: Vladimir Bobrikov Date: Thu, 9 Nov 2023 16:37:13 -0300 Subject: [PATCH] fix --- src/dipdup/http.py | 3 +++ src/dipdup/indexes/evm_subsquid_events/index.py | 3 --- src/dipdup/prometheus.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dipdup/http.py b/src/dipdup/http.py index e9221120e..758c536b0 100644 --- a/src/dipdup/http.py +++ b/src/dipdup/http.py @@ -147,6 +147,9 @@ async def _retry_request( retry_count = 0 if env.TEST else self._config.retry_count retry_count_str = 'inf' if retry_count is sys.maxsize else str(retry_count) + if Metrics.enabled: + Metrics.set_http_errors_in_row(self._url, 0) + while True: self._logger.debug('HTTP request attempt %s/%s', attempt, retry_count_str) try: diff --git a/src/dipdup/indexes/evm_subsquid_events/index.py b/src/dipdup/indexes/evm_subsquid_events/index.py index 48b8d3695..699123126 100644 --- a/src/dipdup/indexes/evm_subsquid_events/index.py +++ b/src/dipdup/indexes/evm_subsquid_events/index.py @@ -42,9 +42,6 @@ def __init__( self._realtime_node: EvmNodeDatasource | None = None self._topics: dict[str, dict[str, str]] | None = None - if self._config.expose_metrics: - Metrics.set_sqd_processor_archive_http_errors_in_row(0) - @property def node_datasources(self) -> tuple[EvmNodeDatasource, ...]: if self._node_datasources is not None: diff --git a/src/dipdup/prometheus.py b/src/dipdup/prometheus.py index f3b5ff408..87121eed6 100644 --- a/src/dipdup/prometheus.py +++ b/src/dipdup/prometheus.py @@ -62,7 +62,7 @@ ['url', 'status'], ) _http_errors_in_row = Histogram( - 'sqd_processor_archive_http_errors_in_row', + 'dipdup_http_errors_in_row', """The number of consecutive failed requests""" ) _callback_duration = Histogram(