Giter Club home page Giter Club logo

applicationinsights-aspnetcore's Introduction

This repo is in the process of being migrated

Please pardon our progress... We are currently in the process of consolidating our github repos. See microsoft/ApplicationInsights-dotnet#1214

NuGet packages

Windows: Build Status

Linux :Build Status

Microsoft Application Insights for ASP.NET Core applications

This repository has a code for Application Insights monitoring of ASP.NET Core applications. Read about contribution policies on Application Insights Home repository

Getting Started

Application Insights monitoring is a service that allows you to collect monitoring and diagnostics information about your application. The getting started guide shows how you can onboard your ASP.NET Core web application to use the Application Insights SDK.

Repository structure

root\
    ApplicationInsights.AspNetCore.sln - Main Solution

    src\
        ApplicationInsights.AspNetCore - Application Insights package

    test\
        ApplicationInsights.AspNetCore.Tests - Unit tests
        FunctionalTestUtils - Test utilities for functional tests
        MVCFramework.FunctionalTests - functional tests for MVC application targeting NetCore1.1,NetCore2.0 and NET45
        WebApi.FunctionalTests - functional tests for Web API application targeting NetCore1.1,NetCore2.0 and NET45
		EmptyApp.FunctionalTests - functional tests for an Empty application targeting NetCore1.1,NetCore2.0 and NET45
        PerfTest - performance test

Developing

To successfully build the sources on your machine, make sure you've installed the following prerequisites:

Building

Once you've installed the prerequisites execute buildDebug.cmd or buildRelease.cmd script in the repository root to build the project locally. You can also open the solution in Visual Studio and build the ApplicationInsights.AspNetCore.sln solution directly.

Testing/Debugging

Execute the RunTests.cmd script in the repository root.

You can also open the solution in Visual Studio and run tests directly from Visual Studio Test Explorer. However, as the tests has multiple targets, Test Explorer only shows the first target from in .csproj. To debug/run tests from a particular TargetFramework with Visual Studio, only option is to re-arrange the such that the intended target comes first. This is a Visual Studio limitation and is likely removed in the future.

Running and writing tests

There are two sets of tests unit tests and functional tests. Please use unit tests for all features testing. The purpose of functional tests is just end-to-end validation of functionality on sample applications.

Functional tests Functional tests are regular web applications with unit tests integrated into them. Application can be compiled as a regular web application as well as set of tests. Typical functional tests will do the following:

  1. Host the current project in In-Proc server.
  2. Initialize application insights telemetry channel.
  3. Initiate request to self hosted web application using HttpClient.
  4. Check data received in telemetry channel.

The following are modifications made to a regular web application to make it work this way:

Add dependencies to .csproj:

"FunctionalTestUtils": "1.0.0-*",
"dotnet.test.xunit": "1.0.0-*",
"xunit": "2.1.0"

and test command:

"test": "xunit"

Add this initialization logic to Startup.cs:

services.AddFunctionalTestTelemetryChannel();

Branches

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

applicationinsights-aspnetcore's People

Contributors

abaranch avatar alexbulankou avatar briandunnington avatar cijothomas avatar davidnx avatar dmitry-matveev avatar dnduffy avatar duracellko avatar gzepeda avatar iusafaro avatar karolz-ms avatar kartang avatar mortonfox avatar netgh0st avatar nickcraver avatar olegsych avatar pakrym avatar pharring avatar pkarda avatar rehansaeed avatar scottaddie avatar sergei-nikitin avatar sergeykanzhelev avatar slodge avatar timothymothra avatar tommilos avatar tyoverby avatar upendras avatar xiaomi7732 avatar yantang-msft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

applicationinsights-aspnetcore's Issues

Implement synthetic traffic fileting from GSM

This will allow to mark synthetic traffic from availability tests https://azure.microsoft.com/en-us/documentation/articles/app-insights-monitor-web-app-availability/ with special flag "Synthetic Source"

We need to implement synthetic traffic filtering SyntheticTelemetryInitializer like we will have in 0.15 SDK for old-style web applications:

