|
@@ -111,7 +111,7 @@ func (s *TraceKafkaSink) parseMetricResources(data ServiceMetricData) *pb.NmsRec
|
|
|
serviceCallCount := strconv.FormatInt(data.GetCallCount(), 10)
|
|
|
serviceFailCount := strconv.FormatInt(data.GetFailCount(), 10)
|
|
|
serviceExceptionCount := strconv.FormatInt(data.GetExceptionCount(), 10)
|
|
|
- serviceAvgResponseTime := strconv.FormatInt(data.GetAvgResponseTime(), 10)
|
|
|
+ serviceAvgResponseTime := strconv.FormatInt(data.GetAvgResponseTimeMS(), 10)
|
|
|
serviceMetricResource.Metric = append(serviceMetricResource.Metric,
|
|
|
&pb.NmsRecvMetricRequestBody_Metric{
|
|
|
MetricCode: &serviceMetricNameCode,
|
|
@@ -164,7 +164,7 @@ func (s *TraceKafkaSink) parseMetricResources(data ServiceMetricData) *pb.NmsRec
|
|
|
instanceCallCount := strconv.FormatInt(instanceMetric.GetCallCount(), 10)
|
|
|
instanceFailedCount := strconv.FormatInt(instanceMetric.GetFailCount(), 10)
|
|
|
instanceExceptionCount := strconv.FormatInt(instanceMetric.GetExceptionCount(), 10)
|
|
|
- instanceAvgResponseTime := strconv.FormatInt(instanceMetric.GetAvgResponseTime(), 10)
|
|
|
+ instanceAvgResponseTime := strconv.FormatInt(instanceMetric.GetAvgResponseTimeMS(), 10)
|
|
|
serviceInstanceResource.Metric = []*pb.NmsRecvMetricRequestBody_Metric{
|
|
|
{
|
|
|
MetricCode: &serviceInstanceNameInstanceID,
|
|
@@ -219,7 +219,7 @@ func (s *TraceKafkaSink) parseMetricResources(data ServiceMetricData) *pb.NmsRec
|
|
|
cpCallCount := strconv.FormatInt(mt.GetCallCount(), 10)
|
|
|
epFailedCount := strconv.FormatInt(mt.GetFailedCount(), 10)
|
|
|
epExceptionCount := strconv.FormatInt(mt.GetExceptionCount(), 10)
|
|
|
- epAvgResponseTime := strconv.FormatInt(mt.GetAvgResponseTime(), 10)
|
|
|
+ epAvgResponseTime := strconv.FormatInt(mt.GetAvgResponseTimeMS(), 10)
|
|
|
epApdex := strconv.FormatFloat(mt.GetApdex(), 'f', 2, 64)
|
|
|
epSlowCount := strconv.FormatInt(mt.GetSlowCount(), 10)
|
|
|
epStatementCount := strconv.FormatInt(mt.GetStatementCount(), 10)
|
|
@@ -336,7 +336,6 @@ func (s *TraceKafkaSink) sendMetric(metricData ServiceMetricData, writer *kafka.
|
|
|
Body: &requestBody,
|
|
|
}
|
|
|
instanceCount := len(metricData.InstanceMetrics)
|
|
|
- endpointCount := metricData.GetEndPointCount()
|
|
|
for _, instanceMetric := range metricData.InstanceMetrics {
|
|
|
for _, endpointMetric := range instanceMetric.EndpointMetrics {
|
|
|
s.metricCounter.With(prometheus.Labels{
|
|
@@ -347,7 +346,7 @@ func (s *TraceKafkaSink) sendMetric(metricData ServiceMetricData, writer *kafka.
|
|
|
}
|
|
|
}
|
|
|
s.logger.Infof("[i6000]: [发送] [metric], 时间: %s 包含ServiceMetricResource:serviceName:%s, "+
|
|
|
- "instanceCount%d: endpointCount:%d", dtStr, metricData.ServiceName, instanceCount, endpointCount)
|
|
|
+ "instanceCount%d: endpoints:%s", dtStr, metricData.ServiceName, instanceCount, metricData.GetEndPointsStr())
|
|
|
bs, errMarshal := proto.Marshal(&nmsRequest)
|
|
|
if errMarshal != nil {
|
|
|
s.logger.Errorf("marshal nmsReceiveMetric failed: %v", errMarshal)
|
|
@@ -381,7 +380,9 @@ func (s *TraceKafkaSink) sendTrace(topoData TopoData, wr *kafka.Writer) {
|
|
|
"destServiceName": topoData.DestServiceName,
|
|
|
"destEndpoint": topoData.DestEndpoint,
|
|
|
}).Inc()
|
|
|
- s.logger.Infof("[i6000]: [发送] [topo], 时间: %s 包含topo:%+v", dt, topoData)
|
|
|
+ s.logger.Infof("[i6000]: [发送] [topo], 包含topo:,%s,%s,%s,%s,%s,%s,%s", dt,
|
|
|
+ topoData.TxServiceName, topoData.TxEndpoint, topoData.SrcServiceName, topoData.SrcEndpoint,
|
|
|
+ topoData.DestServiceName, topoData.DestEndpoint)
|
|
|
intervalMinuteUnit := "MI"
|
|
|
intervalMinute := int32(5)
|
|
|
destNodeType := pb.NodeType_SERVICE
|