code: @VisibleForTesting
    static void recordMessageEvent(Span span, long size, Type eventType) {
      Preconditions.checkArgument(span != null, "span should not be null.");
      if (size < 0) {
        size = 0;
      }
      MessageEvent event =
          MessageEvent.builder(eventType, idGenerator.getAndIncrement())
              .setUncompressedMessageSize(size)
              .build();
      span.addMessageEvent(event);
    }
docs: Records a message event of a certain {@link MessageEvent.Type}. This method is package
  protected since {@link MessageEvent} might be deprecated in future releases.
  
  @param span The {@code span} in which the event occurs.
  @param size Size of the message.
  @param eventType The {@code NetworkEvent.Type} of the message event.