コード例 #1
0
        private void BuildTelemetrySyncTask()
        {
            var httpClient   = new SplitioHttpClient(ApiKey, _config.HttpConnectionTimeout, GetHeaders());
            var telemetryAPI = new TelemetryAPI(httpClient, _config.TelemetryServiceURL, _telemetryRuntimeProducer);

            _telemetrySyncTask = new TelemetrySyncTask(_telemetryStorageConsumer, telemetryAPI, _splitCache, _segmentCache, _config, FactoryInstantiationsService.Instance(), _wrapperAdapter, _tasksManager);
        }
コード例 #2
0
ファイル: CmdletBase.cs プロジェクト: cvbarros/oneget
 //Calling PowerShell Telemetry APIs
 protected void TraceMessage(string message, SoftwareIdentity swidObject)
 {
     TelemetryAPI.TraceMessage(message,
                               new {
         PackageName         = swidObject.Name,
         PackageVersion      = swidObject.Version,
         PackageProviderName = swidObject.ProviderName,
         Repository          = swidObject.Source,
         ExuectionStatus     = swidObject.Status,
         ExecutionTime       = DateTime.Today
     });
 }
コード例 #3
0
ファイル: Telemetry.cs プロジェクト: ahmed605/ZuneShell.dll
        private void SendTelemetry(object state)
        {
            TelemetryInfo telemetryInfo = (TelemetryInfo)state;

            telemetryInfo.Args.Add("@epochTime", telemetryInfo.elapsedTime);
            if (telemetryInfo.fSessionDatapoint)
            {
                int    int32 = Convert.ToInt32(telemetryInfo.Args["@Data"]);
                string key   = telemetryInfo.Args["@EventType"].ToString();
                TelemetryAPI.AddToSessionEvent(telemetryInfo.eEvent, key, int32);
            }
            else if (telemetryInfo.eEvent == ETelemetryEvent.eTelemetryEventUndefined)
            {
                TelemetryAPI.SendDatapoint(telemetryInfo.dcsUri, telemetryInfo.Args);
            }
            else if (telemetryInfo.Args.Contains("@EventType"))
            {
                TelemetryAPI.SendEvent(telemetryInfo.eEvent, telemetryInfo.Args["@EventType"].ToString());
            }
            else
            {
                TelemetryAPI.SendEvent(telemetryInfo.eEvent, null);
            }
        }