Skip to content

Expose Pi Durable native telemetry through pi() #370

Open

Description

@armyalpaca

Title: Expose Pi Durable native telemetry through pi()

@rivet-dev/pi 0.5.4 supports Pi Durable 1.4.0, but PiOptions does not expose HarnessOptions.telemetry, and openHarness() does not forward it. A host cannot enable Durable's native submission, phase, checkpoint and replay telemetry through the public pi() API.

Could pi() accept an optional telemetry adapter, or an actor-context factory returning one? A factory lets a shared actor definition attach the correct actor identity to each harness while sharing an exporter. The adapter would be resolved whenever a harness opens, including recovery, and passed directly to Harness.open(). Omitting it would preserve current behavior.

The change needs three wiring points: the PiOptions type, the Pi option key list, and the Harness.open() options. This does not require choosing an exporter or registering a global OpenTelemetry provider.

I can contribute the small forwarding change with tests for a static adapter, per-actor factories, reopening, and the default no-op behavior.

Activity

  1. linear-code commented on Oct 30, 2026

    @linear-code
  2. eersnington commented on Oct 30, 2026

    @eersnington
    Member

    I can contribute the small forwarding change with tests for a static adapter, per-actor factories, reopening, and the default no-op behavior.

    nice, would love to see a PR, but i wanna gauge a bit on your thoughts first

    1. pi actor already gets rivetkit's otel so did you consider pi() bridging pi-telemetry into that so it works with zero config instead of BYO adapter?
    2. wdym by this?

    attach the correct actor identity to each harness while sharing an exporter.

    im curious, what doesnt the actor's own trace already give you?
    3. i did a not so thorough check (and could be wrong), but it seems likepi.durable.submit starts a new root trace, so it wont be nested under rivetkit action span. any ideas on how to approach this?

    also goes without saying but, otel shouldnt be able to break any running actors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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