Skip to content

How to filter or suppress built-in Application Insights telemetry in Azure Functions when using OpenTelemetry? #11236

@Shimii

Description

@Shimii

Is your question related to a specific version? If so, please specify:

Azure Functions (isolated worker) version 4

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

.NET 9

Question

We are evaluating Azure Functions (isolated worker) with OpenTelemetry and Application Insights integration.

According to the official guide and the Azure Monitor OpenTelemetry Distro documentation, new applications should use OpenTelemetry with the Azure Monitor exporter. For Azure Functions, the documentation points to this guide.

Following these instructions, we set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable as required. This allows us to see OpenTelemetry-exported telemetry in Application Insights. However, it appears that setting this environment variable also enables the built-in telemetry from the Functions host.

Our issue:
Some traces can be filtered using OpenTelemetry processors or instrumentation filters, but other telemetry—such as dependency telemetry from the CosmosDbTrigger's Change Feed polling (e.g., frequent GET requests to /dbs/[database]/colls/[container]/docs)—cannot be filtered out this way. This results in a large amount of noisy telemetry in Application Insights.

How can we filter or control what is sent by each pipeline, especially for noisy dependencies like Cosmos DB polling?
Any clarification on the expected behavior, configuration options, or references to best practices would be greatly appreciated.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions