diff options
| author | 2020-01-13 09:44:48 +0100 | |
|---|---|---|
| committer | 2020-01-13 09:44:48 +0100 | |
| commit | 07ad817394d9539e05d274ce9d5475cc8e4e6c15 (patch) | |
| tree | d613ad5a6a36dc3ed4f7084b0e0f361c08d22e67 | |
| parent | Merge pull request #725 from python-discord/track-command-completions (diff) | |
| parent | Use commas instead of `by`. (diff) | |
Merge pull request #726 from python-discord/track-command-completions-by-user
Prometheus: track command completions by user.
| -rw-r--r-- | bot/cogs/metrics.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/metrics.py b/bot/cogs/metrics.py index fa858bbd6..47c3cc55e 100644 --- a/bot/cogs/metrics.py +++ b/bot/cogs/metrics.py @@ -31,8 +31,8 @@ class Metrics(Cog): ) self.command_completions = Counter( name=f'{self.PREFIX}_command_completions', - documentation="Completed commands by command by guild.", - labelnames=('guild_id', 'command') + documentation="Completed commands by command, user, and guild.", + labelnames=('guild_id', 'user_id', 'user_name', 'command') ) @Cog.listener() @@ -87,6 +87,8 @@ class Metrics(Cog): self.command_completions.labels( guild_id=ctx.message.guild.id, + user_id=ctx.author.id, + user_name=str(ctx.author), command=command, ).inc() |