@Test public void testMeta() { SpanBuilder builder = createRoot(); builder.meta("key", "value"); Span span = builder.finishSpan("service"); Assert.assertEquals(Collections.singletonMap("key", "value"), span.getMeta()); builder.meta("another", "should not appear"); Assert.assertNull(span.getMeta().get("another")); }
public SpanBuilder meta(String key, String value) { if(meta == null) { meta = new HashMap<>(); } meta.put(key, value); return this; }
SpanBuilder { public SpanBuilder meta(String key, String value) { if(meta == null) { meta = new HashMap<>(); } meta.put(key, value); return this; } }
SpanBuilder { public SpanBuilder meta(String key, String value) { if(meta == null) { meta = new HashMap<>(); } meta.put(key, value); return this; }  }
SpanBuilder { public SpanBuilder meta(String key, String value) { if(meta == null) { meta = new HashMap<>(); } meta.put(key, value); return this; }  SpanBuilder metric(String key, Number value); SpanBuilder meta(String key, String value); SpanBuilder exception(Throwable e); SpanBuilder createChild(); static SpanBuilder createRoot(); static SpanBuilder createChild(long traceId, long parentSpanId); Span finishSpan(String service); SpanContext exportSpan(); }
SpanBuilder { public SpanBuilder meta(String key, String value) { if(meta == null) { meta = new HashMap<>(); } meta.put(key, value); return this; }  SpanBuilder metric(String key, Number value); SpanBuilder meta(String key, String value); SpanBuilder exception(Throwable e); SpanBuilder createChild(); static SpanBuilder createRoot(); static SpanBuilder createChild(long traceId, long parentSpanId); Span finishSpan(String service); SpanContext exportSpan();  }