CurrentSpanCustomizer implements SpanCustomizer { @Override public SpanCustomizer name(String name) { return tracer.currentSpanCustomizer().name(name); } CurrentSpanCustomizer(Tracing tracing); static CurrentSpanCustomizer create(Tracing tracing); @Override SpanCustomizer name(String name); @Override SpanCustomizer tag(String key, String value); @Override SpanCustomizer annotate(String value);  }
@Test public void name() { span.start(); try (SpanInScope ws = tracing.tracer().withSpanInScope(span)) { spanCustomizer.name("newname"); } span.flush(); assertThat(spans).extracting(MutableSpan::name) .containsExactly("newname"); }
@Test public void name_when_no_current_span() { spanCustomizer.name("newname"); }