Skip to content

Commit 72c7b97

Browse files
authored
replace slotId tag with clientId (#764)
In pushServer the slotId tag cardinality is too big and we can achieve similar granularity using combination of clientId + infra tags
1 parent 515c38e commit 72c7b97

File tree

1 file changed

+2
-3
lines changed
  • mantis-network/src/main/java/io/reactivex/mantis/network/push

1 file changed

+2
-3
lines changed

Diff for: mantis-network/src/main/java/io/reactivex/mantis/network/push/PushServer.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ protected Observable<Void> manageConnectionWithCompression(final DefaultChannelW
245245
groupId = id;
246246
}
247247

248-
final BasicTag slotIdTag = new BasicTag("slotId", slotId);
248+
final BasicTag clientIdTag = new BasicTag(CLIENT_ID_TAG_NAME, Optional.ofNullable(groupId).orElse("none"));
249249

250250
SerializedSubject<List<byte[]>, List<byte[]>> subject
251251
= new SerializedSubject<>(PublishSubject.<List<byte[]>>create());
252-
Observable<List<byte[]>> observable = subject.lift(new DropOperator<>("batch_writes", slotIdTag));
252+
Observable<List<byte[]>> observable = subject.lift(new DropOperator<>("batch_writes", clientIdTag));
253253

254254
if (applySampling) {
255255
observable =
@@ -266,7 +266,6 @@ protected Observable<Void> manageConnectionWithCompression(final DefaultChannelW
266266
);
267267
}
268268

269-
final BasicTag clientIdTag = new BasicTag(CLIENT_ID_TAG_NAME, Optional.ofNullable(groupId).orElse("none"));
270269
Metrics writableMetrics = new Metrics.Builder()
271270
.id("PushServer", clientIdTag)
272271
.addCounter("channelWritable")

0 commit comments

Comments
 (0)