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
2 changes: 1 addition & 1 deletion src/launchpad/utils/arroyo_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DatadogMetricsBackend(Metrics):
"""

def __init__(self, group_id: str) -> None:
self._statsd = get_statsd("sentry.consumer")
self._statsd = get_statsd("consumer")
self._constant_tags = {"consumer_group": group_id}

def increment(
Expand Down
4 changes: 2 additions & 2 deletions src/launchpad/utils/statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def timed(self, metric: str, tags: list[str] | None = None) -> Any:
_namespace_to_statsd: dict[str, StatsdInterface] = {}


def get_statsd(custom_namespace: Literal[None, "sentry.consumer"] = None) -> StatsdInterface:
namespace = custom_namespace or "launchpad"
def get_statsd(namespace_suffix: Literal[None, "consumer"] = None) -> StatsdInterface:
namespace = f"launchpad.{namespace_suffix}" if namespace_suffix else "launchpad"

if namespace in _namespace_to_statsd:
return _namespace_to_statsd[namespace]
Expand Down
Loading