mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 06:47:56 +00:00
Updates to Elastic logging
This commit is contained in:
parent
ae9ed0f4ee
commit
ae82bb4168
18 changed files with 150 additions and 97 deletions
|
|
@ -16,6 +16,7 @@ using Serilog.Context;
|
|||
|
||||
namespace PluralKit.Bot
|
||||
{
|
||||
// TODO: phase this out; it currently still handles metrics but that needs to be moved to Myriad probably?
|
||||
public class DiscordRequestObserver: IObserver<KeyValuePair<string, object>>
|
||||
{
|
||||
private readonly IMetrics _metrics;
|
||||
|
|
@ -77,6 +78,8 @@ namespace PluralKit.Bot
|
|||
{
|
||||
var endpoint = GetEndpointName(response.RequestMessage);
|
||||
|
||||
// (see phase-out notice at top of file)
|
||||
/*
|
||||
using (LogContext.PushProperty("Elastic", "yes?"))
|
||||
{
|
||||
if ((int) response.StatusCode >= 400)
|
||||
|
|
@ -101,6 +104,7 @@ namespace PluralKit.Bot
|
|||
response.ReasonPhrase,
|
||||
activity.Duration.TotalMilliseconds);
|
||||
}
|
||||
*/
|
||||
|
||||
if (IsDiscordApiRequest(response))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue