private void PatchInstallationEvent()

in src/PatchOrchestrationApplication/TelemetryLib/src/TelemetryEvents.cs [98:142]


        private void PatchInstallationEvent(
            string clusterId,
            string tenantId,
            string clusterType,
            string applicationVersion,
            string nodeName,
            string updateFrequency,
            string updateQuery,
            string approvalPolicy,
            double totalInstallations,
            double successfulInstallations,
            string operationResult)
        {
            this.eventSource.PatchInstallationTelemetryEvent(
                clusterId,
                tenantId,
                clusterType,
                nodeName,
                updateFrequency,
                updateQuery,
                approvalPolicy,
                applicationVersion,
                totalInstallations,
                successfulInstallations,
                operationResult);

            IDictionary<string, string> eventProperties = new Dictionary<string, string>();
            eventProperties.Add("ClusterId", clusterId);
            eventProperties.Add("TenantId", tenantId);
            eventProperties.Add("clusterType", clusterType);
            eventProperties.Add("applicationVersion", applicationVersion);
            eventProperties.Add("NodeNameHash", (nodeName.GetHashCode()).ToString());
            eventProperties.Add("updateFrequency", updateFrequency);
            eventProperties.Add("updateQuery", updateQuery);
            eventProperties.Add("approvalPolicy", approvalPolicy);
            eventProperties.Add("operationResult", operationResult);

            IDictionary<string, double> eventMetrics = new Dictionary<string, double>();
            eventMetrics.Add("totalInstallations", totalInstallations);
            eventMetrics.Add("successfulInstallations", successfulInstallations);
            this.telemetryClient.TrackEvent(InstallationEventName, eventProperties, eventMetrics);
            this.telemetryClient.Flush();
            // allow time for flushing
            System.Threading.Thread.Sleep(1000);
        }