Export workflow instrumentation event types from public API#445
Conversation
|
@enrico-stauss I'm not sure it makes sense to make these events public. At the very least, we carefully curate what's available as a root module import, and these do not belong there (perhaps exported from a separate more-out-of-the-way, but still stable file) Alternatively, at least on the llama-index-workflows side, we've significantly improved our llama-index-observability-opentelemetry backend, and it now has detailed event details like the arize openinference telemetry adds. You could consider switching to that (arize supports open telemetry collectors). Note however it may not instrument llama_index based abstractions like arize does. |
|
I'll give it a try and come back to you, thanks. |
|
@enrico-stauss see also Arize-ai/openinference#2908 (comment). The coupling here seems hard to maintain well |
|
Hi @adrianlyjak I might do that at some point, but for now I decided to defer the migration and just silence the warning. I get that the situation where a fix spans 2 or 3 repos is not maintainable, but the current alternative is not yet mature (unless I missed something). You may close this PR if you want to. Cheers |
WorkflowStepOutputEvent, WorkflowRunOutputEvent, and SpanCancelledEvent are emitted through the LlamaIndex instrumentation dispatcher during workflow execution. Observability integrations such as openinference-instrumentation-llama-index use singledispatch to handle known event types and log a warning for any type they don't recognise:
The root fix belongs in the openinference package (add no-op or meaningful handlers for these types). Exporting the classes from
workflows.__init__gives the openinference maintainers a stable public import path:so they can register singledispatch handlers without importing from internal implementation modules.