diff --git a/src/DotNetMashup.Web/DotNetMashup.Web.xproj b/src/DotNetMashup.Web/DotNetMashup.Web.xproj
index 731f982..0227428 100644
--- a/src/DotNetMashup.Web/DotNetMashup.Web.xproj
+++ b/src/DotNetMashup.Web/DotNetMashup.Web.xproj
@@ -14,6 +14,7 @@
2.0
59713
+ /subscriptions/6332a4fe-3d5b-4857-9206-6dedd406f451/resourcegroups/Default-ApplicationInsights-CentralUS/providers/microsoft.insights/components/DotNetMashup.Web
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/Service References/Application Insights/ConnectedService.json b/src/DotNetMashup.Web/Service References/Application Insights/ConnectedService.json
new file mode 100644
index 0000000..146f6f9
--- /dev/null
+++ b/src/DotNetMashup.Web/Service References/Application Insights/ConnectedService.json
@@ -0,0 +1,7 @@
+{
+ "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider",
+ "Version": "3.3.1.0",
+ "GettingStartedDocument": {
+ "Uri": "http://go.microsoft.com/fwlink/?LinkID=613414"
+ }
+}
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/Startup.cs b/src/DotNetMashup.Web/Startup.cs
index a863cb4..4160dfa 100644
--- a/src/DotNetMashup.Web/Startup.cs
+++ b/src/DotNetMashup.Web/Startup.cs
@@ -23,6 +23,7 @@ namespace DotNetMashup.Web
{
config = new ConfigurationBuilder()
.AddEnvironmentVariables()
+ .AddApplicationInsightsSettings(instrumentationKey: "fda37cc5-e36e-4171-94ac-f02f9f1771c9")
.Build();
_feedData = JsonConvert.DeserializeObject>(File.ReadAllText(Path.Combine(appEnv.ApplicationBasePath, "blogfeed.json")));
}
@@ -33,6 +34,7 @@ namespace DotNetMashup.Web
public void ConfigureServices(IServiceCollection services)
{
services.AddInstance(config);
+ services.AddApplicationInsightsTelemetry(config);
services.AddSingleton(prov =>
{
return new SiteSettings();
diff --git a/src/DotNetMashup.Web/config.json b/src/DotNetMashup.Web/config.json
index 6e86a34..2525f3c 100644
--- a/src/DotNetMashup.Web/config.json
+++ b/src/DotNetMashup.Web/config.json
@@ -1,7 +1,5 @@
{
- "Data": {
- "DefaultConnection": {
- "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=DotNetMashup;Trusted_Connection=True;MultipleActiveResultSets=true"
- }
+ "ApplicationInsights": {
+ "InstrumentationKey": "fda37cc5-e36e-4171-94ac-f02f9f1771c9"
}
}
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/project.json b/src/DotNetMashup.Web/project.json
index de2aad7..899593e 100644
--- a/src/DotNetMashup.Web/project.json
+++ b/src/DotNetMashup.Web/project.json
@@ -18,7 +18,8 @@
"Newtonsoft.Json": "7.0.1",
"TweetinviAPI": "0.9.9.8",
"Octokit": "0.16.0",
- "CommonMark.NET": "0.9.1"
+ "CommonMark.NET": "0.9.1",
+ "Microsoft.ApplicationInsights.AspNet": "1.0.0-beta8"
},
"commands": {