chore: some tracing
This commit is contained in:
parent
ecaa3c6c10
commit
db155a87c0
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
||||||
|
|
||||||
|
using System.Diagnostics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using NetCoreServer;
|
using NetCoreServer;
|
||||||
using Wonderking.Packets;
|
using Wonderking.Packets;
|
||||||
|
@ -19,7 +20,12 @@ public interface IPacketHandler<in T> : IPacketHandler where T : IPacket
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue