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.
This commit is contained in:
吴晟 Wu Sheng 2019-08-05 11:46:12 +08:00 committed by GitHub
parent 7e0400dc00
commit e74637a261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -52,6 +52,7 @@ Release Notes.
* Totally remove `IDs can't be null` log, to avoid misleading. * Totally remove `IDs can't be null` log, to avoid misleading.
* Fix provider has been initialized repeatedly. * Fix provider has been initialized repeatedly.
* Adjust providers conflict log message. * Adjust providers conflict log message.
* Fix using wrong gc time metrics in OAL.
#### UI #### UI
* Fix refresh is not working after endpoint and instance changed. * Fix refresh is not working after endpoint and instance changed.

View File

@ -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_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).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_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_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).longAvg(); 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_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum(); instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();

View File

@ -23,7 +23,9 @@ import io.prometheus.client.hotspot.*;
import java.io.IOException; import java.io.IOException;
import org.apache.skywalking.oap.server.library.module.*; import org.apache.skywalking.oap.server.library.module.*;
import org.apache.skywalking.oap.server.telemetry.TelemetryModule; 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.api.MetricsCreator;
import org.apache.skywalking.oap.server.telemetry.none.MetricsCollectorNoop;
/** /**
* Start the Prometheus * Start the Prometheus
@ -51,6 +53,7 @@ public class PrometheusTelemetryProvider extends ModuleProvider {
@Override public void prepare() throws ServiceNotProvidedException, ModuleStartException { @Override public void prepare() throws ServiceNotProvidedException, ModuleStartException {
this.registerServiceImplementation(MetricsCreator.class, new PrometheusMetricsCreator()); this.registerServiceImplementation(MetricsCreator.class, new PrometheusMetricsCreator());
this.registerServiceImplementation(MetricsCollector.class, new MetricsCollectorNoop());
try { try {
new HTTPServer(config.getHost(), config.getPort()); new HTTPServer(config.getHost(), config.getPort());
} catch (IOException e) { } catch (IOException e) {