{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/141","repository_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore","labels_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/141/comments","events_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/141/events","html_url":"https://github.com/Microsoft/ApplicationInsights-aspnetcore/issues/141","id":140644614,"number":141,"title":"Application Insight Instrumentation Key is empty in AspNet 5 via DI","user":{"login":"jittuu","id":168965,"avatar_url":"https://avatars.githubusercontent.com/u/168965?v=3","gravatar_id":"","url":"https://api.github.com/users/jittuu","html_url":"https://github.com/jittuu","followers_url":"https://api.github.com/users/jittuu/followers","following_url":"https://api.github.com/users/jittuu/following{/other_user}","gists_url":"https://api.github.com/users/jittuu/gists{/gist_id}","starred_url":"https://api.github.com/users/jittuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jittuu/subscriptions","organizations_url":"https://api.github.com/users/jittuu/orgs","repos_url":"https://api.github.com/users/jittuu/repos","events_url":"https://api.github.com/users/jittuu/events{/privacy}","received_events_url":"https://api.github.com/users/jittuu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/milestones/9","html_url":"https://github.com/Microsoft/ApplicationInsights-aspnetcore/milestones/98","labels_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/milestones/9/labels","id":1598243,"number":9,"title":"98","description":"","creator":{"login":"abaranch","id":10120301,"avatar_url":"https://avatars.githubusercontent.com/u/10120301?v=3","gravatar_id":"","url":"https://api.github.com/users/abaranch","html_url":"https://github.com/abaranch","followers_url":"https://api.github.com/users/abaranch/followers","following_url":"https://api.github.com/users/abaranch/following{/other_user}","gists_url":"https://api.github.com/users/abaranch/gists{/gist_id}","starred_url":"https://api.github.com/users/abaranch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abaranch/subscriptions","organizations_url":"https://api.github.com/users/abaranch/orgs","repos_url":"https://api.github.com/users/abaranch/repos","events_url":"https://api.github.com/users/abaranch/events{/privacy}","received_events_url":"https://api.github.com/users/abaranch/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2016-02-22T21:06:07Z","updated_at":"2016-03-14T16:58:46Z","due_on":"2016-04-03T07:00:00Z","closed_at":null},"comments":0,"created_at":"2016-03-14T11:17:04Z","updated_at":"2016-03-14T16:59:56Z","closed_at":null,"body":"hi all,\r\ni notice that the instrumentationKey is empty in my asp.net 5 project (1.0.0-rc1-update1)\r\n\r\n## Steps to reproduce\r\n\r\ncreate file with name config.json and populate the file with appInisight informations:\r\n  ```\r\n{\r\n  \"ApplicationInsights\": {\r\n     \"InstrumentationKey\": \"\"\r\n   }\r\n}\r\n  ```\r\n\r\nread and build configuration:\r\n```\r\npublic Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)\r\n{\r\n  Configuration = new ConfigurationBuilder()\r\n    .SetBasePath(appEnv.ApplicationBasePath)\r\n    .AddJsonFile(\"config.json\")\r\n    .Build();\r\n}\r\n  ```\r\n\r\ninsert the following line in method ConfigureServices in startup.cs:\r\n  ```\r\nservices.AddApplicationInsightsTelemetry(Configuration);\r\n  ```\r\n\r\ninsert the following lines in method Configure:\r\n  ```\r\napp.UseApplicationInsightsRequestTelemetry();\r\napp.UseApplicationInsightsExceptionTelemetry();\r\n  ```\r\n\r\nNow when I try to retrieve the `TelemetryClient` from myController(via Dependency Injection), I notice that the `InstrumentationKey` is Empty.\r\n\r\nregards,\r\nluca\r\n\r\n**note**: I also faced the same issue and as per [the issue](https://github.com/Microsoft/ApplicationInsights-dotnet/issues/171), I moved it to here.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/comments/196411592","html_url":"https://github.com/Microsoft/ApplicationInsights-aspnetcore/issues/141#issuecomment-196411592","issue_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/141","id":196411592,"user":{"login":"AlexBulankou","id":11968377,"avatar_url":"https://avatars.githubusercontent.com/u/11968377?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexBulankou","html_url":"https://github.com/AlexBulankou","followers_url":"https://api.github.com/users/AlexBulankou/followers","following_url":"https://api.github.com/users/AlexBulankou/following{/other_user}","gists_url":"https://api.github.com/users/AlexBulankou/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexBulankou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexBulankou/subscriptions","organizations_url":"https://api.github.com/users/AlexBulankou/orgs","repos_url":"https://api.github.com/users/AlexBulankou/repos","events_url":"https://api.github.com/users/AlexBulankou/events{/privacy}","received_events_url":"https://api.github.com/users/AlexBulankou/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T16:59:56Z","updated_at":"2016-03-14T16:59:56Z","body":"Thanks for reporting @jittuu! We'll have an update soon on this."}}