{"action":"created","issue":{"url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/27","repository_url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging","labels_url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/27/comments","events_url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/27/events","html_url":"https://github.com/mattwcole/gelf-extensions-logging/issues/27","id":376788530,"node_id":"MDU6SXNzdWUzNzY3ODg1MzA=","number":27,"title":"Potential threading issue when used with AspNetCore","user":{"login":"darraghjones","id":431192,"node_id":"MDQ6VXNlcjQzMTE5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/431192?v=4","gravatar_id":"","url":"https://api.github.com/users/darraghjones","html_url":"https://github.com/darraghjones","followers_url":"https://api.github.com/users/darraghjones/followers","following_url":"https://api.github.com/users/darraghjones/following{/other_user}","gists_url":"https://api.github.com/users/darraghjones/gists{/gist_id}","starred_url":"https://api.github.com/users/darraghjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darraghjones/subscriptions","organizations_url":"https://api.github.com/users/darraghjones/orgs","repos_url":"https://api.github.com/users/darraghjones/repos","events_url":"https://api.github.com/users/darraghjones/events{/privacy}","received_events_url":"https://api.github.com/users/darraghjones/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-02T12:22:15Z","updated_at":"2018-11-05T08:34:03Z","closed_at":null,"author_association":"NONE","body":"I'm seeing the follow error periodically in my logs....~ 0.5% of requests.\r\n```\r\nSystem.NullReferenceException: Object reference not set to an instance of an object.\r\n   at Microsoft.AspNetCore.Http.DefaultHttpContext.get_Items()\r\n```\r\nI only get this error when the GelfLoggerProvider is added. From what I've read this could be due to accessing the DefaultHttpContext from multiple threads. I've tried disabling scopes to see if that helped, but I still see the error.\r\n\r\nI would also like to point out I only notice this when running on AWS ECS.\r\n"},"comment":{"url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/comments/435792825","html_url":"https://github.com/mattwcole/gelf-extensions-logging/issues/27#issuecomment-435792825","issue_url":"https://api.github.com/repos/mattwcole/gelf-extensions-logging/issues/27","id":435792825,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTc5MjgyNQ==","user":{"login":"NatalyDrobot","id":20648349,"node_id":"MDQ6VXNlcjIwNjQ4MzQ5","avatar_url":"https://avatars3.githubusercontent.com/u/20648349?v=4","gravatar_id":"","url":"https://api.github.com/users/NatalyDrobot","html_url":"https://github.com/NatalyDrobot","followers_url":"https://api.github.com/users/NatalyDrobot/followers","following_url":"https://api.github.com/users/NatalyDrobot/following{/other_user}","gists_url":"https://api.github.com/users/NatalyDrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/NatalyDrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NatalyDrobot/subscriptions","organizations_url":"https://api.github.com/users/NatalyDrobot/orgs","repos_url":"https://api.github.com/users/NatalyDrobot/repos","events_url":"https://api.github.com/users/NatalyDrobot/events{/privacy}","received_events_url":"https://api.github.com/users/NatalyDrobot/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T08:34:03Z","updated_at":"2018-11-05T08:34:03Z","author_association":"NONE","body":"We have also started to get a similar error, but much more often. Lowering the level of logging to Error has helped a little, but... we still have had to stop using the library, because when increasing the frequency of requests to our API, the frequency of NullReferenceException increases.\r\n\r\nThe last configuration:\r\n\r\n`\"Logging\": {\r\n    \"IncludeScopes\": true,\r\n    \"LogLevel\": {\r\n      \"Default\": \"Information\"\r\n    },\r\n    \"Console\": {\r\n      \"LogLevel\": {\r\n        \"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware\": \"Error\",\r\n        \"Microsoft.AspNetCore.Server.Kestrel\": \"Error\",\r\n        \"Microsoft.AspNetCore.Hosting.Internal.WebHost\": \"Warning\",\r\n        \"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker\": \"Warning\",\r\n        \"Default\": \"Information\"\r\n      }\r\n    },\r\n    \"GELF\": {\r\n      \"IncludeScopes\": true,\r\n      \"LogLevel\": {\r\n        \"Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware\": \"Error\",\r\n        \"Microsoft.AspNetCore.Server.Kestrel\": \"Error\",\r\n        \"Microsoft.AspNetCore.Hosting.Internal.WebHost\": \"Warning\",\r\n        \"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker\": \"Warning\",\r\n        \"Default\": \"Information\"\r\n      }\r\n    }`\r\n"}}
{"actor":{"display_login":"NatalyDrobot"}}