-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用skywalking中遇上一个异常 #72
Comments
Could you provide some demo for us? |
伪代码,下面 Test 是一个Action
|
使用的版本是 0.2.0 |
You should wait for the previous HttpClient request to end and then initiate a new HttpClient request.
|
目前我们线上的情况是:有时候用户填写完表单点击提交按钮ajax调用Test方法,第一次提交报错,然后他们再次点击就好了。同样的的请求,同样的参数,偶尔会出现异常,不是总出现。 |
据同事反馈,他也遇上SkyWalking异常。他的场景是这样的,在asp.net core应用中,有一个后台运行的任务,需要频繁调用http请求,然后偶尔也会报错,异常就是由SkyWalking内部引发的。 |
目前使用AsyncLocal存储追踪上下文,并行会造成AsyncLocal的值被覆写 |
System.ArgumentException: An item with the same key has already been added. Key: status_code |
Repeat with #102, this bug will be fixed in V0.8. |
this bug at there : https://github.com/caozhiyuan/SkyAPM-dotnet/blob/0.7.0/src/SkyWalking.Core/Context/TracingContext.cs#L193 @liuhaoyang Stack problem. |
我们应用中使用skywalking中遇上一个异常,这个异常不定时出现。出现时的场景大概是这样的,asp.net core应用,在一个mvc的action中使用HttpClient/HttpWebRequest去发起一个http请求,发起的http请求就会报错,具体异常信息如下。
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added. Key: status_code
at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)
at System.Collections.Generic.Dictionary
2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at SkyWalking.Context.Trace.AbstractTracingSpan.Tag(String key, String value) at SkyWalking.Context.Trace.ExitSpan.Tag(String key, String value) at SkyWalking.Context.Tag.StringTag.Set(ISpan span, String tagValue) at SkyWalking.Diagnostics.HttpClient.HttpClientDiagnosticProcessor.HttpResponse(HttpResponseMessage response) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at SkyWalking.Diagnostics.TracingDiagnosticMethod.Invoke(String diagnosticName, Object value) at SkyWalking.Diagnostics.TracingDiagnosticObserver.OnNext(KeyValuePair
2 value)at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
at System.Net.Http.DiagnosticsHandler.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.HttpClient.d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at publish_helper.HttpUtils.d__0.MoveNext()
The text was updated successfully, but these errors were encountered: