Azure-functions-host: AI: Local storage access has resulted in an error (User: ) (CustomFolder: ).

Created on 4 Apr 2019  路  28Comments  路  Source: Azure/azure-functions-host

Using Python for Azure Function with Application Insights Integration enabled to log trace messages.
Not all logs were written to application insights, I've also found an error message in application insights.

AI: Local storage access has resulted in an error (User: ) (CustomFolder: ). If you want Application Insights SDK to store telemetry locally on disk in case of transient network issues please give the process access to %LOCALAPPDATA% or %TEMP% folder. If application is running in non-windows platform, create StorageFolder yourself, and set ServerTelemetryChannel.StorageFolder to the custom folder name. After you gave access to the folder you need to restart the process. Currently monitoring will continue but if telemetry cannot be sent it will be dropped. Error message

Investigative information

Please provide the following:

  • Timestamp: 2019-04-04T00:48:49.189 (UTC)
  • Function App version (1.0 or 2.0): 2.0
  • Function App name: michi-hactl-func
  • Function name(s) (as appropriate): StagingHandler or DevHandler
  • Invocation ID: N/A
  • Region: East Asia

Repro steps

Provide the steps required to reproduce the problem:

Sample codes

# ...
import logging
# ...
logging.info("some logs...")
  1. Deploy to Function Apps
  2. Enable Application Insights integration
  3. Start Function
  4. Check logs in Application Insights
  5. As we are using Python, there is no way to set StorageFolder in codes.

Expected behavior

Should have all trace messages in application insights

Actual behavior

Some trace messages are missing, and an error indicates required folder were not created/no permission to access

Known workarounds

N/A

Related information

Provide any related information

  • Programming language used : Python
  • Links to source : Please PM if required
  • Bindings used : Blob Trigger, Service Bus Queue Trigger, Service Bus Queue binding