diff --git a/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs b/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs index b0499656..81505dc0 100644 --- a/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs +++ b/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Options; using Newtonsoft.Json; using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.InterfaceRelay.Application.Contracts; +using SJZY.OTel; using SJZY.Track.Application.Contract.Dtos.TrackPush; using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Services; @@ -380,11 +381,14 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe /// private async Task> GetExtraParamNamesAsync(string subSystemCode) { + using var span = ActivityHelper.CreateSpanActivity("开始请求接口通,接口结构"); using (Track2InterfaceRelaySubSystemContext.Use( new Track2InterfaceRelaySubSystemContext(subSystemCode))) { var res = await _httpClientProxy.Service.GetSystemInterfaceByIdAsync(_options.CurrentValue.PushTrackInterfaceCode, _options.CurrentValue.PushTrackInterfaceId); if (res == null) return new List(); + span.SetTag("request-GetSystemInterfaceByIdAsync", $"{subSystemCode},{_options.CurrentValue.PushTrackInterfaceCode},{_options.CurrentValue.PushTrackInterfaceId}"); + span.SetTag("response-GetSystemInterfaceByIdAsync", res.ToJson()); return res.InParameterList .Where(x => x.Alias.StartsWith(_options.CurrentValue.PushTrackItemParamAliasPrefix)) .Select(x => x.Name)