Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was 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

@cijothomas

Description

@cijothomas

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) :

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugp1high priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions