microsoft / ApplicationInsights-SDK-Labs

Application Insights experimental projects repository
MIT License
61 stars 48 forks source link

[AzureWeAppCounters] Set specific sdkVersion for the Azure WebApps counters telemetry item #44

Closed SergeyKanzhelev closed 8 years ago

SergeyKanzhelev commented 8 years ago

When creating and reporting counters from azure webapp - set specific sdkVersion so we will have indication on how counter was collected

SergeyKanzhelev commented 8 years ago

This one is easy:

  1. Create static internal variable like this with the VersionPrefix equal to azwapc:
  var sdkVersion = SdkVersionUtils.VersionPrefix + SdkVersionUtils.GetAssemblyVersion();
  1. In all gauges set sdkVersion in MetricTelemetry here like this:

    metric.Context.GetInternalContext().SdkVersion = sdkVersion;
  2. Verify that you see proper sdkVersion in received metircs
SergeyKanzhelev commented 8 years ago

Committed in https://github.com/Microsoft/ApplicationInsights-SDK-Labs/pull/55