mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: fix reporting Discord response metrics to influxdb
This commit is contained in:
parent
24a549341e
commit
48d4009c69
3 changed files with 9 additions and 8 deletions
|
|
@ -52,10 +52,12 @@ namespace PluralKit.Bot
|
|||
c.Resolve<BotConfig>().DiscordBaseUrl
|
||||
);
|
||||
|
||||
var metrics = c.Resolve<IMetrics>();
|
||||
|
||||
client.OnResponseEvent += ((_, ev) =>
|
||||
{
|
||||
var (endpoint, statusCode, ticks) = ev;
|
||||
var timer = c.Resolve<IMetrics>().Provider.Timer.Instance(BotMetrics.DiscordApiRequests, new MetricTags(
|
||||
var timer = metrics.Provider.Timer.Instance(BotMetrics.DiscordApiRequests, new MetricTags(
|
||||
new[] { "endpoint", "status_code" },
|
||||
new[] { endpoint, statusCode.ToString() }
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue