@java.lang.Override
  public com.google.protobuf.ByteString getSpanIdBytes() {
    java.lang.Object ref = spanId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      spanId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
<pre>
Required. The `[SPAN_ID]` portion of the span's resource name.
</pre>

<code>string span_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>

@return The bytes for spanId.
java-trace/proto-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/Span.java