Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider config for opting out of Worker Dependency logs #2880

Open
mathewc opened this issue Nov 25, 2024 · 0 comments
Open

Consider config for opting out of Worker Dependency logs #2880

mathewc opened this issue Nov 25, 2024 · 0 comments

Comments

@mathewc
Copy link
Member

mathewc commented Nov 25, 2024

Description

We should consider providing a config based way for customers to opt out of the default dependency logging the worker does on function invocations (code here). These logs show up as "Invoke" internal dependencies:

Image

Currently the only way for customers to remove these Invoke dependency logs is to write a custom telemetry processr, as in this sample:

    public class CustomTelemetryProcessor : ITelemetryProcessor
    {
        private ITelemetryProcessor Next { get; set; }

        // Link processors to each other in the chain.
        public CustomTelemetryProcessor(ITelemetryProcessor next)
        {
            this.Next = next;
        }

        public void Process(ITelemetry telemetry)
        {
            if (telemetry is DependencyTelemetry dependency && dependency.Name == "Invoke")
            {
                // Do not send telemetry for the "Invoke" dependency.
                return;
            }
            // Call the next processor in the chain.
            this.Next.Process(telemetry);
        }
    }

This came up recently in CRI https://portal.microsofticm.com/imp/v5/incidents/details/564586958/summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants