I will end up doing something like that, but it might be neat if we augmented the tracer provider with a context manager.
Something like this
with tracer_provider.flush_context():
# call models, etc
Then when the context is exited, it can automatically force flush.