在使用 await Task.WhenAll 发起http请求时,偶尔抛出 No active span 异常 #102
Labels
bug
Something isn't working
enhancement
New feature or request
help wanted
Extra attention is needed
Milestone
在使用 await Task.WhenAll 发起http请求时,偶尔抛出 No active span 异常。
具体异常信息如下:
InvalidOperationException: No active span.
SkyWalking.Context.TracingContext.InternalActiveSpan()
SkyWalking.Diagnostics.HttpClient.HttpClientTracingDiagnosticProcessor.HttpResponse(HttpResponseMessage response)
Show raw exception details
System.InvalidOperationException: No active span.
at SkyWalking.Context.TracingContext.InternalActiveSpan()
at SkyWalking.Diagnostics.HttpClient.HttpClientTracingDiagnosticProcessor.HttpResponse(HttpResponseMessage response)
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor, bool wrapExceptions)
System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
SkyWalking.Diagnostics.TracingDiagnosticMethod.Invoke(string diagnosticName, object value)
SkyWalking.Diagnostics.TracingDiagnosticObserver.OnNext(KeyValuePair<string, object> value)
System.Diagnostics.DiagnosticListener.Write(string name, object value)
System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task sendTask, HttpRequestMessage request, CancellationTokenSource cts, bool disposeCts)
SyncSoft.App.Http.HttpClientBase.SendAsync(HttpRequestMessage requestMessage) in HttpClientBase.cs
SyncSoft.App.Http.HttpClientBase.SendAsync(HttpAuthorization authorization, HttpMethod httpMethod, Uri uri, object data) in HttpClientBase.cs
SyncSoft.App.Http.HttpClientBase.PostAsync(HttpAuthorization authorization, Uri uri, object data) in HttpClientBase.cs
SyncSoft.App.WebApi.DefaultApiClient.PostAsync(BearerAuthModeEnum authMode, Uri uri, object data) in DefaultApiClient.cs
SyncSoft.App.WebApi.Proxies.ApiProxyBase.PostAsync(BearerAuthModeEnum authMode, string relativeUri, object data) in ApiProxyBase.cs
SyncSoft.LIVNCo.Web.Areas.Product.Models.Family.FamilyDetailModel.SearchFamilyDetailAsync() in FamilyDetailModel.cs
+
await Task.WhenAll(getProductFamily, getSimpleFamily, getBreadcrumbs).ConfigureAwait(false);
SyncSoft.LIVNCo.Web.Areas.Product.Controllers.FamilyController.Detail(FamilyDetailModel model) in FamilyController.cs
+
await model.SearchFamilyDetailAsync();
Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
System.Threading.Tasks.ValueTask.get_Result()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
SyncSoft.ECP.AspNetCore.Middlewares.RouteDataMiddleware.Invoke(HttpContext httpContext) in RouteDataMiddleware.cs
SyncSoft.ECP.AspNetCore.Middlewares.ObjectContainerScopeMiddleware.Invoke(HttpContext context) in ObjectContainerScopeMiddleware.cs
SyncSoft.ECP.AspNetCore.Middlewares.RouteDataMiddleware.Invoke(HttpContext httpContext) in RouteDataMiddleware.cs
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
SyncSoft.ECP.AspNetCore.Middlewares.UnauthorizedAjaxHandleMiddleware.Invoke(HttpContext httpContext) in UnauthorizedAjaxHandleMiddleware.cs
SyncSoft.ECP.AspNetCore.Middlewares.AuthEndpointsMiddleware.Invoke(HttpContext httpContext) in AuthEndpointsMiddleware.cs
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
The text was updated successfully, but these errors were encountered: