internal void EnsureCorrectWinFabManifestVersionLoaded(string lttngFolderFullPath)
        {
            try
            {
                bool exactMatch;
                if (this.winFabManifestMgr != null)
                {
                    this.winFabManifestMgr.EnsureCorrectWinFabManifestVersionLoaded(
                        LttTraceProcessor.GetLttngTracesSFVersionFromFolder(lttngFolderFullPath),
                        out exactMatch);

                    if (false == exactMatch)
                    {
                        this.traceSource.WriteWarning(
                            this.logSourceId,
                            "Exact manifest match not found for ETL file {0}. We will make a best-effort attempt to decode it with the manifests available.",
                            lttngFolderFullPath);
                    }
                }
                else
                {
                    this.traceSource.WriteError(
                        this.logSourceId,
                        "Manifest manager has not been initialized");
                }
            }
            catch (Exception e)
            {
                this.traceSource.WriteError(
                    this.logSourceId,
                    "Exception encountered while identifying the Service Fabric manifests available. Exception information: {0}",
                    e);
            }
        }
        internal LttProducerWorker(LttProducerWorkerParameters initParam)
        {
            this.traceSource = new FabricEvents.ExtensionsEvents(FabricEvents.Tasks.FabricDCA);
            this.logSourceId = string.Concat(initParam.LatestSettings.ApplicationInstanceId, "_", initParam.LatestSettings.SectionName);

            this.traceSource.WriteInfo(
                this.logSourceId,
                "LttProducer: ApplicationInstanceId:{0} SectionName:{1} LogDirectory:{2} WorkDirectory:{0}",
                initParam.LatestSettings.ApplicationInstanceId,
                initParam.LatestSettings.SectionName,
                initParam.LogDirectory,
                initParam.LatestSettings.WorkDirectory);

            this.applicationInstanceId  = initParam.LatestSettings.ApplicationInstanceId;
            this.lttngTracesDirectory   = Path.Combine(initParam.LogDirectory, LttProducerConstants.LttSubDirectoryUnderLogDirectory);
            this.dtrTracesDirectory     = Path.Combine(initParam.LogDirectory, LttProducerConstants.DtrSubDirectoryUnderLogDirectory);
            this.LttReadIntervalMinutes = initParam.LttReadIntervalMinutes;

            // splitting sinks into their two different supported types
            var sinks = InitializeSinks(initParam.LttProducers,
                                        new List <string>()
            {
                this.dtrTracesDirectory
            },
                                        message => this.traceSource.WriteError(this.logSourceId, message)).AsReadOnly();

            this.sinksIEtlFile = (sinks.Where(s => s is IEtlFileSink)).Select(s => s as IEtlFileSink).ToList().AsReadOnly();
            this.sinksICsvFile = (sinks.Where(s => s is ICsvFileSink)).Select(s => s as ICsvFileSink).ToList().AsReadOnly();

            this.traceSource.WriteInfo(
                this.logSourceId,
                "Total number of sinks: {0}, IEtlFileSinks: {1}, ICsvFileSinks: {2}",
                sinks.Count,
                this.sinksIEtlFile.Count,
                this.sinksICsvFile.Count);

            this.lastReadTimestampUnixEpochNanoSec = this.InitializeLastReadTimestamp();

            this.lttngTraceProcessor = new LttTraceProcessor(
                this.traceSource,
                this.logSourceId,
                this.dtrTracesDirectory,
                this.sinksIEtlFile,
                this.sinksICsvFile);

            // getting active service fabric lttng trace session
            this.activeLttTraceSessionOutputPath = this.GetServiceFabricSessionOutputPath();

            // try to process existing traces left from previous session
            this.ProcessPreviousLttSessionTraces(this.activeLttTraceSessionOutputPath);

            string timerId = string.Concat(initParam.LatestSettings.ApplicationInstanceId,
                                           LttProducerConstants.LttTimerPrefix);

            this.LttReadTimer = new DcaTimer(
                timerId,
                this.LttReadCallback,
                this.LttReadIntervalMinutes * 60 * 1000);
            this.LttReadTimer.Start();
        }