If header GsmSyntheticTestRunId present in request - set

  • telemetry.Context.Operation.SyntheticSource to Application Insights Availability Monitoring
  • telemetry.Context.User.Id to the value of the header SyntheticTest-Location
  • telemetry.Context.Session.Id to the value of the header SyntheticTest-RunId

Ability to save the data offline and send it when online

Scenarios like ASPNET apps selfhosted can be used offline and when they are online the data needs to be synced.

We will need a telemetry channel that can keep the data offline and sync when online. Also would be useful to have retry logic for data sync instead of fire and forget

Failed request status code is 200

Update: issue summary:

  • If exception wasn't handled by any middleware runtime will still return 500. Application Insights will report 200.
  • MusicStore application is using UseStatusCodePagesWithRedirects which hiding error response code from customer and Application Insights. So technically Application Insights returns correct status code, however it will never show the number of "Failed requests" increasing.

Question here - what kind of heuristic can we use (or should we at all?) to report the proper response code.

Shorten names by removing ApplicationInsights from class names

Including ApplicationInsights in class names is redundant because the product name is already included in the namespace. Making the following naming changes will help to both shorten the component names and make them more descriptive.

ApplicationInsightsExceptionMiddleware -> ExceptionTrackingMiddleware
ApplicationInsightsRequestMiddleware -> RequestTrackingMiddleware

build fails on beta5 branch

I'm following pretty closely to the leading edge of aspnet development, and because of the API changes between beta4 and beta5 it would be a major pain (for a very temporary benefit) to use the published nupkg. The usual answer to this problem is to just get the source and build it myself, which I tried to do. I guessed that the beta5 branch is my best bet and tried to build it, but it failed. A couple of things obtain:

  1. The NuGet.config in the solution directory doesn't work outside of Microsoft. I had to remove it to do a successful restore.
  2. After restoring, dnu build fails because of a bunch of what appear to be namespacing problems. For example:
C:\Users\Benjamin\src\ApplicationInsights-aspnet5\src\Microsoft.ApplicationInsights.AspNet\Extensions\ApplicationInsightsExtensions.cs(26,87): error CS0433: The type 'IApplicationBuilder' exists in both 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Microsoft.AspNet.Http.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

and

C:\Users\Benjamin\src\ApplicationInsights-aspnet5\src\Microsoft.ApplicationInsights.AspNet\TelemetryInitializers\ClientIpHeaderTelemetryInitializer.cs(12,33):
 error CS0234: The type or namespace name 'Features' does not exist in the namespace 'Microsoft.AspNet.Http' (are you missing an assembly reference?)

Is there a build script somewhere that you're using internally?

Use Git Flow branching model

Open Source projects hosted on GitHub typically use Git Flow branching model. One of its key differences from the "DevDiv branching model" that we fell into is that the Git Flow master branch serves as DevDiv release branch. Git Flow model is simpler for contributors, well documented and well known. I think we should adopt it before going "public".

Allow Option to Include JavaScript from a Seperate File

For those using the Content-Security-Policy (CSP) HTTP header, including inline JavaScript is not allowed. Would it be possible for Microsoft to create and use a CDN which returns the client side JavaScript? The instrumentation key could be included in the query string portion of the URL. So something like this:

<script src="https://application-insights.com?key=[INSTRUMENTATION KEY]"></script>

Unable to resolve service for type 'Microsoft.Framework.Notification.INotifier'

With a simple app, when I try to add Application Insights, following the Getting Started instructions, I see

Unable to resolve service for type 'Microsoft.Framework.Notification.INotifier' while attempting to activate 'Microsoft.ApplicationInsights.AspNet.TelemetryInitializers.OperationNameTelemetryInitializer'

Detailed stack trace:

