未验证 提交 e74637a2 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

GC time metrics should be total time. (#3216)

* GC time metrics should be total time.

* Add it to change log.

* FYI @hanamily you missed to change this in self observability.
上级 7e0400dc
......@@ -52,6 +52,7 @@ Release Notes.
* Totally remove `IDs can't be null` log, to avoid misleading.
* Fix provider has been initialized repeatedly.
* Adjust providers conflict log message.
* Fix using wrong gc time metrics in OAL.
#### UI
* Fix refresh is not working after endpoint and instance changed.
......
......@@ -77,8 +77,8 @@ instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).longAvg();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).sum();
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();
......
......@@ -23,7 +23,9 @@ import io.prometheus.client.hotspot.*;
import java.io.IOException;
import org.apache.skywalking.oap.server.library.module.*;
import org.apache.skywalking.oap.server.telemetry.TelemetryModule;
import org.apache.skywalking.oap.server.telemetry.api.MetricsCollector;
import org.apache.skywalking.oap.server.telemetry.api.MetricsCreator;
import org.apache.skywalking.oap.server.telemetry.none.MetricsCollectorNoop;
/**
* Start the Prometheus
......@@ -51,6 +53,7 @@ public class PrometheusTelemetryProvider extends ModuleProvider {
@Override public void prepare() throws ServiceNotProvidedException, ModuleStartException {
this.registerServiceImplementation(MetricsCreator.class, new PrometheusMetricsCreator());
this.registerServiceImplementation(MetricsCollector.class, new MetricsCollectorNoop());
try {
new HTTPServer(config.getHost(), config.getPort());
} catch (IOException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册