| 168 | } |
| 169 | |
| 170 | inline uint64_t GenerateSpanId() { |
| 171 | // 0 is an invalid Id |
| 172 | IdGen* g = &tls_span_id_gen; |
| 173 | if (g->seq == 0) { |
| 174 | UpdateTLSRandom64(g); |
| 175 | g->seq = 1; |
| 176 | } |
| 177 | return (g->current_random & 0xFFFFFFFFFFFF0000ULL) | g->seq++; |
| 178 | } |
| 179 | |
| 180 | inline uint64_t GenerateTraceId() { |
| 181 | // 0 is an invalid Id |
no test coverage detected