Comments (15)
I like it because it's automatically enabled via env variable on production environment, so it will not run during development, and it's non invasive, can be enabled/disabled in prod without code deploy.
from applicationinsights-profiler-aspnetcore.
@valeriob Oh~ that is why. That makes sense. I'll look into how to get that fixed.
from applicationinsights-profiler-aspnetcore.
@valeriob, Thanks for your report. Hosting startup is not supported in 2.0.0-beta1. Please follow the example of Quick Start to enable Profiler.
Also, could you please tell us what is the reason for you to choose to use hosting startup? It will help us decide what's the next priority.
Thanks!
from applicationinsights-profiler-aspnetcore.
Thanks @valeriob for your feedback. Just in case you don't know, this environment variable can be used as a kill switch of the profiler:
ServiceProfiler__IsDisabled
Check out the documentation: Configuration References.
from applicationinsights-profiler-aspnetcore.
I'm trying 2.0.0-beta2, but it does not work with dotnet core 3.0, i get this error during startup :
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Diagnostics.PerformanceCounter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'
from applicationinsights-profiler-aspnetcore.
@valeriob That is interesting. Let's troubleshoot.
I assume the application failed to start at all, right? Are you running it on Windows or Linux? Could you please run dotnet --info
and past the output here?
from applicationinsights-profiler-aspnetcore.
Hi,
i created a brand new aspnet core 3.0 application, added the nuget package, those 2 lines in configure services
services.AddApplicationInsightsTelemetry(); // Enable Application Insights telemetry
services.AddServiceProfiler(); // Add this line of code to Enable Profiler
and this code in the appsettings.json:
"ApplicationInsights": {
"InstrumentationKey": "replace-with-your-instrumentation-key"
}
i get this that exception.
dotnet --info :
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
2.1.802 [C:\Program Files\dotnet\sdk]
2.2.103 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
from applicationinsights-profiler-aspnetcore.
@valeriob, so, you are running it locally on your box, right? I ran it in the same environment and didn't have a problem. If possible, could you please run your app as administrator and give it another shoot? Let's see if that is due to permission issue before we try the fancy fuslogvw.
from applicationinsights-profiler-aspnetcore.
Yes, i never run as admin.
But i can reproduce it on many machines, in vs F5 both admin and normal user.
from applicationinsights-profiler-aspnetcore.
By 'vs', I think you mean Visual Studio? Could you please share the version number for VS?
To sort out visual studio magics, in the project folder, run:
dotnet run
Does it work?
Also, could you please paste your project file(*.csproj), just want to see project references and that may help us repro the issue here.
from applicationinsights-profiler-aspnetcore.
Yes, visual studio 16.3.6, and it does not work with dot net run eather.
from applicationinsights-profiler-aspnetcore.
@valeriob I tried the same steps in VS 16.3.6 and it worked for me. There must be something I missed. Let me share my project and you can compare it with yours. At the same time, if you will to, share the project with me and I can take a look at it for you as well.
from applicationinsights-profiler-aspnetcore.
Hi xiaomi,
i saw that you added the guide for .netcore 3 exactly after i opened the issue. i diagnosed the problem, and it's due to the dependency required for Microsoft.ApplicationInsights.AspNetCore must be at least 2.8+, while the nuget package requires only Microsoft.ApplicationInsights.AspNetCore (>= 2.3.0).
I suggest to upgrade the nuget package to reflect the real version dependency.
Thanks
Valerio
from applicationinsights-profiler-aspnetcore.
Hey @valeriob, just FYI, the hosting startup for .NET Core 3.x is coming soon in version 2.1.0-*.
from applicationinsights-profiler-aspnetcore.
Thanks! i'll keep an eye on that !
from applicationinsights-profiler-aspnetcore.
Related Issues (20)
- visual studio and docker-compose not working. HOT 2
- Repeated "Instrumentation Key is empty." error messages in logs since v2.5.0 HOT 8
- Worker service sometimes hangs at profiler startup HOT 4
- The scheduling policy of OneTimeSchedulingPolicy is not registered to an orchestrator. HOT 5
- User report: Memory usage is almost always > 90% on Linux, investigate why HOT 9
- This repo is missing important files
- Could not get the stamp id. Aborting the upload process HOT 15
- [Feature] Handle throttling of 429 better
- Trace file is left when the process crashed before stopping the profiling HOT 5
- The EventPipe Profiler doesn't work with Azure Function (App Service Plan)
- Remove the support of SkipUpload
- EventPipe session was not disposed upon stopping exception
- How-To Use it Properly with OpenTelemetry NuGet? HOT 1
- Please Update Examples To Use APPLICATIONINSIGHTS_CONNECTION_STRING Instead of APPINSIGHTS_INSTRUMENTATIONKEY
- Reduce dependency logging for certain API calls HOT 1
- Profiler throws error in trace: AI: Process was called on the TelemetrySink after it was disposed HOT 2
- Role name in application insights profile list HOT 6
- Bump up the target framework for the uploader to .NET 6
- Issue with starting and stopping a process with the profiler running in same process HOT 2
- When you publish an update for Microsoft.ApplicationInsights.Profiler.AspNetCore, don't mark the previous version as deprecated immediately HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-profiler-aspnetcore.