public com.google.protobuf.ByteString getSpanIdBytes() {
        java.lang.Object ref = spanId_;
        if (ref instanceof 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>
The `[SPAN_ID]` for a span within a trace.
</pre>

<code>string span_id = 2;</code>

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