@@ -369,13 +369,11 @@ void recordFinishedAttempt() {
369369 // TODO(songya): remove the deprecated measure constants once they are completed removed.
370370 .put (DeprecatedCensusConstants .RPC_CLIENT_FINISHED_COUNT , 1 )
371371 // The latency is double value
372- .put (
373- DeprecatedCensusConstants .RPC_CLIENT_ROUNDTRIP_LATENCY ,
374- roundtripNanos / NANOS_PER_MILLI )
375- .put (DeprecatedCensusConstants .RPC_CLIENT_REQUEST_COUNT , outboundMessageCount )
376- .put (DeprecatedCensusConstants .RPC_CLIENT_RESPONSE_COUNT , inboundMessageCount )
377- .put (DeprecatedCensusConstants .RPC_CLIENT_REQUEST_BYTES , outboundWireSize )
378- .put (DeprecatedCensusConstants .RPC_CLIENT_RESPONSE_BYTES , inboundWireSize )
372+ .put (RpcMeasureConstants .GRPC_CLIENT_ROUNDTRIP_LATENCY , roundtripNanos / NANOS_PER_MILLI )
373+ .put (RpcMeasureConstants .GRPC_CLIENT_SENT_MESSAGES_PER_RPC , outboundMessageCount )
374+ .put (RpcMeasureConstants .GRPC_CLIENT_RECEIVED_MESSAGES_PER_RPC , inboundMessageCount )
375+ .put (RpcMeasureConstants .GRPC_CLIENT_SENT_BYTES_PER_RPC , outboundWireSize )
376+ .put (RpcMeasureConstants .GRPC_CLIENT_RECEIVED_BYTES_PER_RPC , inboundWireSize )
379377 .put (
380378 DeprecatedCensusConstants .RPC_CLIENT_UNCOMPRESSED_REQUEST_BYTES ,
381379 outboundUncompressedSize )
@@ -443,7 +441,7 @@ static final class CallAttemptsTracerFactory extends
443441 if (module .recordStartedRpcs ) {
444442 // Record here in case newClientStreamTracer() would never be called.
445443 module .statsRecorder .newMeasureMap ()
446- .put (DeprecatedCensusConstants . RPC_CLIENT_STARTED_COUNT , 1 )
444+ .put (RpcMeasureConstants . GRPC_CLIENT_STARTED_RPCS , 1 )
447445 .record (startCtx );
448446 }
449447 }
@@ -462,7 +460,7 @@ public ClientStreamTracer newClientStreamTracer(StreamInfo info, Metadata metada
462460 }
463461 if (module .recordStartedRpcs && attemptsPerCall .get () > 0 ) {
464462 module .statsRecorder .newMeasureMap ()
465- .put (DeprecatedCensusConstants . RPC_CLIENT_STARTED_COUNT , 1 )
463+ .put (RpcMeasureConstants . GRPC_CLIENT_STARTED_RPCS , 1 )
466464 .record (startCtx );
467465 }
468466 if (info .isTransparentRetry ()) {
@@ -628,7 +626,7 @@ private static final class ServerTracer extends ServerStreamTracer {
628626 this .stopwatch = module .stopwatchSupplier .get ().start ();
629627 if (module .recordStartedRpcs ) {
630628 module .statsRecorder .newMeasureMap ()
631- .put (DeprecatedCensusConstants . RPC_SERVER_STARTED_COUNT , 1 )
629+ .put (RpcMeasureConstants . GRPC_SERVER_STARTED_RPCS , 1 )
632630 .record (parentCtx );
633631 }
634632 }
@@ -728,13 +726,11 @@ public void streamClosed(Status status) {
728726 // TODO(songya): remove the deprecated measure constants once they are completed removed.
729727 .put (DeprecatedCensusConstants .RPC_SERVER_FINISHED_COUNT , 1 )
730728 // The latency is double value
731- .put (
732- DeprecatedCensusConstants .RPC_SERVER_SERVER_LATENCY ,
733- elapsedTimeNanos / NANOS_PER_MILLI )
734- .put (DeprecatedCensusConstants .RPC_SERVER_RESPONSE_COUNT , outboundMessageCount )
735- .put (DeprecatedCensusConstants .RPC_SERVER_REQUEST_COUNT , inboundMessageCount )
736- .put (DeprecatedCensusConstants .RPC_SERVER_RESPONSE_BYTES , outboundWireSize )
737- .put (DeprecatedCensusConstants .RPC_SERVER_REQUEST_BYTES , inboundWireSize )
729+ .put (RpcMeasureConstants .GRPC_SERVER_SERVER_LATENCY , elapsedTimeNanos / NANOS_PER_MILLI )
730+ .put (RpcMeasureConstants .GRPC_SERVER_SENT_MESSAGES_PER_RPC , outboundMessageCount )
731+ .put (RpcMeasureConstants .GRPC_SERVER_RECEIVED_MESSAGES_PER_RPC , inboundMessageCount )
732+ .put (RpcMeasureConstants .GRPC_SERVER_SENT_BYTES_PER_RPC , outboundWireSize )
733+ .put (RpcMeasureConstants .GRPC_SERVER_RECEIVED_BYTES_PER_RPC , inboundWireSize )
738734 .put (
739735 DeprecatedCensusConstants .RPC_SERVER_UNCOMPRESSED_RESPONSE_BYTES ,
740736 outboundUncompressedSize )
0 commit comments