Comments (6)
Hey @stephen-rotageek Thanks for the report. We will take a look.
from applicationinsights-profiler-aspnetcore.
Hi @stephen-rotageek, there are actually 2 problems. 1 is addressed in 2.7.0-beta2. An other is on the service side and will take a while to fix.
Here are the details:
-
Issue 1. RoleName is not carried on in the telemetry objects. That means, the field of cloud_RoleName is always empty for data of the profiler - that's an easy fix.
-
Issue 2. RoleName is not queried on the server side -
appName
is instead used as the value in the role - which is why you see the full resource id in the role column - there's an internal bug to fix the issue. I currently don't have a good ETA on it.
from applicationinsights-profiler-aspnetcore.
Thank you for the update @xiaomi7732.
Just to confirm, do we need both issues resolved before RoleName will be available in the profiler list?
Are there any workarounds we could consider?
from applicationinsights-profiler-aspnetcore.
Yes, we need both fixed.
With regarding the workaround, you might be able to try to overwrite the value of the appName by using a telemetry initializer.
It sounds like having the proper role name is important to you, do you mind help me understand why?
from applicationinsights-profiler-aspnetcore.
@xiaomi7732 I previously tried overwriting the RoleName with a Telemetry Initializer but it didn't work. I defaulted the value to "Unknown" if the environment variable for the app name (website_site_name) couldn't be retrieved, but even that didn't come through.
public class TelemetryInitializer : ITelemetryInitializer
{
public void Initialize(ITelemetry telemetry)
{
string? computerName = Environment.GetEnvironmentVariable("COMPUTERNAME");
string? appName = Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME");
telemetry.Context.Cloud.RoleInstance = computerName ?? "Unknown";
telemetry.Context.Cloud.RoleName = appName ?? "Unknown";
}
}
In the program.cs
builder.Services.AddApplicationInsightsTelemetry();
builder.Services.AddSingleton<ITelemetryInitializer, TelemetryInitializer>();
builder.Services.AddServiceProfiler();
Regarding the importance of the role name, we are planning to use app profiler across multiple applications (microservices), each feeding into the same app insights to give us combined telemetry, using role name to filter to a subset of apps as needed.
If the role name in the profiler list is the resource Id of the app insights, we won't be able to distinguish which profile came from each app. It will make it impossible to sort and difficult to find the profiles we want to view.
from applicationinsights-profiler-aspnetcore.
@stephen-rotageek , hey, thanks for the explanation, I'll see if we could prioritize the fix. Please understand that the server side fix has more impacts and will be a longer process.
On the work-around side, since our service side is querying appName
(not roleNmae), could you please try to overwrite the value of appName field instead, by using the telemetry initializer?
Let me know! Thanks.
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
- 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.