2

I don't want any sampling and want to log all the data in requests, customEvents, traces and exceptions.

Will having the following host.json ensure that all of the data logged via a telemetry object inside the Azure function is present consistently on the respective AppInsight instance?

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": false
      }
    }
  }
}
Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60
WULF
  • 197
  • 1
  • 2
  • 12

1 Answers1

2

Yes, it is the correct way to disable sampling in azure function.

On more thing, if you want to log all the kinds of data, you also need to set the log level to Trace. You can refer to this article for how to set log level in host.json.

Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60