I think you should be able to disable the snapshot debugger via slot through configuration settings. Easiest way is add:
{
"ApplicationInsights": {
"SnapshotCollector": {
"IsEnabled": false
}
}
}
to an appsettings.<slot>.json file or pin ApplicationInsights:SnapshotCollector:IsEnabled app setting to the preferred slot. customMetrics
and customEvent
is not part of the ITelemetryInitializer
pipeline. To still use a cloud role name, you need to go the SDK route and disable auto instrumentation. Use TelemetryClient.Track()
to send the custom metric:
var telemetry = new MetricTelemetry("MyCustomMetric", 42);
telemetry.Context.Cloud.RoleName = "MyCustomRoleName";
TelemetryClient.Track(telemetry);