-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Host.Results logs at the function level for HttpTrigger functions #4742
Comments
In the host.json, if I set this property to "logging": {
"applicationInsights": {
"httpAutoCollectionOptions": {
"enableResponseHeaderInjection": false,
"enableW3CDistributedTracing": false,
"enableHttpTriggerExtendedInfoCollection": true
}
}
} This is an acceptable workaround for the moment but I am loosing some good information in app insights. |
Making the results more specific is a good idea. But your |
The |
@CrazyTuna Possibly? Just a hunch here but I ran into something similar. HTH. Check out... So whatever version of AI is used here: Is the one you have to use as well so the types match up. |
I've been trying to figure out a workaround to filter out the logs for the healthcheck function using OpenTelemetry so that they are not exported to Azure Monitor, but haven't got it working yet. open-telemetry/opentelemetry-dotnet#3918 It would be much better if the Azure Function Host allowed certain functions to be disable from |
I think the relevant code doing the logging is in FunctionExecutor. It has a _resultsLogger = _loggerFactory.CreateLogger(LogCategories.Results); Where LogCategories.Results is The call to Would it be possible to add a filter there, such as Azure/azure-webjobs-sdk#2977 ? Is that a good way to do it. I do not yet understand how or where this project is using |
@RohitRanjanMS, I see recent logging work from you in Azure/azure-webjobs-sdk#2946. Could you review this issue please? |
I was able to work-a-round the problem by disabling the {
"version": "2.0",
"functionTimeout": "00:10:00",
"logging": {
"logLevel": {
"Host.Results": "None",
"Function.Heartbeat": "None"
}
}
} And then starting an |
dotnet/runtime#82465 would potentially allow creating a filter. |
Same problem here: ApplicationInsights is being spammed with thousands of useless messages from the health check. It seems that you have to turn off Is this is a scam by MS to generate revenue for ingestion? |
@rwb196884 I've created a package to work around this: https://github.com/JackD111/azure-functions-custom-http-telemetry Note: This solution has been designed for Isolated Azure Functions, not in proc ones |
@JackD111 However, when I try to add the
So is this actually for in process functions and not for isolated ones? |
@rwb196884 Can you share the csproj of your isolate azure function project? |
Here it is (had to change to .txt to allow it to be attached). |
@rwb196884 You need to include |
That's it, ta. (Might help to update the link to |
@rwb196884 |
I was trying to find what package it's in and clicked the link with anchor text |
What problem would the feature you're requesting solve? Please describe.
I have some function apps exposed behind Front Door. Each application has an health-check endpoint (HttpTrigger).
Front door is calling these health endpoints quite a lot and I have a lots of requests logged to app insights
I managed to disable function logs like that:
But the requests (Host.Results category) are still logged to app insights which increase significantly app insights billing.
Describe the solution you'd like
I'd like to be able to specify
Host.Results
logs at the function level, so I can do something like that:Describe alternatives you've considered
I've already reconfigured Azure Front Door to only call the health endpoint once per second.
I've tried to hook up my own
ITelemetryProcessor
to filter someHost.Results
logs as describe here: ITelemetryProcessor does not appear to be supported in Function AppsWhile debugging, I could find any
RequestTelemetry
and inspecting theITelemetry item
there was no item with categoryHost.Results
so I was a little bit stuck on that part.The text was updated successfully, but these errors were encountered: