mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Collect command runtime metrics
This commit is contained in:
parent
db5fae0fb4
commit
b6fc86d427
2 changed files with 4 additions and 1 deletions
|
|
@ -116,7 +116,9 @@ namespace PluralKit.Bot
|
|||
|
||||
try
|
||||
{
|
||||
await handler(_provider.Resolve<T>());
|
||||
using (_metrics.Measure.Timer.Time(BotMetrics.CommandTime, new MetricTags("Command", commandDef.Key)))
|
||||
await handler(_provider.Resolve<T>());
|
||||
|
||||
_metrics.Measure.Meter.Mark(BotMetrics.CommandsRun);
|
||||
}
|
||||
catch (PKSyntaxError e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue