An Azure service that provides an event-driven serverless compute platform.
This seems to do it.
internal class NoHealthTelemetryInitializer : ITelemetryInitializer
{
public void Initialize(ITelemetry item)
{
ISupportProperties? tcp = item as ISupportProperties;
if(tcp.Properties.Any(z => z.Key == "AzureFunctions_FunctionName" && z.Value == "Health"))
{
// We don't want to track health checks in the metrics.
if (item is ISupportAdvancedSampling advancedSampling)
{
advancedSampling.ProactiveSamplingDecision = SamplingDecision.SampledOut;
}
// For the case that we cannot filter out the telemetry, we mark it as synthetic
if (string.IsNullOrWhiteSpace(item.Context.Operation.SyntheticSource))
{
item.Context.Operation.SyntheticSource = "Health";
}
}
}
}