private static labelMap labelValue(context.Context ctx) { ptr <labelMap> (labels, _) = ctx.Value(new labelContextKey())._ <ptr <labelMap> >(); if (labels == null) { return(labelMap(null)); } return(labels.val); }
public static ptr <Span> GetSpan(context.Context ctx) { var v = ctx.Value(spanContextKey); if (v == null) { return(_addr_null !); } return(v._ <ptr <Span> >()); }
// ContextClientTrace returns the ClientTrace associated with the // provided context. If none, it returns nil. public static ptr <ClientTrace> ContextClientTrace(context.Context ctx) { ptr <ClientTrace> (trace, _) = ctx.Value(new clientEventContextKey())._ <ptr <ClientTrace> >(); return(_addr_trace !); }