diff --git a/Server/PacketHandlers/IPacketHandler.cs b/Server/PacketHandlers/IPacketHandler.cs index 43c9910..72f19bf 100644 --- a/Server/PacketHandlers/IPacketHandler.cs +++ b/Server/PacketHandlers/IPacketHandler.cs @@ -1,5 +1,6 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using System.Diagnostics; using JetBrains.Annotations; using NetCoreServer; using Wonderking.Packets; @@ -19,7 +20,12 @@ public interface IPacketHandler : IPacketHandler where T : IPacket return false; } - await HandleAsync(tPacket, session); + using (var activity = new ActivitySource(nameof(Server)).StartActivity("HandleAsync")) + { + activity?.SetTag("Handler", this.ToString()); + activity?.SetTag("PacketId", tPacket.ToString()); + await HandleAsync(tPacket, session); + } return true; }