For Azure Functions -
- Adaptive sampling is enabled by default.
- Fixed-rate sampling is not supported.
- Ingestion sampling only applies when no other sampling is in effect. Therefore, this is also disabled by default in the wake of point #1 above.
If you expect data (invocations) under Monitor but do not find it as shown in screenshot below, you have either changed Host.Results category to Warning (or above) level; or your application telemetry is getting sampled. To fix the former, open Host.json file and change the Host.Results category to Information level.
{
"logging": {
"fileLoggingMode": "always",
"logLevel": {
"default": "Information",
"Host.Results": "Information",
"Function": "Error",
"Host.Aggregator": "Trace"
}
}
}
If Host.Results category is already set at Information level, disable telemetry sampling as the next step.
To disable the sampling, set "isEnabled": false in host.json file as shown below -
{
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": false
}
}
}
}
After disabling sampling, you can confirm it by running a query similar to the following; RetainedPercentage should show 100%.
At this point, the function invocations should start appearing under Monitor on Azure Portal UI.
Published Sep 30, 2022
Version 1.0VinodRawat
Microsoft
Joined September 28, 2021
Apps on Azure Blog
Follow this blog board to get notified when there's new activity