System.InvalidOperationException: Unable to resolve service for type 'Microsoft.Framework.Notification.INotifier' while attempting to activate 'Microsoft.ApplicationInsights.AspNet.TelemetryInitializers.OperationNameTelemetryInitializer'.
   at Microsoft.Framework.DependencyInjection.ServiceLookup.Service.PopulateCallSites(ServiceProvider provider, ISet`1 callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
   at Microsoft.Framework.DependencyInjection.ServiceLookup.Service.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   at Microsoft.Framework.DependencyInjection.ServiceLookup.ClosedIEnumerableService.CreateCallSite(ServiceProvider provider, ISet`1 callSiteChain)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.GetResolveCallSite(IService service, ISet`1 callSiteChain)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.GetServiceCallSite(Type serviceType, ISet`1 callSiteChain)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.b__7_0(Type key)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Framework.DependencyInjection.ServiceProviderExtensions.GetService[T](IServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ApplicationInsightsExtensions.AddServicesToCollection[T](IServiceProvider serviceProvider, ICollection`1 collection)
   at Microsoft.Framework.DependencyInjection.ApplicationInsightsExtensions.<>c__DisplayClass8_0.b__0(IServiceProvider serviceProvider)
   at Microsoft.Framework.DependencyInjection.ServiceLookup.FactoryService.Invoke(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.SingletonCallSite.Invoke(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.<>c__DisplayClass8_0.b__0(ServiceProvider provider)
   at Microsoft.Framework.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Framework.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Framework.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Microsoft.AspNet.Builder.UseMiddlewareExtensions.<>c__DisplayClass2_0.b__0(RequestDelegate next)
   at Microsoft.AspNet.Builder.Internal.ApplicationBuilder.Build()
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication()
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start()
   at Microsoft.AspNet.Loader.IIS.RuntimeHttpApplication.ApplicationStart(IHttpApplication application)
   at Microsoft.AspNet.Loader.IIS.HttpApplicationBase.InvokeApplicationStart(IHttpApplication application)

Any ideas on what to check?

Dependency tracking for DNX apps

This package provides request telemetry and exception telemetry. It would be good to also have a way to enable dependency telemetry via this package for projects targeting DNX, even if it's only for the full framework (dnx451) and not CoreCLR (dnxcore50).

Cannot find Microsoft.ApplicationInsights.AspNet in project.json

I am using "Visual Studio Enterprise 2015 CTP" Version 14.0.22919.0 D14REL

My existing dependencies is as below:
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta4",
"EntityFramework.Commands": "7.0.0-beta4",
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
"Microsoft.Framework.Logging": "1.0.0-beta4",
"Microsoft.Framework.Logging.Console": "1.0.0-beta4",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4"
},
When I adding the new dependency, I cannot find AspNet after ApplicationInsights. There are only something like:
Microsoft.ApplicationInsights.Web
Microsoft.ApplicationInsights.TraceListener
Microsoft.ApplicationInsights.PerfCounterCollector
...

Is this library only available on any other NUGET source?

Switch from hard-coded fakes to a dynamic test isolation framework.

@SergKanz, @abaranch, @upendras and @sergei-nikitin,

Since I will be moving away from the ASP.NET 5 work soon, I think people who will be maintaining this code would be in the best position to choose the test isolation framework we will use. Here is what Roy Osherove, the author of the highly recommended book, The Art of Unit Testing has to say on the subject: FakeItEasy or NSubstitute, which should I use?.

Notice that he recommends against using Moq on new projects. He also has a somewhat outdated poll that, shows NSubstitute being the most popular among his blog readers. However, the Microsoft Engineering Excellency team also recommends NSubstitute over Moq on the agile alias when this question comes up.

Here are the links to these frameworks on GitHub.

Although all of them are actively maintained, none of them support dnxcore50 at this time. Contributing to Moq and FakeItEasy would be straightforward, while NSubstitute may be a bit harder due to custom tools they use.

Please comment on your preference.

Unit tests for middleware

I've been trying to create a unit test for middleware. Following stackoverflow example I wrote this code, but it fails to construct middleware as it cannot find the TelemetryClient. Any ideas?

            sentItems.Clear();
            var configuration = new TelemetryConfiguration()
            {
                TelemetryChannel = new FakeTelemetryChannel() { OnSend = item => this.sentItems.Add(item) },
                InstrumentationKey = "testestkey"
            };
            var client = new TelemetryClient(configuration);

            var services = new ServiceCollection();
            services.AddInstance<TelemetryClient>(client);

            services.AddInstance<IApplicationEnvironment>(CallContextServiceLocator.Locator.ServiceProvider.GetService<IApplicationEnvironment>());
            services.AddInstance<IServiceManifest>(CallContextServiceLocator.Locator.ServiceProvider.GetService<IServiceManifest>());

            var server = TestServer.Create(services.BuildServiceProvider(), (IApplicationBuilder app) =>
            {
                app.UseMiddleware<RequestTrackingMiddleware>();
                app.Use(next =>
                {
                    return async context =>
                    {
                        await context.Response.WriteAsync("Hello, world!");
                    };
                });
            });

            using (server)
            {
                var response = await server.CreateClient().GetAsync("/");
                Assert.Equal(HttpStatusCode.OK, response.StatusCode);
            }

Prefer unit tests over integration tests over end-to-end tests

It feels that some recent changes set us on a path of using end-to-end tests over lower-level tests, such as integration and unit tests. I think this is a dangerous trend as it will make changing the code more and more difficult over time, especially by outside contributors, who are not intimately familiar with the test infrastructure. Pull request #17 contains comments describing what actually happened to me while integrating changes in pull request #15 with a relatively small set of the end-to-end RequestTelemetryTests.

Custom Events not getting sent

I'm trying to test out sending custom events through an MVC 6 application, but am not seeing any of them coming up. I am seeing other events (response times, page loads, etc.).

The sample code is available here: https://github.com/avodovnik/MonitoringApplications. You can find the TrackEvent being called in HomeController's Contact and GenerateEvents.

I tried sending events with a properties dictionary, then reverted to simple events, still to no awail. Am not getting any info in the output view inside Visual Studio except for requests.

Am I missing something?

Reference ASP.NET "Abstractions" / "Interfaces" packages instead of concrete implementations

Many of the packages in ASP.NET 5 and DNX now have "Abstractions" packages (as of beta5; in beta4 these were generally "Interfaces" packages) that contain just the raw interfaces, without specific implementations. As a general rule, library packages (such as Application Insights) should reference the abstractions and not concrete implementations.

E.g. the references here: https://github.com/Microsoft/ApplicationInsights-aspnet5/blob/master/src/Microsoft.ApplicationInsights.AspNet/project.json#L13-L17

You should be able to change the reference to Microsoft.Framework.Logging to instead be Microsoft.Framework.Logging.Abstractions (in beta5; or use Microsoft.Framework.Logging.Interfaces in beta4).

getting instance of TelemetryClient from resolver service and using it breaks request auto-instrumentation

Reported by @AlexBulankou

Auto-instrumentation is working fine (requests are getting sent)
Then I add the code to track events and metrics:

TelemetryClient telemetryClient = (TelemetryClient)this.Resolver.GetService(typeof(TelemetryClient));

telemetryClient.TrackEvent("GetMethod");
telemetryClient.TrackMetric("GetMetric", 10);

and this breaks auto-instrumentation - I no longer see requests in Fiddler.

Feedback from Peter

Here is a feedback from @petehauge

Going through this page to add stuff: https://github.com/Microsoft/ApplicationInsights-aspnetv5/wiki/Getting-Started

• The first & second step were clear (add reference & config instrumentation key), but the 3rd step wasn’t completely obvious… Might be better to tell the user to add the services.AddApplicationInsightsTelemetry(Configuration); line to the “ConfigureServices” method AND tell them to add the correct using statement: using Microsoft.ApplicationInsights.AspNet; The only reason I found this was via the lightbulb suggested fixes… 
• Fourth step (add middleware and configure developer mode), should tell users to add this to the “Configure” section. I figured it out because that was the only place where “app.UseApplicationInsightsRequestTelemetry” would resolve properly, needed a bit of guess and check.
• 5th step (add to _layout.cshtml), I’m assuming that this needs to be added AFTER the injection of AppSettings (since that’s where the configuration key is defined). If that’s necessary should probably indicate that…

• Last thing – I have a custom event, I assume that needs to come AFTER the HTMLHelper for injecting the AppInsights Javascript Snippet (since I assume that configures app insights in the browser). Might be good to mention that too (any additional app insights logging needs to happen after this in the ‘head’ section), only if it’s necessary…

Page views are not sent when running in Web emulator

Page views are sent just fine when running inside IISExpress but those same page views are not sent when running inside the web emulator.

Requests and exceptions are sent correctly when running inside either IISExpress or the web emulator.

MVC unit tests fail

We seem to be getting two exceptions from the ASP.Net pipeline with following stack:

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.Framework.Runtime.Common.DependencyInjection.ActivatorUtilities.<>c__DisplayClass4_0.b__0(IServiceProvider services)
at Microsoft.Framework.Runtime.Common.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider services, Type type)
at Microsoft.Framework.Runtime.CompilerServices.CreateService[T](IServiceProvider sp, IAssemblyLoadContext loadContext, TypeInformation typeInfo)
at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.b__5_1(TypeInformation typeInfo)
at System.Collections.Generic.DictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func2 factory)
at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.<>c__DisplayClass5_0.b__0(CacheContext ctx)
at Microsoft.Framework.Runtime.Caching.CacheExtensions.<>c__DisplayClass0_01.<Get>b__0(CacheContext ctx) at Microsoft.Framework.Runtime.Caching.Cache.CreateEntry(Object k, Func2 acquire)
at Microsoft.Framework.Runtime.Caching.Cache.<>c__DisplayClass5_0.b__0()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.Framework.Runtime.Caching.Cache.Get(Object key, Func2 factory)
at Microsoft.Framework.Runtime.Caching.CacheExtensions.Get[T](ICache cache, Object key, Func2 factory) at Microsoft.Framework.Runtime.ProjectLibraryExportProvider.GetLibraryExport(ILibraryKey target) at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.<>c__DisplayClass2_0.<GetLibraryExport>b__0(ILibraryExportProvider r) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at Microsoft.Framework.Runtime.CompositeLibraryExportProvider.GetLibraryExport(ILibraryKey target)
at Microsoft.Framework.Runtime.LibraryManager.GetLibraryExport(String name, String aspect)
at Microsoft.Framework.Runtime.LibraryManager.GetLibraryExport(String name)
at Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.GetApplicationReferences()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(RelativeFileInfo fileInfo, String compilationContent) at Microsoft.AspNet.Mvc.Razor.Compilation.RazorCompilationService.Compile(RelativeFileInfo file) at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.OnCacheMiss(RelativeFileInfo file, String normalizedPath, Func2 compile)
at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.GetOrAddCore(String relativePath, Func2 compile) at Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCache.GetOrAdd(String relativePath, Func2 compile)
at Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String relativePath)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext context, String pageName, Boolean isPartial)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.GetRazorPageResult(ActionContext context, String pageName, Boolean isPartial)
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName)
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName, Boolean partial)
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext context, String viewName)
at Microsoft.AspNet.Mvc.ViewResult.d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__50.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.MvcRouteHandler.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Mvc.MvcRouteHandler.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Routing.Template.TemplateRoute.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Routing.RouteCollection.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.<Invoke>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNet.Authentication.AuthenticationMiddleware1.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.ApplicationInsights.AspNet.ExceptionTrackingMiddleware.d__4.MoveNext() in C:\GitHub-microsoft\ApplicationInsights-aspnet5\src\Microsoft.ApplicationInsights.AspNet\ExceptionTrackingMiddleware.cs:line 30

Symbols.NuPkg is not pushed to SymbolSource.org

Pushing v0.30.0.1-beta of Microsoft.ApplicationInsights.AspNet package to SymbolSource.org failed with an internal error. It is not clear whether the error is caused by the package version, which seemed to be indicated by the error message, or by the new platforms (dnx451 and dnxcore50) it contains.

app start fail on mono

i'm try run mvc app with ApplicationInsights over microsoft/aspnet 1.0.0-beta4 docker image.
'dnx kestrel' return exception:

Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(
TelemetryConfiguration)' on type 'TelemetryClient'. ---> An exception was thrown by the type initializer for Mi
crosoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource (See inner exception for detai
ls.) ---> System.TypeInitializationException: An exception was thrown by the type initializer for Microsoft.App
licationInsights.Extensibility.Implementation.Tracing.CoreEventSource ---> System.InvalidProgramException: Inva
lid IL code in Microsoft.Diagnostics.Tracing.EventSource:Initialize (System.Guid,string,string[]): IL_00cc: stl
oc.1

at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings, System.String[] traits) [0x
00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings) [0x00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor () [0x00000] in :0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..ctor () [0x00000] in <
filename unknown>:0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..cctor () [0x00000] in
:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in :0
at System.Threading.Tasks.Task.Execute () [0x00000] in :0
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate () [0x00000] in :0
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance (IComponentContext context, IEnume
rable1 parameters) [0x00000] in <filename unknown>:0 at Autofac.Core.Resolving.InstanceLookup.Activate (IEnumerable1 parameters) [0x00000] in :
0
at Autofac.Core.Resolving.InstanceLookup.b__0 () [0x00000] in :0
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare (Guid id, System.Func1 creator) [0x00000] in <fil ename unknown>:0 at Autofac.Core.Resolving.InstanceLookup.Execute () [0x00000] in <filename unknown>:0 at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance (ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) [0x00000] in :0
at Autofac.Core.Resolving.ResolveOperation.ResolveComponent (IComponentRegistration registration, IEnumerable
1 parameters) [0x00000] in <filename unknown>:0 at Autofac.Core.Resolving.ResolveOperation.Execute (IComponentRegistration registration, IEnumerable1 parame
ters) [0x00000] in :0
System.TypeInitializationException: An exception was thrown by the type initializer for Microsoft.ApplicationIn
sights.Extensibility.Implementation.Tracing.CoreEventSource ---> System.InvalidProgramException: Invalid IL cod
e in Microsoft.Diagnostics.Tracing.EventSource:Initialize (System.Guid,string,string[]): IL_00cc: stloc.1

at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings, System.String[] traits) [0x
00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings) [0x00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor () [0x00000] in :0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..ctor () [0x00000] in <
filename unknown>:0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..cctor () [0x00000] in
:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in :0
at System.Threading.Tasks.Task.Execute () [0x00000] in :0
System.InvalidProgramException: Invalid IL code in Microsoft.Diagnostics.Tracing.EventSource:Initialize (System
.Guid,string,string[]): IL_00cc: stloc.1

at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings, System.String[] traits) [0x
00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings) [0x00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor () [0x00000] in :0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..ctor () [0x00000] in <
filename unknown>:0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..cctor () [0x00000] in
:0

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for Microsoft.ApplicationIn
sights.Extensibility.Implementation.Tracing.CoreEventSource ---> System.InvalidProgramException: Invalid IL cod
e in Microsoft.Diagnostics.Tracing.EventSource:Initialize (System.Guid,string,string[]): IL_00cc: stloc.1

at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings, System.String[] traits) [0x
00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings) [0x00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor () [0x00000] in :0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..ctor () [0x00000] in <
filename unknown>:0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..cctor () [0x00000] in
:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in :0
at System.Threading.Tasks.Task.Execute () [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type init
ializer for Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource ---> System.Inva
lidProgramException: Invalid IL code in Microsoft.Diagnostics.Tracing.EventSource:Initialize (System.Guid,strin
g,string[]): IL_00cc: stloc.1

at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings, System.String[] traits) [0x
00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor (EventSourceSettings settings) [0x00000] in :0
at Microsoft.Diagnostics.Tracing.EventSource..ctor () [0x00000] in :0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..ctor () [0x00000] in <
filename unknown>:0
at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource..cctor () [0x00000] in
:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in :0
at System.Threading.Tasks.Task.Execute () [0x00000] in :0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.