예제 #1
0
 public virtual void LogDeployedServicePackageHealthState(
     DeployedServicePackageEntity deployedServicePackage)
 {
     MonitoringEventSource.Current.LogDeployedServicePackageHealthState(
         deployedServicePackage.ClusterName,
         deployedServicePackage.ApplicationName,
         deployedServicePackage.ServiceManifestName,
         deployedServicePackage.NodeName,
         deployedServicePackage.Health.AggregatedHealthState.ToString(),
         deployedServicePackage.Health.GetHealthEvaluationString());
 }
예제 #2
0
 public override void EmitDeployedServicePackageHealthState(
     DeployedServicePackageEntity deployedServicePackage)
 {
     AppendToFile(
         string.Format(
             "deployedServicePackageHealthMetric: ClusterName: {0}, AppName: {2}, ServiceManifestName: {3}, NodeName: {4}, HealthState: {1}",
             deployedServicePackage.ClusterName,
             deployedServicePackage.Health.AggregatedHealthState.ToString(),
             deployedServicePackage.ApplicationName,
             deployedServicePackage.ServiceManifestName,
             deployedServicePackage.NodeName));
 }
예제 #3
0
 public override void EmitDeployedServicePackageHealthEvent(
     DeployedServicePackageEntity deployedServicePackage, EntityHealthEvent healthEvent)
 {
     AppendHealthEventToFile(
         string.Format(
             "deployedServicePackageHealthEventMetric: ClusterName: {0}, AppName: {1}, ServiceManifestName: {2}, NodeName: {3}",
             deployedServicePackage.ClusterName,
             deployedServicePackage.ApplicationName,
             deployedServicePackage.ServiceManifestName,
             deployedServicePackage.NodeName),
         healthEvent);
 }
예제 #4
0
 public override void LogDeployedServicePackageHealthState(
     DeployedServicePackageEntity deployedServicePackage)
 {
     AppendToFile(
         string.Format(
             "LogDeployedServicePackageHealthState: ClusterName: {0}, AppName:{3}, ServiceManifestName:{4} NodeName:{5}, HealthState: {1}, EvaluationString: {2}",
             deployedServicePackage.ClusterName,
             deployedServicePackage.Health.AggregatedHealthState.ToString(),
             deployedServicePackage.Health.GetHealthEvaluationString(),
             deployedServicePackage.ApplicationName,
             deployedServicePackage.ServiceManifestName,
             deployedServicePackage.NodeName));
 }
예제 #5
0
        public virtual void EmitDeployedServicePackageHealthState(
            DeployedServicePackageEntity deployedServicePackage)
        {
            if (!this.isMetricsEnabled)
            {
                return;
            }

            this.deployedServicePackageHealthMetric.LogValue(
                1,
                deployedServicePackage.ClusterName,
                deployedServicePackage.ApplicationName,
                deployedServicePackage.ServiceManifestName,
                deployedServicePackage.NodeName,
                deployedServicePackage.Health.AggregatedHealthState.ToString());
        }
예제 #6
0
 public virtual void LogDeployedServicePackageHealthEvent(
     DeployedServicePackageEntity deployedServicePackage,
     EntityHealthEvent healthEvent)
 {
     MonitoringEventSource.Current.LogDeployedServicePackageHealthEvent(
         deployedServicePackage.ClusterName,
         deployedServicePackage.ApplicationName,
         deployedServicePackage.ServiceManifestName,
         deployedServicePackage.NodeName,
         healthEvent.HealthState.ToString(),
         healthEvent.Description,
         healthEvent.Property,
         healthEvent.SequenceNumber.ToString(),
         healthEvent.SourceId,
         healthEvent.IsExpired.ToString());
 }
예제 #7
0
        public override Task ProcessDeployedServicePackageHealthAsync(DeployedServicePackageEntity deployedServicePackage)
        {
            this.eventWriter.LogDeployedServicePackageHealthState(deployedServicePackage);
            this.metrics.EmitDeployedServicePackageHealthState(deployedServicePackage);

            if (deployedServicePackage.IsHealthEventReportingEnabled(
                    deployedServicePackage.ApplicationName,
                    deployedServicePackage.Health.AggregatedHealthState))
            {
                deployedServicePackage.Health.HealthEvents
                .ForEachHealthEvent(healthEvent =>
                {
                    this.eventWriter.LogDeployedServicePackageHealthEvent(deployedServicePackage, healthEvent);
                });
            }

            return(this.completedTask);
        }
예제 #8
0
        public virtual void EmitDeployedServicePackageHealthEvent(
            DeployedServicePackageEntity deployedServicePackage, EntityHealthEvent healthEvent)
        {
            if (!this.isMetricsEnabled)
            {
                return;
            }

            this.deployedServicePackageHealthEventMetric.LogValue(
                1,
                deployedServicePackage.ClusterName,
                deployedServicePackage.ApplicationName,
                deployedServicePackage.ServiceManifestName,
                deployedServicePackage.NodeName,
                healthEvent.HealthState.ToString(),
                healthEvent.SourceId,
                healthEvent.Property,
                healthEvent.IsExpired.ToString());
        }