Update metric name

This commit is contained in:
Chris Eager 2022-11-08 11:15:42 -06:00
parent 681a5bafb4
commit e6e6eb323d
1 changed files with 3 additions and 3 deletions

View File

@ -85,8 +85,8 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
"messageAvailableAfterClientClosed"); "messageAvailableAfterClientClosed");
private static final String SEND_MESSAGES_FLUX_NAME = MetricsUtil.name(WebSocketConnection.class, private static final String SEND_MESSAGES_FLUX_NAME = MetricsUtil.name(WebSocketConnection.class,
"sendMessages"); "sendMessages");
private static final String SEND_MESSAGE_TIMEOUT_COUNTER = MetricsUtil.name(WebSocketConnection.class, private static final String SEND_MESSAGE_ERROR_COUNTER = MetricsUtil.name(WebSocketConnection.class,
"sendMessageTimeout"); "sendMessageError");
private static final String STATUS_CODE_TAG = "status"; private static final String STATUS_CODE_TAG = "status";
private static final String STATUS_MESSAGE_TAG = "message"; private static final String STATUS_MESSAGE_TAG = "message";
private static final String ERROR_TYPE_TAG = "errorType"; private static final String ERROR_TYPE_TAG = "errorType";
@ -444,7 +444,7 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
final Tags tags = Tags.of( final Tags tags = Tags.of(
UserAgentTagUtil.getPlatformTag(client.getUserAgent()), UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
Tag.of(ERROR_TYPE_TAG, errorType)); Tag.of(ERROR_TYPE_TAG, errorType));
Metrics.counter(SEND_MESSAGE_TIMEOUT_COUNTER, tags).increment(); Metrics.counter(SEND_MESSAGE_ERROR_COUNTER, tags).increment();
})) }))
.doOnError(queueCleared::completeExceptionally) .doOnError(queueCleared::completeExceptionally)
.doOnComplete(() -> queueCleared.complete(null)) .doOnComplete(() -> queueCleared.complete(null))