API

cid.locals.generate_new_cid(upstream_cid=None)

Generate a new correlation id, possibly based on the given one.

cid.locals.set_cid(cid)

Set the correlation id on the context.

cid.locals.get_cid()

Return the currently set correlation id (if any).