Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions snuba/attribution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
import logging
from datetime import datetime

from snuba import environment
from snuba.utils.metrics.wrapper import MetricsWrapper

from .appid import AppID

metrics = MetricsWrapper(environment.metrics, "snuba.attribution")
logger = logging.getLogger("snuba.attribution")

INVALID_APPID = AppID("invalid", "sns", datetime(2022, 3, 25))
Expand Down
2 changes: 1 addition & 1 deletion snuba/request/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from snuba.utils.metrics.wrapper import MetricsWrapper
from snuba.utils.sentry import SENTRY_OP, set_tag_and_attribute

metrics = MetricsWrapper(environment.metrics, "snuba.validation")
metrics = MetricsWrapper(environment.metrics, "validation")


class Parser(Protocol):
Expand Down
2 changes: 1 addition & 1 deletion snuba/state/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from snuba.utils.streams.configuration_builder import build_kafka_producer_configuration
from snuba.utils.streams.topics import Topic

metrics = MetricsWrapper(environment.metrics, "snuba.state")
metrics = MetricsWrapper(environment.metrics, "state")
logger = logging.getLogger("snuba.state")

kfk: Producer | None = None
Expand Down
2 changes: 1 addition & 1 deletion snuba/state/cache/redis/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def get_readthrough(
except (ConnectionError, ReadOnlyError, RedisTimeoutError, ValueError):
if settings.RAISE_ON_READTHROUGH_CACHE_REDIS_FAILURES:
raise
metrics.increment("snuba.read_through_cache.fail_open")
metrics.increment("fail_open")
Comment thread
ElioDiNino marked this conversation as resolved.
return function()
2 changes: 1 addition & 1 deletion snuba/web/bulk_delete_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
deletes_are_enabled,
)

metrics = MetricsWrapper(environment.metrics, "snuba.delete")
metrics = MetricsWrapper(environment.metrics, "delete")
logger = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion snuba/web/delete_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from snuba.web import QueryException, QueryExtraData, QueryResult
from snuba.web.db_query import _apply_allocation_policies_quota

metrics = MetricsWrapper(environment.metrics, "snuba.delete")
metrics = MetricsWrapper(environment.metrics, "delete")


class DeletesNotEnabledError(Exception):
Expand Down
Loading