@Override
        public ClientStreamTracer newClientStreamTracer(StreamInfo info, Metadata metadata) {
            synchronized (lock) {
                if (finishedCallToBeRecorded) {
                    // This can be the case when the called is cancelled but a retry attempt is created.
                    return new ClientStreamTracer() {};
                }
                if (++activeStreams == 1 && attemptStopwatch.isRunning()) {
                    attemptStopwatch.stop();
                }
            }
            // Skip recording for the first time, since it is already recorded in
            // CallAttemptsTracerFactory constructor. attemptsPerCall will be non-zero after the first
            // attempt, as first attempt cannot be a transparent retry.
            if (attemptsPerCall.get() > 0) {
                this.metricsClientMeters.getAttemptCounter()
                        .withTags((Tags.of("grpc.method", fullMethodName,
                                INSTRUMENTATION_SOURCE_TAG_KEY, Constants.LIBRARY_NAME,
                                INSTRUMENTATION_VERSION_TAG_KEY, Constants.VERSION)))
                        .increment();
            }
            if (!info.isTransparentRetry()) {
                attemptsPerCall.incrementAndGet();
            }

            return new ClientTracer(this, tracerModule, info, fullMethodName, metricsClientMeters);
        }
Provides factories for {@link io.grpc.StreamTracer} that records metrics.

<p>
On the client-side, a factory is created for each call, and the factory creates a stream tracer for each attempt.

<b>Note:</b> This class uses experimental grpc-java-API features.
grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/metrics/MetricsClientStreamTracers.java