未验证 提交 1bd397db 编写于 作者: A Ax1an 提交者: GitHub

Add telemetry data about mesh error. (#6550)

上级 cc60f152
......@@ -46,7 +46,7 @@ Release Notes.
* Save Envoy http access logs when error occurs.
* Fix wrong `service_instance_sla` setting in the `topology-instance.yml`.
* Fix wrong metrics name setting in the `self-observability.yml`.
* Add telemetry data about metrics in, metrics scraping and trace in metrics to zipkin receiver.
* Add telemetry data about metrics in, metrics scraping, mesh error and trace in metrics to zipkin receiver.
* Fix tags store of log and trace on h2/mysql/pg storage.
* Merge indices by Metrics Function and Meter Function in Elasticsearch Storage.
* Fix receiver don't need to get itself when healthCheck
......
......@@ -38,6 +38,7 @@ import org.apache.skywalking.oap.server.core.source.ServiceRelation;
import org.apache.skywalking.oap.server.core.source.SourceReceiver;
import org.apache.skywalking.oap.server.library.module.ModuleManager;
import org.apache.skywalking.oap.server.telemetry.TelemetryModule;
import org.apache.skywalking.oap.server.telemetry.api.CounterMetrics;
import org.apache.skywalking.oap.server.telemetry.api.HistogramMetrics;
import org.apache.skywalking.oap.server.telemetry.api.MetricsCreator;
import org.apache.skywalking.oap.server.telemetry.api.MetricsTag;
......@@ -51,6 +52,7 @@ public class TelemetryDataDispatcher {
private static SourceReceiver SOURCE_RECEIVER;
private static NamingControl NAME_LENGTH_CONTROL;
private static HistogramMetrics MESH_ANALYSIS_METRICS;
private static CounterMetrics MESH_ERROR_METRICS;
private TelemetryDataDispatcher() {
}
......@@ -67,11 +69,14 @@ public class TelemetryDataDispatcher {
"mesh_analysis_latency", "The process latency of service mesh telemetry", MetricsTag.EMPTY_KEY,
MetricsTag.EMPTY_VALUE
);
MESH_ERROR_METRICS = metricsCreator.createCounter("mesh_analysis_error_count", "The error number of mesh analysis",
MetricsTag.EMPTY_KEY,
MetricsTag.EMPTY_VALUE
);
}
public static void process(ServiceMeshMetric.Builder data) {
HistogramMetrics.Timer timer = MESH_ANALYSIS_METRICS.createTimer();
try {
try (HistogramMetrics.Timer ignored = MESH_ANALYSIS_METRICS.createTimer()) {
if (data.getSourceServiceName() != null) {
data.setSourceServiceName(NAME_LENGTH_CONTROL.formatServiceName(data.getSourceServiceName()));
}
......@@ -93,8 +98,9 @@ public class TelemetryDataDispatcher {
}
doDispatch(data);
} finally {
timer.finish();
} catch (Exception e) {
MESH_ERROR_METRICS.inc();
log.error(e.getMessage(), e);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册