You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the implementation code is never called in our Function App.
The code to set up the builder is called, which looks like:
var builder = TelemetryConfiguration.Active.TelemetryProcessorChainBuilder; builder.Use((next) => new AppInsightsFilter(next)); builder.Build();
But the 'Process' method implemented in the class is never called, the class looks like:
` class AppInsightsFilter : ITelemetryProcessor
{
private ITelemetryProcessor Next { get; set; }
// Link processors to each other in a chain.
public AppInsightsFilter(ITelemetryProcessor next)
{
this.Next = next;
}
public void Process(ITelemetry item)
{
// To filter out an item, just return
if (!OKtoSend(item)) { return; }
// Modify the item if required
//ModifyItem(item);
this.Next.Process(item);
}
private bool OKtoSend(ITelemetry item)
{
// try something!
return (DateTime.Now.Second <= 20); // only send for the first 20 seconds of a minute
}
}`
PS. We have tried setting config values SamplingPercentage (App Insights config) and maxTelemetryItemsPerSecond (host.json) as low as possible to reduce the telemetry data, but there is still too much telemetry.
The text was updated successfully, but these errors were encountered:
This is a big issue for me as well. The amount of trace records being written to AI is large and increases the cost. Being able to filter out the unnecessary entries would save a lot of bandwidth and cost.
Curious on if work around dependency injection ( Azure/azure-functions-host#3736 ) will help with this or anything else? @brettsam as well as he has tons of AI experience
Documentation (https://docs.microsoft.com/en-us/azure/application-insights/app-insights-api-filtering-sampling) suggests that ITelemetryProcessor can be used to filter\sample the telemetry before it is sent App Insights.
But the implementation code is never called in our Function App.
The code to set up the builder is called, which looks like:
var builder = TelemetryConfiguration.Active.TelemetryProcessorChainBuilder; builder.Use((next) => new AppInsightsFilter(next)); builder.Build();
But the 'Process' method implemented in the class is never called, the class looks like:
` class AppInsightsFilter : ITelemetryProcessor
{
private ITelemetryProcessor Next { get; set; }
PS. We have tried setting config values SamplingPercentage (App Insights config) and maxTelemetryItemsPerSecond (host.json) as low as possible to reduce the telemetry data, but there is still too much telemetry.
The text was updated successfully, but these errors were encountered: