Application Insights: Missing telemetry from FunctionApp-Investigation and Next Steps

Jeff Hoffman 0 Reputation points
2026-10-07T23:02:14.1433333+00:00

Problem description

I have a production Azure Function App running Python 3.12 on Flex Consumption in Central US. The Function App executes successfully, but standard Application Insights telemetry from the Function runtime is not appearing in the configured, workspace-based Application Insights resource.

Function App diagnostic logs are successfully reaching Log Analytics, and Azure Monitor platform metrics independently confirm Function executions. However, the corresponding Application Insights telemetry is absent, including requests, traces, dependencies, exceptions, and custom events.

Environment

  • Azure Functions Flex Consumption
  • Linux / Python 3.12
  • Region: Central US
  • Workspace-based Application Insights
  • System-assigned managed identity
  • Application Insights connection string configured
  • Function App VNet integration enabled
  • Application Insights ingestion uses the regional centralus-2.in.applicationinsights.azure.com endpoint

The Functions host reports:

  • TelemetryMode: ApplicationInsights
  • ApplicationInsightsLoggerProvider successfully initialized

Troubleshooting completed

Application Insights backend/ingestion

Microsoft's Application Insights Telemetry Flow Diagnostic completed 27 checks with 0 failures and 0 warnings.

A synthetic telemetry record was submitted directly to the configured Application Insights ingestion endpoint and:

  • Returned HTTP 200
  • Was accepted by the ingestion service
  • Was subsequently confirmed as stored and queryable in Application Insights

This indicates that the target Application Insights resource and backend ingestion/storage path are operational.

Function execution validation

Function executions have been independently confirmed using Azure Monitor's OnDemandFunctionExecutionCount metric.

For example, during one controlled test, executions were recorded at:

  • 2026-10-07 14:58 UTC
  • 2026-10-07 15:04 UTC

No corresponding records appeared in the workspace-backed Application Insights tables (AppRequests, AppTraces, AppDependencies, AppExceptions, or AppEvents).

Host logging and sampling

A temporary host.json configuration was deployed with:

  • default = Information
  • Host.Results = Information
  • Function = Information
  • Host.Aggregator = Trace
  • Application Insights sampling disabled

The deployed host.json was verified directly in the Function App, and Function App logs showed that the host loaded the updated logging configuration.

This did not restore Application Insights telemetry.

Authentication test

The Function App normally uses:

APPLICATIONINSIGHTS_AUTHENTICATION_STRING=Authorization=AAD

with a system-assigned managed identity that has the appropriate Application Insights RBAC assignment.

As a diagnostic test:

  1. APPLICATIONINSIGHTS_AUTHENTICATION_STRING was temporarily removed.
  2. APPLICATIONINSIGHTS_CONNECTION_STRING was retained.
  3. The Function App was restarted.
  4. Two new Function executions were performed and independently confirmed through Azure Monitor metrics.

No standard Application Insights telemetry appeared.

Startup logs also showed no Unauthorized, Forbidden, or AAD authentication errors.

The AAD authentication setting was subsequently restored.

Python dependencies

The deployed requirements.txt was reviewed and does not explicitly contain:

  • azure-monitor-opentelemetry
  • opentelemetry-api
  • opentelemetry-sdk
  • opentelemetry-instrumentation-*
  • applicationinsights
  • opencensus-*

Therefore, no explicit competing telemetry SDK from this list has been identified.

Runtime

The effective Flex configuration reports:

  • Runtime: Python
  • Version: 3.12

FUNCTIONS_EXTENSION_VERSION is not explicitly configured. My understanding from Microsoft's Flex Consumption documentation is that Flex Consumption uses the Functions v4 runtime and does not use FUNCTIONS_EXTENSION_VERSION to pin/select the Functions runtime version.

Networking

The Function App uses VNet integration. Effective Flex configuration reports:

  • outboundVnetRouting.allTraffic = false
  • outboundVnetRouting.applicationTraffic = false
  • outboundVnetRouting.managedIdentityTraffic = false

The successful synthetic ingestion test originated outside the Function worker environment, so it does not conclusively validate connectivity from the actual Flex Consumption worker.

Current status / question

The current evidence appears to isolate the problem to standard Application Insights telemetry not being emitted/exported from the Function App runtime/worker, rather than a general Application Insights backend ingestion failure:

  • Function executions are independently confirmed.
  • Function diagnostic logs reach Log Analytics.
  • The Functions host initializes Application Insights logging.
  • Direct synthetic Application Insights ingestion succeeds.
  • Host logging/sampling changes do not resolve the issue.
  • Removing AAD/managed-identity telemetry authentication does not resolve the issue.
  • No explicit competing Python telemetry SDK has been identified.

What is the Microsoft-supported method for validating DNS resolution and HTTPS/TCP 443 connectivity to the configured Application Insights ingestion endpoint from the actual Flex Consumption worker environment?

