metrics.incrementSubscriptionCounter(AtomicInterest.Application, app); metrics.decrementSubscriptionCounter(AtomicInterest.Application, app); metrics.incrementSubscriptionCounter(AtomicInterest.Vip, vip); metrics.decrementSubscriptionCounter(AtomicInterest.Vip, vip); metrics.incrementSubscriptionCounter(AtomicInterest.Instance, instance); metrics.decrementSubscriptionCounter(AtomicInterest.Instance, instance); metrics.decrementSubscriptionCounter(AtomicInterest.InterestAll, null); metrics.incrementSubscriptionCounter(AtomicInterest.InterestAll, null);
public void incrementApplicationNotificationCounter(String applicationName) { getApplicationNotificationCounter(applicationName).increment(); }
@Override public void onNext(ChangeNotification<InstanceInfo> notification) { metrics.incrementApplicationNotificationCounter(notification.getData().getApp()); Observable<Void> sendResult = sendNotification(notification); if(sendResult != null) { subscribeToTransportSend(sendResult, "notification"); } else { // TODO: how to report effectively invariant violations that should never happen in a valid code, but are not errors? logger.warn("No-effect modify in the interest channel: {}", notification); } } });
bind(EurekaClientConnectionMetrics.class).annotatedWith(Names.named("replication")).toInstance(new EurekaClientConnectionMetrics("replication")); bind(InterestChannelMetrics.class).toInstance(new InterestChannelMetrics());
public static EurekaServerMetricFactory serverMetrics() { if (INSTANCE == null) { synchronized (EurekaServerMetricFactory.class) { MessageConnectionMetrics registrationConnectionMetrics = new MessageConnectionMetrics("registration"); registrationConnectionMetrics.bindMetrics(); MessageConnectionMetrics replicationConnectionMetrics = new MessageConnectionMetrics("replication"); replicationConnectionMetrics.bindMetrics(); MessageConnectionMetrics discoveryConnectionMetrics = new MessageConnectionMetrics("discovery"); discoveryConnectionMetrics.bindMetrics(); InterestChannelMetrics interestChannelMetrics = new InterestChannelMetrics(); interestChannelMetrics.bindMetrics(); INSTANCE = new EurekaServerMetricFactory( registrationConnectionMetrics, replicationConnectionMetrics, discoveryConnectionMetrics, interestChannelMetrics ); } } return INSTANCE; } }
public void incrementSubscriptionCounter(AtomicInterest interestType, String id) { if (interestType == AtomicInterest.Instance) { ServoUtils.incrementLongGauge(totalInstanceInterests); } if (interestType == AtomicInterest.InterestAll) { ServoUtils.incrementLongGauge(interestAllCounter); } else { ServoUtils.incrementLongGauge(getSubscriptionCounter(new InterestKey(interestType, id))); } }
this.metrics.incrementStateCounter(STATES.Open);
bind(InterestChannelMetrics.class).toInstance(new InterestChannelMetrics());
public void decrementSubscriptionCounter(AtomicInterest interestType, String id) { if (interestType == AtomicInterest.Instance) { ServoUtils.decrementLongGauge(totalInstanceInterests); } if (interestType == AtomicInterest.InterestAll) { ServoUtils.decrementLongGauge(interestAllCounter); } else { ServoUtils.decrementLongGauge(getSubscriptionCounter(new InterestKey(interestType, id))); } }
bind(InterestChannelMetrics.class).toInstance(new InterestChannelMetrics());