diff --git a/build/src/main/resources/agent.properties b/build/src/main/resources/agent.properties index 57429a71..b3effb7b 100644 --- a/build/src/main/resources/agent.properties +++ b/build/src/main/resources/agent.properties @@ -36,9 +36,18 @@ plugin.observability.global.metric.enabled=true plugin.observability.global.metric.interval=30 plugin.observability.global.metric.topic=application-metrics plugin.observability.global.metric.url=/application-metrics + +## +# if different with reporter.outputServer.appendType, +# following options can be used in user config file to override +# the default or global one +# +## when it's scrape by prometheus, noop can be used +# plugin.observability.global.metric.appendType=noop +## for debug, console can be used # plugin.observability.global.metric.appendType=console -## output by http -#plugin.observability.global.metric.appendType=http +# plugin.observability.global.metric.appendType=http +# # add service name to header enabled by name for easemesh plugin.integrability.global.addServiceNameHead.enabled=true # redirect the middleware address when env has address, see: com.megaease.easeagent.plugin.api.middleware.RedirectProcessor diff --git a/config/src/main/java/com/megaease/easeagent/config/report/ReportConfigConst.java b/config/src/main/java/com/megaease/easeagent/config/report/ReportConfigConst.java index 1ed31fde..0d78acd2 100644 --- a/config/src/main/java/com/megaease/easeagent/config/report/ReportConfigConst.java +++ b/config/src/main/java/com/megaease/easeagent/config/report/ReportConfigConst.java @@ -26,6 +26,8 @@ private ReportConfigConst() {} public static final String CONSOLE_SENDER_NAME = "console"; public static final String ZIPKIN_SENDER_NAME = "http"; + public static final String NOOP_SENDER_NAME = "noop"; + public static final String SPAN_JSON_ENCODER_NAME = "SpanJsonEncoder"; public static final String METRIC_JSON_ENCODER_NAME = "MetricJsonEncoder"; public static final String LOG_DATA_JSON_ENCODER_NAME = "LogDataJsonEncoder"; diff --git a/doc/images/grafana-tracing.png b/doc/images/grafana-tracing.png index a3aea4e2..33f46623 100644 Binary files a/doc/images/grafana-tracing.png and b/doc/images/grafana-tracing.png differ diff --git a/report/src/main/java/com/megaease/easeagent/report/sender/NoOpSender.java b/report/src/main/java/com/megaease/easeagent/report/sender/NoOpSender.java index 7f3282e7..547f406a 100644 --- a/report/src/main/java/com/megaease/easeagent/report/sender/NoOpSender.java +++ b/report/src/main/java/com/megaease/easeagent/report/sender/NoOpSender.java @@ -17,6 +17,8 @@ */ package com.megaease.easeagent.report.sender; +import com.google.auto.service.AutoService; +import com.megaease.easeagent.config.report.ReportConfigConst; import com.megaease.easeagent.plugin.api.config.Config; import com.megaease.easeagent.plugin.report.Call; import com.megaease.easeagent.plugin.report.EncodedData; @@ -26,12 +28,13 @@ import java.io.IOException; import java.util.Map; +@AutoService(Sender.class) public class NoOpSender implements Sender { public static final NoOpSender INSTANCE = new NoOpSender(); @Override public String name() { - return "noop"; + return ReportConfigConst.NOOP_SENDER_NAME; } @Override @@ -41,12 +44,12 @@ public void init(Config config, String prefix) { @Override public Call send(EncodedData encodedData) { - return new NoOpCall<>(); + return NoOpCall.getInstance(NoOpSender.class); } @Override public boolean isAvailable() { - return false; + return true; } @Override