You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/01/09 09:41:29 UTC

[incubator-skywalking] branch prometheus-improve updated: Set uptime to second.

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch prometheus-improve
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/prometheus-improve by this push:
     new d91b63b  Set uptime to second.
d91b63b is described below

commit d91b63bfdb0c72fa51d06fdfe55c062ebea433d8
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Wed Jan 9 17:41:19 2019 +0800

    Set uptime to second.
---
 .../org/apache/skywalking/oap/server/starter/OAPServerStartUp.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
index 5e008be..a8e40d6 100644
--- a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
+++ b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
@@ -45,7 +45,8 @@ public class OAPServerStartUp {
 
             manager.find(TelemetryModule.NAME).provider().getService(MetricCreator.class).createGauge("uptime",
                 "oap server start up time", MetricTag.EMPTY_KEY, MetricTag.EMPTY_VALUE)
-                .setValue(TimeBucketUtils.INSTANCE.getMinuteTimeBucket(System.currentTimeMillis()));
+                // Set uptime to second
+                .setValue(System.currentTimeMillis() / 1000);
 
             if (RunningMode.isInitMode()) {
                 logger.info("OAP starts up in init mode successfully, exit now...");