chore: some tracing

This commit is contained in:
Timothy Schenk 2023-11-25 14:58:58 +01:00
parent ecaa3c6c10
commit db155a87c0

View file

@ -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<in T> : IPacketHandler where T : IPacket
return false;
}
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;
}