public static bool TryEnablePrjFlt(ITracer tracer, out string error)
        {
            error = null;
            EventMetadata prjFltHealthMetdata = new EventMetadata();

            prjFltHealthMetdata.Add("Area", EtwArea);

            PhysicalFileSystem fileSystem = new PhysicalFileSystem();

            lock (enablePrjFltLock)
            {
                bool isServiceInstalled;
                bool isDriverFileInstalled;
                bool isNativeLibInstalled;
                bool isRunning   = ProjFSFilter.IsServiceRunningAndInstalled(tracer, fileSystem, out isServiceInstalled, out isDriverFileInstalled, out isNativeLibInstalled);
                bool isInstalled = isServiceInstalled && isDriverFileInstalled && isNativeLibInstalled;

                prjFltHealthMetdata.Add($"Initial_{nameof(isRunning)}", isRunning);
                prjFltHealthMetdata.Add($"Initial_{nameof(isServiceInstalled)}", isServiceInstalled);
                prjFltHealthMetdata.Add($"Initial_{nameof(isDriverFileInstalled)}", isDriverFileInstalled);
                prjFltHealthMetdata.Add($"Initial_{nameof(isNativeLibInstalled)}", isNativeLibInstalled);
                prjFltHealthMetdata.Add($"Initial_{nameof(isInstalled)}", isInstalled);

                if (!isRunning)
                {
                    if (!isInstalled)
                    {
                        if (ProjFSFilter.TryEnableOrInstallDriver(tracer, fileSystem))
                        {
                            isInstalled = true;
                        }
                        else
                        {
                            error = "Failed to install (or enable) PrjFlt";
                            tracer.RelatedError($"{nameof(TryEnablePrjFlt)}: {error}");
                        }
                    }

                    if (isInstalled)
                    {
                        if (ProjFSFilter.TryStartService(tracer))
                        {
                            isRunning = true;
                        }
                        else
                        {
                            error = "Failed to start prjflt service";
                            tracer.RelatedError($"{nameof(TryEnablePrjFlt)}: {error}");
                        }
                    }
                }
                else if (!isNativeLibInstalled)
                {
                    tracer.RelatedWarning($"{nameof(TryEnablePrjFlt)}: prjflt service is running, but native library is not installed");

                    if (ProjFSFilter.TryInstallNativeLib(tracer, fileSystem))
                    {
                        isInstalled = true;
                    }
                    else
                    {
                        error = "Failed to install native ProjFs library";
                        tracer.RelatedError($"{nameof(TryEnablePrjFlt)}: {error}");
                    }
                }

                bool isAutoLoggerEnabled = ProjFSFilter.IsAutoLoggerEnabled(tracer);
                prjFltHealthMetdata.Add("InitiallyAutoLoggerEnabled", isAutoLoggerEnabled);

                if (!isAutoLoggerEnabled)
                {
                    if (ProjFSFilter.TryEnableAutoLogger(tracer))
                    {
                        isAutoLoggerEnabled = true;
                    }
                    else
                    {
                        tracer.RelatedError($"{nameof(TryEnablePrjFlt)}: Failed to enable prjflt AutoLogger");
                    }
                }

                prjFltHealthMetdata.Add(nameof(isInstalled), isInstalled);
                prjFltHealthMetdata.Add(nameof(isRunning), isRunning);
                prjFltHealthMetdata.Add(nameof(isAutoLoggerEnabled), isAutoLoggerEnabled);
                tracer.RelatedEvent(EventLevel.Informational, $"{nameof(TryEnablePrjFlt)}_Summary", prjFltHealthMetdata, Keywords.Telemetry);

                return(isInstalled && isRunning);
            }
        }