From 213db91ade57117b894ec2a52911fecee4daacaa Mon Sep 17 00:00:00 2001 From: Ske Date: Mon, 12 Aug 2019 02:33:56 +0200 Subject: [PATCH] Report database query stats as tags --- PluralKit.Core/Utils.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Core/Utils.cs b/PluralKit.Core/Utils.cs index 327feeae..fab1d874 100644 --- a/PluralKit.Core/Utils.cs +++ b/PluralKit.Core/Utils.cs @@ -620,7 +620,8 @@ namespace PluralKit _logger.Debug("Executed query {Query} in {ElapsedTime}", _commandText, _stopwatch.Elapsed); // One tick is 100 nanoseconds - _metrics.Provider.Timer.Instance(CoreMetrics.DatabaseQuery).Record(_stopwatch.ElapsedTicks / 10, TimeUnit.Microseconds, _commandText); + _metrics.Provider.Timer.Instance(CoreMetrics.DatabaseQuery, new MetricTags("query", _commandText)) + .Record(_stopwatch.ElapsedTicks / 10, TimeUnit.Microseconds, _commandText); } }