Skip to content

[QUERY] Health check filtering results in parentless issues #46751

Open
@hansmbakker

Description

Library name and version

Azure.Monitor.OpenTelemetry.Exporter 1.2.0

Query/Question

In #46056 (comment), it was suggested to filter out health check requests.

However, when implementing

builder.Services.Configure<AspNetCoreTraceInstrumentationOptions>(options =>
            {
                options.Filter = (httpContext) =>
                {
                    return httpContext.Request.Path != "/api/health";
                };
            });

you might end up seeing parentless errors and traces when an issue happens in the health check or in a dependency. The root activity (health check API call) is not sent, but the exceptions and dependency errors are still sent. This might be confusing - so be aware of that. For this reason, we removed the filtering again until we found a better way to do this.

Environment

No response

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Monitor - ExporterMonitor OpenTelemetry ExporterService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions