private void pushLogs(DataBufferName bufferName, string age)
        {
            if (IsTransferInProgress())
            {
                TransferErrorMessage.Text    = "Another transfer is in progress. Please wait for this transfer to complete before requesting another.";
                TransferErrorMessage.Visible = true;

                return;
            }

            var queueName = "hellofabric-" + Guid.NewGuid().ToString().ToLowerInvariant();

            var manager = new DeploymentDiagnosticManager(RoleEnvironment.GetConfigurationSettingValue("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"),
                                                          RoleEnvironment.DeploymentId);

            foreach (var role in manager.GetRoleNames())
            {
                foreach (var instanceManager in manager.GetRoleInstanceDiagnosticManagersForRole(role))
                {
                    var guid = instanceManager.BeginOnDemandTransfer(bufferName, getTransferParameters(age, queueName));
                    System.Diagnostics.Trace.WriteLine(string.Format("data transfer started for role {0}...", role));
                }
            }

            TransferProgressPanel.Visible = true;
            TransferSetupPanel.Visible    = false;
        }
Exemplo n.º 2
0
		private static Guid Transfer(RoleInstanceDiagnosticManager ridm, DataBufferName dataBufferName)
		{
			ridm.CancelOnDemandTransfers(dataBufferName);

			var transferOptions = new OnDemandTransferOptions
															{
																From = DateTime.MinValue,
																To = DateTime.UtcNow,
																LogLevelFilter = LogLevel.Undefined
															};

			return ridm.BeginOnDemandTransfer(dataBufferName, transferOptions);
		}
        private void pushLogs(DataBufferName bufferName, string age)
        {
            if (IsTransferInProgress())
            {
                TransferErrorMessage.Text = "Another transfer is in progress. Please wait for this transfer to complete before requesting another.";
                TransferErrorMessage.Visible = true;

                return;
            }

            var queueName = "hellofabric-" + Guid.NewGuid().ToString().ToLowerInvariant();

            var manager = new DeploymentDiagnosticManager(RoleEnvironment.GetConfigurationSettingValue("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"),
                                                           RoleEnvironment.DeploymentId);
            foreach (var role in manager.GetRoleNames())
            {
                foreach (var instanceManager in manager.GetRoleInstanceDiagnosticManagersForRole(role))
                {
                    var guid = instanceManager.BeginOnDemandTransfer(bufferName, getTransferParameters(age, queueName));
                    System.Diagnostics.Trace.WriteLine(string.Format("data transfer started for role {0}...", role));
                }
            }

            TransferProgressPanel.Visible = true;
            TransferSetupPanel.Visible = false;
        }