Skip to content

Commit

Permalink
Add a prefix for stats publication
Browse files Browse the repository at this point in the history
  • Loading branch information
vrigal committed Nov 16, 2023
1 parent b96e5bf commit cdb9491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions treeherder/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@
# Statsd server configuration
STATSD_HOST = env('STATSD_HOST', default='statsd')
STATSD_PORT = env('STATSD_PORT', default=8124)
STATSD_PREFIX = env('STATSD_PREFIX', default='treeherder')

# For dockerflow
BASE_DIR = SRC_DIR
4 changes: 3 additions & 1 deletion treeherder/workers/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@


def get_stats_client():
return statsd.StatsClient(settings.STATSD_HOST, settings.STATSD_PORT)
return statsd.StatsClient(
settings.STATSD_HOST, settings.STATSD_PORT, prefix=settings.STATSD_PREFIX
)


@shared_task(name='publish-stats')
Expand Down

0 comments on commit cdb9491

Please sign in to comment.