If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text
Kibana version:7.3.0
Elasticsearch version:7.3.0
APM Server version:7.3.0
APM Agent language and version:C# V 1.0 of agent
Browser version: NA
Original install method (e.g. download page, yum, deb, from source, etc.) and version:Nuget
Fresh install or upgraded from other version?
fresh
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Get a null pointer on web requests that fail due to access denied. This then causse the web error to come back differently and application falls in a heap. If you disable the out going http request monitoring our code gets the access denied error then resends with auth token.
Image of line that causes the null pointer and the state and type of objects is is trying to use reflection to get a non existent value from a non existent property called "Exception". You can see "Exception" is not a property on this object. Also AMP Agent logs at bottom of post.
Steps to reproduce:
- build a dotnet 4.6.1 console app
- Add line Agent.Subscribe(new HttpDiagnosticsSubscriber());
- make a http calls that results in an access denied
NOTE: steps above should give a similar or same out come but have not tested.
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
LOGS
[2019-08-20 11:56:43][Trace] - {HttpDiagnosticListenerImplBase} Processing start event... Request URL: https://xxxx/api/georef/v1/regions/details?orqId=Cs_6a91a9c4-e40c-4457-89f2-06570b3f9805
[2019-08-20 11:56:43][Trace] - {CurrentExecutionSegmentsContainer.transaction} Getting value... Thread: 1. Current value: (null).
[2019-08-20 11:56:43][Debug] - {HttpDiagnosticListenerImplBase} No current transaction, skip creating span for outgoing HTTP request
[2019-08-20 11:56:43][Trace] - {HttpDiagnosticListenerImplBase} Called with key: `
System.Net.Http.Desktop.HttpRequestOut.Ex.Stop', value: `{ Request = System.Net.HttpWebRequest, StatusCode = Unauthorized, Headers = Connection: keep-alive
Content-Length: 0
Date: Tue, 20 Aug 2019 11:56:43 GMT
Set-Cookie: ss-id=nm4f50cAVOHEGK8Dgnk3; path=/; samesite=lax; httponly,ss-pid=q2HnaRvpr9pcHR4ca1YQ; expires=Sat, 20 Aug 2039 11:56:43 GMT; path=/; samesite=lax; httponly
Server: Kestrel
Vary: Accept
WWW-Authenticate: jwt realm="/auth/jwt"
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type,Access-Control-Allow-Headers,Authorization,Accept
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS
X-Powered-By: ServiceStack/5.10 NETStandard/.NET
}
[2019-08-20 11:56:43][Trace] - {HttpDiagnosticListenerImplBase} Processing exception event... Request URL: https://xxxx/api/georef/v1/regions/details?orqId=Cs_6a91a9c4-e40c-4457-89f2-06570b3f9805
Application startup exception: System.Net.WebException: The request was aborted: The request was canceled. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Elastic.Apm.DiagnosticListeners.HttpDiagnosticListenerImplBase`2.ProcessExceptionEvent(Object eventValue, Uri requestUrl)
at Elastic.Apm.DiagnosticListeners.HttpDiagnosticListenerImplBase`2.OnNext(KeyValuePair`2 kv)
at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
at System.Diagnostics.HttpHandlerDiagnosticListener.RaiseResponseEvent(HttpWebRequest request, HttpStatusCode statusCode, WebHeaderCollection headers)
at System.Diagnostics.HttpHandlerDiagnosticListener.HttpWebRequestArrayList.RemoveAt(Int32 index)
at System.Net.Connection.ReadStartNextRequest(WebRequest currentRequest, ConnectionReturnResult& returnResult)
at System.Net.ConnectStream.CallDone(ConnectionReturnResult returnResult)
at System.Net.HttpWebResponse..ctor(Uri responseUri, KnownHttpVerb verb, CoreResponseData coreData, String mediaType, Boolean usesProxySemantics, DecompressionMethods decompressionMethod, Boolean isWebSocketResponse, String connectionGroupName)
at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at ServiceStack.ServiceClientBase.Send[TResponse](String httpMethod, String relativeOrAbsoluteUrl, Object request)
`