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
The automatic trace logging generated during function execution shares the same log category as custom metrics sent in functions. This makes it impossible to filter out one while retaining the other in the 'logging' section of the host.json configuration.
The built-in trace logging that we want to filter out are the ones that say 'Executing function....' at the start of function execution and 'Executed function...' at the end. The reason is that we have event-hub-triggered functions that are executed very frequently, sometimes hundreds of times per second, resulting in excessive costs associated with the trace logs generated.
If a function is called 'MetricSender', the category that both the traces and the metrics get is 'Function.MetricSender'.
Repro steps
Create a function that uses ITelemetryClient to send metrics
Custom metrics should not be filtered out. There should be a mechanism in host.json that allows us to filter out built-in function execution traces while preserving custom metrics generated by functions.
Actual behavior
Currently, custom metrics are inadvertently filtered out along with function execution traces. There is no direct way to filter out function traces without affecting custom metrics in host.json
Known workarounds
We can work around the issue by implementing a custom ITelemetryProcessor that filters out the undesired traces instead of filtering them out in host.json. Alternatively, we could have the processor change the category for metrics.
The automatic trace logging generated during function execution shares the same log category as custom metrics sent in functions. This makes it impossible to filter out one while retaining the other in the 'logging' section of the host.json configuration.
The built-in trace logging that we want to filter out are the ones that say 'Executing function....' at the start of function execution and 'Executed function...' at the end. The reason is that we have event-hub-triggered functions that are executed very frequently, sometimes hundreds of times per second, resulting in excessive costs associated with the trace logs generated.
If a function is called 'MetricSender', the category that both the traces and the metrics get is 'Function.MetricSender'.
Repro steps
Create a function that uses
ITelemetryClient
to send metricsAdd the following in host.json:
Expected behavior
Custom metrics should not be filtered out. There should be a mechanism in host.json that allows us to filter out built-in function execution traces while preserving custom metrics generated by functions.
Actual behavior
Currently, custom metrics are inadvertently filtered out along with function execution traces. There is no direct way to filter out function traces without affecting custom metrics in host.json
Known workarounds
We can work around the issue by implementing a custom
ITelemetryProcessor
that filters out the undesired traces instead of filtering them out in host.json. Alternatively, we could have the processor change the category for metrics.Related information
We are using the following packages:
The text was updated successfully, but these errors were encountered: