Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 406366c

Browse files
committed
Merge pull request #116 from Microsoft/develop
Merge develop to master
2 parents 179b341 + ba5f480 commit 406366c

File tree

26 files changed

+141
-169
lines changed

26 files changed

+141
-169
lines changed

NuGet.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<configuration>
33
<packageSources>
44
<add key="ASP.NET 5 Dev" value="https://www.myget.org/F/aspnetvnext/" />
5-
<add key="ASP.NET 5" value="https://www.myget.org/F/aspnetrelease/api/v2/" />
6-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
5+
<add key="ASP.NET 5" value="https://www.myget.org/F/aspnetrelease/" />
6+
<add key="nuget.org feed" value="https://www.nuget.org/api/v2/" />
77
</packageSources>
8+
<disabledPackageSources />
89
</configuration>

src/Microsoft.ApplicationInsights.AspNet/Extensions/ApplicationInsightsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void AddApplicationInsightsTelemetry(this IServiceCollection servi
6666

6767
public static IConfigurationBuilder AddApplicationInsightsSettings(this IConfigurationBuilder configurationSourceRoot, bool? developerMode = null, string endpointAddress = null, string instrumentationKey = null)
6868
{
69-
var telemetryConfigurationSource = new MemoryConfigurationSource();
69+
var telemetryConfigurationSource = new MemoryConfigurationProvider();
7070
bool wasAnythingSet = false;
7171

7272
if (developerMode != null)

src/Microsoft.ApplicationInsights.AspNet/TelemetryInitializers/ClientIpHeaderTelemetryInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected override void OnInitializeTelemetry(HttpContext platformContext, Reque
136136

137137
if (string.IsNullOrEmpty(resultIp))
138138
{
139-
var connectionFeature = platformContext.GetFeature<IHttpConnectionFeature>();
139+
var connectionFeature = platformContext.Features.Get<IHttpConnectionFeature>();
140140

141141
if (connectionFeature != null)
142142
{

src/Microsoft.ApplicationInsights.AspNet/TelemetryInitializers/OperationNameTelemetryInitializer.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
namespace Microsoft.ApplicationInsights.AspNet.TelemetryInitializers
22
{
33
using System;
4+
using System.Diagnostics.Tracing;
45
using System.Linq;
56

67
using Microsoft.ApplicationInsights.Channel;
78
using Microsoft.ApplicationInsights.DataContracts;
89
using Microsoft.AspNet.Hosting;
910
using Microsoft.AspNet.Http;
1011
using Microsoft.AspNet.Mvc;
12+
using Microsoft.AspNet.Mvc.Abstractions;
1113
using Microsoft.AspNet.Mvc.Routing;
1214
using Microsoft.AspNet.Routing;
1315
using Microsoft.Framework.DependencyInjection;
14-
using Microsoft.Framework.Notification;
15-
16+
using Microsoft.Framework.TelemetryAdapter;
17+
1618
public class OperationNameTelemetryInitializer : TelemetryInitializerBase
1719
{
1820
public const string BeforeActionNotificationName = "Microsoft.AspNet.Mvc.BeforeAction";
1921

20-
public OperationNameTelemetryInitializer(IHttpContextAccessor httpContextAccessor, INotifier notifier)
22+
public OperationNameTelemetryInitializer(IHttpContextAccessor httpContextAccessor, TelemetryListener telemetryListener)
2123
: base(httpContextAccessor)
2224
{
23-
if (notifier != null)
25+
if (telemetryListener == null)
26+
{
27+
throw new ArgumentNullException("telemetryListener");
28+
}
29+
30+
if (telemetryListener != null)
2431
{
25-
notifier.EnlistTarget(this);
32+
telemetryListener.SubscribeWithAdapter(this);
2633
}
2734
}
2835

@@ -49,7 +56,7 @@ protected override void OnInitializeTelemetry(HttpContext platformContext, Reque
4956
}
5057
}
5158

52-
[NotificationName(BeforeActionNotificationName)]
59+
[TelemetryName(BeforeActionNotificationName)]
5360
public void OnBeforeAction(ActionDescriptor actionDescriptor, HttpContext httpContext, RouteData routeData)
5461
{
5562
string name = this.GetNameFromRouteContext(routeData);

src/Microsoft.ApplicationInsights.AspNet/TelemetryInitializers/WebSessionTelemetryInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private static void UpdateRequestTelemetryFromPlatformContext(RequestTelemetry r
4040
var sessionCookieValue = platformContext.Request.Cookies[WebSessionCookieName];
4141
if (!string.IsNullOrEmpty(sessionCookieValue))
4242
{
43-
var sessionCookieParts = sessionCookieValue.Split('|');
43+
var sessionCookieParts = ((string)sessionCookieValue).Split('|');
4444
if (sessionCookieParts.Length > 0)
4545
{
4646
// Currently SessionContext takes in only SessionId.

src/Microsoft.ApplicationInsights.AspNet/TelemetryInitializers/WebUserTelemetryInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private static void UpdateRequestTelemetryFromPlatformContext(RequestTelemetry r
4646
var userCookieValue = platformContext.Request.Cookies[WebUserCookieName];
4747
if (!string.IsNullOrEmpty(userCookieValue))
4848
{
49-
var userCookieParts = userCookieValue.Split('|');
49+
var userCookieParts = ((string)userCookieValue).Split('|');
5050
if (userCookieParts.Length >= 2)
5151
{
5252
// todo: add tracing

src/Microsoft.ApplicationInsights.AspNet/project.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "Application Insights for ASP.NET 5 Web Applications",
33
"description": "Application Insights for ASP.NET 5 web applications. See http://go.microsoft.com/fwlink/?LinkID=510752 for more information.",
44
"authors": [ "Microsoft" ],
5-
"version": "1.0.0-beta7-*",
5+
"version": "1.0.0-beta8-*",
66
"copyright": "Copyright © Microsoft. All Rights Reserved.",
77
"projectUrl": "https://github.com/Microsoft/ApplicationInsights-aspnet5",
88
"licenseUrl": "http://go.microsoft.com/fwlink/?LinkID=510709",
@@ -11,13 +11,13 @@
1111
"tags": [ "Analytics", "ApplicationInsights", "Telemetry", "AppInsights", "ASP.NET 5" ],
1212
"dependencies": {
1313
"Microsoft.ApplicationInsights": "1.1.1-beta",
14-
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-beta7-*",
15-
"Microsoft.AspNet.Http.Abstractions": "1.0.0-beta7-*",
16-
"Microsoft.AspNet.Http.Features": "1.0.0-beta7-*",
17-
"Microsoft.AspNet.Mvc": "6.0.0-beta7-*",
18-
"Microsoft.Framework.Logging.Abstractions": "1.0.0-beta7-*",
19-
"Microsoft.Framework.Configuration": "1.0.0-beta7-*",
20-
"Microsoft.Framework.Notification": "1.0.0-beta7-*"
14+
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-beta8-*",
15+
"Microsoft.AspNet.Http.Abstractions": "1.0.0-beta8-*",
16+
"Microsoft.AspNet.Http.Features": "1.0.0-beta8-*",
17+
"Microsoft.AspNet.Mvc": "6.0.0-beta8-*",
18+
"Microsoft.Framework.Logging.Abstractions": "1.0.0-beta8-*",
19+
"Microsoft.Framework.Configuration": "1.0.0-beta8-*",
20+
"Microsoft.Framework.TelemetryAdapter": "1.0.0-beta8-*"
2121
},
2222

2323
"frameworks": {
@@ -27,7 +27,7 @@
2727
"define": [ "dnxcore50" ]
2828
},
2929
"dependencies": {
30-
"System.Net.NameResolution": "4.0.0-beta-22816",
30+
"System.Net.NameResolution": "4.0.0-beta-23302",
3131
"System.Reflection": "4.0.10-beta-23109"
3232
}
3333
}

test/EmptyApp.FunctionalTests/EmptyApp.FunctionalTests.xproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
2020
</ItemGroup>
2121
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
22+
<Import Project="..\..\Common.targets" />
2223
</Project>

test/EmptyApp.FunctionalTests/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void ConfigureServices(IServiceCollection services)
3131
public void Configure(IApplicationBuilder app)
3232
{
3333
app.UseApplicationInsightsRequestTelemetry();
34-
app.UseErrorPage(new ErrorPageOptions());
34+
app.UseDeveloperExceptionPage(new ErrorPageOptions());
3535
app.UseApplicationInsightsExceptionTelemetry();
3636

3737
app.Use(next =>

test/EmptyApp.FunctionalTests/hosting.ini

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)