private static SpanId GetNullSpanId() { var nativeSpanId = new SpanId(); var nullSpanId = CEventTrace.SpanIdNull(); unsafe { ApiInterop.Memcpy(nativeSpanId.Data, nullSpanId.Data, SpanIdSize); } return(nativeSpanId); }
internal static unsafe CEventTrace.Item *GetThreadLocalItem() { var item = CEventTrace.ItemGetThreadLocal(); switch (item->ItemType) { case CEventTrace.ItemType.Span: item->ItemUnion.Span.Id = CEventTrace.SpanIdNull(); item->ItemUnion.Span.Causes = null; item->ItemUnion.Span.CauseCount = 0; break; case CEventTrace.ItemType.Event: item->ItemUnion.Event.Data = IntPtr.Zero; item->ItemUnion.Event.Id = CEventTrace.SpanIdNull(); item->ItemUnion.Event.Message = null; item->ItemUnion.Event.Type = null; break; } item->ItemType = 0; return(item); }