Also, are there any known issues or additional requirements affecting standard Application Insights telemetry emission for Python 3.12 Function Apps on Flex Consumption?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Alex Burlachenko 26,680 Reputation points MVP Volunteer Moderator
    2026-10-28T09:13:13.41+00:00

    Hi Jeff Hoffman & thx for join me at Q&A platform,

    ur investigation already rules out several common causes. The key distinction is that successful ingestion from an external client doesn't prove connectivity from the actual Flex Consumption worker.

    I'd recommend starting with Function App > Diagnose and solve problems and running the Connectivity Troubleshooter and Function App missing telemetry Application Insights or OpenTelemetry diagnostics.

    For a direct worker-side test, temporarily execute this Python code inside a diagnostic function in the affected Function App

    import socket
    import ssl
    host = "centralus-2.in.applicationinsights.azure.com"
    socket.getaddrinfo(host, 443)
    with socket.create_connection((host, 443), timeout=10) as tcp:
        with ssl.create_default_context().wrap_socket(
            tcp, server_hostname=host
        ):
            print("Application Insights DNS/TCP/TLS: OK")
    

    Capture the result through your existing Function App diagnostic logging. This validates DNS, TCP 443, and TLS from the worker, although it doesn't test the Functions host's telemetry exporter itself.

    For standard Functions host telemetry, Python 3.12 doesn't require an additional Application Insights or OpenTelemetry SDK. I also wouldn't attribute this to a known Python 3.12/Flex platform issue without supporting evidence.

    If worker connectivity succeeds, I'd escalate the existing findings to Azure Functions support, requesting an investigation of the host telemetry-export pipeline. Include the Functions host version, worker instance identifiers, UTC execution timestamps, and host diagnostic logs.

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-functions/monitoring/functions-monitoring-appinsightslogs

    Given the evidence you've collected, I wouldn't spend more time changing sampling or reinstalling Python telemetry packages.

    Best regards,

    Alex Burlachenko

    💬 P.S. Did this help? Mark it as the solution: it keeps me motivated!

    ➕ Follow me on Q&A for more answers

    📝 And feel free to visit my blog → https://ctrlaltdel.blog/

    Was this answer helpful?

    0 comments No comments

  2. Hemant Bharadwaj 90 Reputation points Microsoft Employee
    2026-10-27T15:02:43.46+00:00

    Likely cause: your backend Application Insights resource is healthy, but the Functions host -> AI ingestion path from Flex workers is the failing segment. Your evidence (successful synthetic ingest + confirmed executions + missing runtime telemetry categories) points to runtime emission/connectivity/config interaction, not a generic AI outage.

    Confirmed vs possible:

    1. Confirmed: AI ingestion endpoint accepts/stores telemetry when called directly.
    2. Confirmed: Functions execute (platform metrics) and logs are loaded.
    3. Possible: worker egress/DNS path to AI ingestion from Flex workers, host/runtime emission issue, or app-level telemetry pipeline conflict.

    Recommended next steps:

    1. Keep only one telemetry configuration path:
      • Prefer APPLICATIONINSIGHTS_CONNECTION_STRING.
      • Use APPLICATIONINSIGHTS_AUTHENTICATION_STRING=Authorization=AAD only when the managed identity has Monitoring Metrics Publisher on the AI resource.
    2. Verify host-level logging categories and sampling in host.json (and any app-setting overrides of host.json values).
    3. Validate outbound connectivity from the worker path used by Flex + VNet integration to AI ingestion endpoints over HTTPS/443.
    4. Correlate by UTC window using:
      • Function executions (platform metrics)
      • AI tables (requests, traces, dependencies, exceptions)
      • Any dropped/failed telemetry indicators
    5. If still reproducible, open Microsoft support with run IDs, UTC times, Flex plan details, region, connection/auth settings, and sanitized diagnostics proving “executes but no runtime telemetry emitted”.

    Validation checks:

    1. Trigger 3-5 controlled invocations after each config change.
    2. Confirm appearance of at least requests and traces within expected ingestion delay.
    3. If absent, capture current effective settings dump and attach to support case.

    References:

    “If you find this answer helpful, please upvote it. If this resolves your issue, please mark it as the accepted answer so that it can help others in the community.”

    Was this answer helpful?

    0 comments No comments

  3. Rakesh Mishra 11,440 Reputation points Microsoft External Staff Moderator
    2026-10-08T09:14:05.3566667+00:00

    Hi @Jeff Hoffman , Thank you for reaching out to Microsoft Q&A portal. We connected and I'm glad that this is resolved.

    Thanks for the detailed write-up. For anyone who hits the same symptoms, this is the troubleshooting sequence that applies to a VNet-integrated Function App that runs fine but sends no Application Insights telemetry.

    Typical symptoms

    • Functions execute successfully and show up in platform metrics.
    • Function logs reach Log Analytics, but requests, traces and dependencies don't appear in Application Insights.
    • A test call to the ingestion endpoint from outside the app (for example, Cloud Shell) works, so the Application Insights resource itself looks healthy.

    Why external tests can mislead: A test from your own machine or Cloud Shell uses a different DNS and network path from the one your app uses. The app's VNet DNS settings and its outbound route decide whether it can reach the ingestion endpoint, and a successful external test doesn't prove that.

    1. DNS resolution from the app's VNet

    • Check whether the VNet is linked to a private DNS zone for privatelink.monitor.azure.com.
    • Application Insights hostnames resolve through a chain of names that includes that zone. If the zone is linked but has no records for your resource, the lookup can fail with NXDOMAIN instead of falling through to public DNS.
    • There are two ways to fix this:
      • Enable Fallback to internet on the virtual network link of the private DNS zone. Azure DNS then retries the lookup publicly when the private zone has no record.
      • Or use Azure Monitor Private Link (AMPLS) and make sure the private zone contains the required records.

    2. Outbound network path

    • Once DNS resolves, check whether the app's outbound traffic is forced through a firewall or NVA (for example, by a default route on the integration subnet).
    • Make sure HTTPS on port 443 to the Application Insights ingestion endpoints is allowed on that path.
    • Confirm that TLS inspection isn't interfering with the connection.
    • Also allow the Live Metrics endpoints if you use Live Metrics. They're separate from ingestion.

    3. Validate and retest

    • Restart the Function App after changing DNS or firewall rules, because workers cache name resolution.
    • Run a few invocations and wait a few minutes for telemetry to appear.
    • If you can't run commands on the worker (Flex Consumption has no console), use a VM or a test app in the same VNet and subnet. Check DNS, TCP and TLS to the ingestion hostname in that order.

    What resolved it in this scenario: Fixing DNS and then opening outbound HTTPS to the ingestion endpoints restored telemetry. The DNS fix alone wasn't enough, because the firewall was still closing the connection.

    The relevant Learn articles are "Fallback to internet for Azure Private DNS zones" and "Azure Monitor endpoint access and firewall configuration."

    If this answers your question, please accept User's image the answer.

    Was this answer helpful?


  4. Allan Solomon Mejia 10,635 Reputation points
    2026-10-08T02:54:35.83+00:00

    Hello @Jeff Hoffman

    Your testing confirms that the Application Insights resource and ingestion endpoint can accept telemetry, but the synthetic test performed outside the Function App does not validate connectivity from the actual Flex Consumption worker. This requires the connectivity test to run from the application host.

    For a VNet-integrated Function App, it requires outbound HTTPS/TCP 443 access to these Application Insights endpoints:

    dc.applicationinsights.azure.com

    dc.applicationinsights.microsoft.com

    dc.services.visualstudio.com

    *.in.applicationinsights.azure.com

    This includes your regional centralus-2.in.applicationinsights.azure.com endpoint.

    The supported next step is to open Function App > Diagnose and solve problems and run the “Function App missing telemetry Application Insights or OpenTelemetry” diagnostic workflow.

    Test the DNS and HTTPS connectivity from the application host. If Flex Consumption does not expose an interactive worker console for this app, an external curl or synthetic-ingestion test is not an equivalent worker-path test. In that situation, Azure Support would need to inspect the worker’s DNS resolution, outbound connection to port 443, and Functions host telemetry-exporter logs.

    Python 3.12 is supported on Flex Consumption. Flex Consumption also does not support pinning the Functions host through FUNCTIONS_EXTENSION_VERSION; it runs a platform-managed supported host version.

    For standard Functions host telemetry, an explicit Python Application Insights or OpenTelemetry package is not required when using the built-in Application Insights integration. Application packages are required when the application itself emits custom telemetry or when you intentionally configure OpenTelemetry-based instrumentation.

    Also, AppDependencies, AppExceptions, and AppEvents are not necessarily populated for every successful invocation. However, the complete absence of host request/trace telemetry while executions are confirmed is not expected under the documented configuration.

    There's no verified official documentation identifying a known general issue specifically affecting standard Application Insights telemetry on Python 3.12 Flex Consumption in Central US.

    Given the evidence already collected, I recommend opening an Azure support case and supplying:

    • The two exact UTC invocation times.
    • Function App, Application Insights, and Log Analytics resource IDs.
    • The effective host.json and application settings.
    • The Functions host initialization messages.
    • The completed telemetry-flow diagnostic results.
    • The regional ingestion hostname.
    • Confirmation that the external ingestion test succeeded but that no test has yet run inside the actual worker.

    Microsoft Support should specifically verify the worker’s telemetry-export pipeline and outbound path to centralus-2.in.applicationinsights.azure.com:443.

    References:

    Application Insights logs are missing or incorrect for Azure Function App

    Troubleshoot missing application telemetry in Application Insights

    Configure monitoring for Azure Functions

    Azure Functions Flex Consumption plan

    Target Azure Functions runtime versions

    Microsoft Entra authentication for Application Insights


    Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.