public java.lang.String getSpanId() {
        java.lang.Object ref = spanId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          spanId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
<pre>
The `[SPAN_ID]` for a span within a trace.
</pre>

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

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