common.py 196 B

1234567891011
  1. import uuid
  2. def gen_trace_id():
  3. return uuid.uuid4().hex
  4. def gen_span_id():
  5. random_value = uuid.uuid4().int
  6. span_id = "{:016x}".format(random_value % (16 ** 16))
  7. return span_id