@Override public Span error(Throwable throwable) {
    synchronized (state) {
      state.error(throwable);
    }
    return this;
  }
@Test void error() {
    RuntimeException error = new RuntimeException("this cake is a lie");
    span.error(error);
    span.flush();

    assertThat(spans.get(0).error())
      .isSameAs(error);
    assertThat(spans.get(0).tags())
      .doesNotContainKey("error");
  }