code: public static StatsTraceContext newClientContext(
        final CallOptions callOptions, final Attributes transportAttrs, Metadata headers) {
      List<ClientStreamTracer.Factory> factories = callOptions.getStreamTracerFactories();
      if (factories.isEmpty()) {
        return NOOP;
      }
      ClientStreamTracer.StreamInfo info =
          ClientStreamTracer.StreamInfo.newBuilder()
              .setTransportAttrs(transportAttrs).setCallOptions(callOptions).build();
      // This array will be iterated multiple times per RPC. Use primitive array instead of Collection
      // so that for-each doesn't create an Iterator every time.
      StreamTracer[] tracers = new StreamTracer[factories.size()];
      for (int i = 0; i < tracers.length; i++) {
        tracers[i] = factories.get(i).newClientStreamTracer(info, headers);
      }
      return new StatsTraceContext(tracers);
    }
docs: Factory method for the client-side.