@Override public String toString() { return getClass().getSimpleName() + toMap(); }
/** Returns a mapping of any fields in the trace context. */ public static Map<String, String> getAll(TraceContext context) { if (context == null) throw new NullPointerException("context == null"); PropagationFields fields = context.findExtra(Extra.class); return fields != null ? fields.toMap() : Collections.emptyMap(); }
/** Returns a mapping of any fields in the extraction result. */ public static Map<String, String> getAll(TraceContextOrSamplingFlags extracted) { if (extracted == null) throw new NullPointerException("extracted == null"); TraceContext extractedContext = extracted.context(); if (extractedContext != null) return getAll(extractedContext); PropagationFields fields = TraceContext.findExtra(Extra.class, extracted.extra()); return fields != null ? fields.toMap() : Collections.emptyMap(); }
@Override public String toString() { return getClass().getSimpleName() + toMap(); }
/** Returns a mapping of any fields in the trace context. */ public static Map<String, String> getAll(TraceContext context) { if (context == null) throw new NullPointerException("context == null"); PropagationFields fields = context.findExtra(Extra.class); return fields != null ? fields.toMap() : Collections.emptyMap(); }
/** Returns a mapping of any fields in the extraction result. */ public static Map<String, String> getAll(TraceContextOrSamplingFlags extracted) { if (extracted == null) throw new NullPointerException("extracted == null"); TraceContext extractedContext = extracted.context(); if (extractedContext != null) return getAll(extractedContext); PropagationFields fields = TraceContext.findExtra(Extra.class, extracted.extra()); return fields != null ? fields.toMap() : Collections.emptyMap(); }