from llama_index.core.instrumentation.dispatcher import instrument_tags with instrument_tags({"user": "me"}): <code in this block will emit events with this tag>
event_q = Queue() event_handler = RequestEventHandler(event_q) dispatcher = get_dispatcher() dispatcher.add_event_handler(event_handler)