/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/WebSocketsTelemetry/WebSocketsTelemetry.cs
24 строки
930 B
Eric Erhardt
Enable AOT Compatibility (#2144)
24 май 2023, 17:29
Не верифицирован
24 май 2023, 17:29
7ef8164
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; namespace Yarp.ReverseProxy.WebSocketsTelemetry; [EventSource(Name = "Yarp.ReverseProxy.WebSockets")] internal sealed class WebSocketsTelemetry : EventSource { public static readonly WebSocketsTelemetry Log = new(); [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "Parameters to this method are primitive and are trimmer safe.")] [Event(1, Level = EventLevel.Informational)] public void WebSocketClosed(long establishedTime, WebSocketCloseReason closeReason, long messagesRead, long messagesWritten) { if (IsEnabled(EventLevel.Informational, EventKeywords.All)) { WriteEvent(eventId: 1, establishedTime, closeReason, messagesRead, messagesWritten); } } }