Skip to content

🔭 Sneak Peak - Evented Telemetry Support with support for driver based OpenTelemetry for platforms like phoenix #935

@vinitkadam03

Description

@vinitkadam03

🔭 Sneak Peek: OpenTelemetry + Phoenix Driver for Prism PHP

I’ve been experimenting with early OpenTelemetry instrumentation for Prism PHP along with a built-in Phoenix driver, and the initial results look promising.

Right now, we can already visualize the full streaming flow in Phoenix:

  • Root span for prism.text.asStream
  • Nested streamStep spans
  • toolCall spans with timing
  • Clear end-to-end latency view

This significantly improves visibility into multi-step streaming chains. Also visualization for embedding, text handlers etc are supported. This internally dispatches simple laravel events and adds open telemetry based observability platforms like phoenix as a driver. Thus, one can also integrate telescope, pulse, etc.


🚀 What More We Can Unlock

Currently I am mainly tracks step-level events, but there’s room to go deeper:

Adopting a central streaming handler (see #894) would make this much easier to implement cleanly without duplicating instrumentation across the codebase.


Image
Image

This is still an early sneak peek, but it shows strong potential to make Prism much more production-observable. Feedback welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions