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

Need some telemetry initializer to populate node_name and role_instance name as the base sdk implementation does not work in Linux #671

Closed
cijothomas opened this issue May 3, 2018 · 1 comment
Labels
bug p1 high priority
Milestone

Comments

@cijothomas
Copy link
Contributor

There is NO nodename or role_instance properties set when app is running in Ubuntu with 2.3.0-beta2 onwards.

If not populated already, base SDK puts this.GetEnvironmentVariable("COMPUTERNAME"); as node name and roleinstance. However, in Ubuntu this environment variable is null and hence both properties remain null.
Livemetrics falls back to use Environment.MachineName which seem to work in Linux as well.

This PR (https://github.com/Microsoft/ApplicationInsights-aspnetcore/pull/656/files) removed the deprecated TelemetryInitializer which used to populate the same with Dns.GetHostName(), which seem to be working in linux as well.

We should probably write a new TelemetryInitializers for asp.net core which either uses Environment.MachineName or Dns.GetHostName()

Version Info

SDK Version : 2.3.0-beta2
.NET Version :
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) :
OS :
Hosting Info (IIS/Azure WebApps/ etc) :

@cijothomas
Copy link
Contributor Author

Fixed #672

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug p1 high priority
Projects
None yet
Development

No branches or pull requests

1 participant