Skip to content

Commit

Permalink
metric push delay bucket num 30 -> 10 (#320)
Browse files Browse the repository at this point in the history
6.3.0version release

Co-authored-by: 江村 <[email protected]>
  • Loading branch information
huanglongchao and 江村 authored Apr 27, 2023
1 parent 7aee475 commit eb984a8
Show file tree
Hide file tree
Showing 30 changed files with 93 additions and 31 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0-SNAPSHOT
6.3.0
2 changes: 1 addition & 1 deletion client/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-all</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>

<name>${project.groupId}:${project.artifactId}</name>
<url>http://github.com/alipay/sofa-registry</url>
Expand Down
2 changes: 1 addition & 1 deletion client/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion client/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion client/log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>

<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion server/common/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-common</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/common/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-common</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/distribution/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-distribution</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion server/remoting/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-remoting</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/remoting/bolt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-remoting</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/remoting/http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-remoting</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/remoting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/server/data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/server/integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/server/meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/server/session/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,34 +119,96 @@ static final class Push {
.register();
private static final Histogram PUSH_DELAY_HISTOGRAM =
Histogram.build()
.linearBuckets(0, 1000, 30)
.linearBuckets(0, 1000, 15)
.namespace("session")
.subsystem("push")
.name("push_delay")
.help("push delay")
.labelNames("datacenter", "cause", "status")
.register();
private static final Histogram PUSH_DELAY_HISTOGRAM_SUB_OK =
Histogram.build()
.linearBuckets(0, 1000, 15)
.namespace("session")
.subsystem("push_sub_ok")
.name("push_delay")
.help("push delay")
.labelNames("datacenter", "cause", "status")
.register();

private static final Histogram PUSH_DELAY_HISTOGRAM_SUB_FAIL =
Histogram.build()
.linearBuckets(0, 1000, 15)
.namespace("session")
.subsystem("push_sub_fail")
.name("push_delay")
.help("push delay")
.labelNames("datacenter", "cause", "status")
.register();

private static final Histogram PUSH_DELAY_HISTOGRAM_REG_OK =
Histogram.build()
.linearBuckets(0, 1000, 15)
.namespace("session")
.subsystem("push_reg_ok")
.name("push_delay")
.help("push delay")
.labelNames("datacenter", "cause", "status")
.register();

private static final Histogram PUSH_DELAY_HISTOGRAM_REG_FAIL =
Histogram.build()
.linearBuckets(0, 1000, 15)
.namespace("session")
.subsystem("push_reg_fail")
.name("push_delay")
.help("push delay")
.labelNames("datacenter", "cause", "status")
.register();

static void observePushDelayHistogram(
String dataCenter, PushType pushType, long millis, PushTrace.PushStatus status) {
// quick path
if (status == PushTrace.PushStatus.OK) {
if (pushType == PushType.Sub) {
PUSH_DELAY_HISTOGRAM_SUB_OK
.labels(dataCenter, PushType.Sub.name(), PushTrace.PushStatus.OK.name())
.observe(millis);
PUSH_DELAY_HISTOGRAM
.labels(dataCenter, PushType.Sub.name(), PushTrace.PushStatus.OK.name())
.observe(millis);

return;
}
if (pushType == PushType.Reg) {
PUSH_DELAY_HISTOGRAM_REG_OK
.labels(dataCenter, PushType.Reg.name(), PushTrace.PushStatus.OK.name())
.observe(millis);
PUSH_DELAY_HISTOGRAM
.labels(dataCenter, PushType.Reg.name(), PushTrace.PushStatus.OK.name())
.observe(millis);

return;
}
} else {

PUSH_DELAY_HISTOGRAM.labels(dataCenter, pushType.name(), status.name()).observe(millis);

if (pushType == PushType.Sub) {
PUSH_DELAY_HISTOGRAM_SUB_FAIL
.labels(dataCenter, PushType.Sub.name(), PushTrace.PushStatus.Fail.name())
.observe(millis);

return;
}
if (pushType == PushType.Reg) {
PUSH_DELAY_HISTOGRAM_REG_FAIL
.labels(dataCenter, PushType.Reg.name(), PushTrace.PushStatus.Fail.name())
.observe(millis);

return;
}
}
PUSH_DELAY_HISTOGRAM.labels(dataCenter, pushType.name(), status.name()).observe(millis);
}

static final Counter PUSH_EMPTY_SKIP_COUNTER =
Expand Down
2 changes: 1 addition & 1 deletion server/server/shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>registry-server</artifactId>
<groupId>com.alipay.sofa</groupId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion server/store/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-store</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion server/store/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-store</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion server/store/jraft/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-store</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion server/store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down

0 comments on commit eb984a8

Please sign in to comment.