Skip to content

Host leaks function/host key verbatim to Application Insights as dependency telemetry #11602

@jvmap

Description

@jvmap
  • Timestamp: 2026-02-11T09:29:59.7474204Z
  • Function App version: Dotnet-isolated - 10.0 (linux)
  • Invocation ID: 7626f396-74bc-40e9-beae-e6e2e92fc5e7
  • Region: West Europe

Repro steps

  1. Perform an HTTP call to an HttpTrigger function, defined like this:
public async Task<IActionResult> RunAsync(
    [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
{
  1. Observe logging in Application Insights resource
  2. Notice a dependency telemetry is logged like this:
    http://localhost:39357/<function-path>?code=<the-actual-key>

Expected behavior

The function host should never leak the function key to Application Insights or other logging/monitoring tools.
Instead, the secret value should be redacted like this:
http://localhost:39357/<function-path>?code=REDACTED

Actual behavior

The function or host key (whatever was used to authorize the request) is leaked to Application Insights.

Known workarounds

  • Not use Azure functions
  • Not use HttpTrigger
  • Not use key-based authorization
  • Not use isolated process model
  • Not have security or compliance needs

Related information

I developed my function in C# on .NET 10.
I was not able to work around this problem with an ITelemetryInitializer. I suspect this is because the telemetry is written by the host and not by my code, so there is nothing I can do about it.

Image Image Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions