Skip to content

[Design] ate.actor.activation #1041

Open

Description

Living design doc for easier collaboration, please use this for comments: https://docs.google.com/document/d/1tpUZNqH-xaSXzMVJf95CpWtKbIBD-mH93nqlDcEBOe8/edit?tab=t.0

It requires to be in: [email protected]

Problem

An actor occupies many workers throughout its life. It runs on worker A for an hour, suspends, resumes on worker B three days later, crashes, comes back. Each time it occupies a worker we emit spans and logs, but we have nothing to refer to these iperiods, or "residencies" by. So for example "show me everything this actor did on Tuesday afternoon" is not a query we can run today.

Proposal: create an id per "residency", call it activation, and set it on the signals where high cardinality is allowed, so spans and logs.

High level mechanism

ateapi creates a ULID/UUID (having it sortable by creation timestamp is nice) when it commits an actor into RUNNING, stores it on the Actor record, and it propagates trough the restore path (ateapi -> atelet -> ateom), for which we already have all the plumbing in place.
Where it goes

We should consider storing the previous residency's suspend span context on the Actor record, and link each resume span back to it.

Benefits

  • the actor timeline becomes one query instead of lots of joins across pod names and time windows
  • usage and cost can be split into residency beyond actor and request
  • we can make crash loops become visible as incarnation rate is increasing
  • for [Design] Actor Otel Telemetry Relay #853, it seems to be the proper writer identity for the relayed metric stream. One incarnation is exactly one writer by design, which is a cleaner than a worker pod

Open questions

  1. What ends an incarnation apart from SUSPEND? What about PAUSE, where the actor may come back to the same worker? Is an incarnation one running interval or one placement? This will affect the design.
  2. Proto field or telemetry-internal? On the proto it's more useful and clients can correlate against it, but it's an API change, and we have multiple changes in-flgiht for the API already

cc. Da Huang (@git286), Julian Gutierrez Oschmann (@juli4n), Max Smythe (@maxsmythe)

Activity

  1. added
    kind/feature
    on Aug 18, 2026
  2. maxsmythe commented on Aug 19, 2026

    @maxsmythe
    Collaborator

    Definitely like the idea of being able to easily view an actor across its extended lifetime.

    WRT open questions:

    What ends an incarnation apart from SUSPEND? What about PAUSE, where the actor may come back to the same worker? Is an incarnation one running interval or one placement? This will affect the design.

    Seems like this is dependent on intent. If we want to use this to help identify frequent crashes, that would imply non-user-intended incarnations. Alternatively, we could also log the reason why the incarnation ended and let the user decide what to keep/drop based off needs?

    Proto field or telemetry-internal? On the proto it's more useful and clients can correlate against it, but it's an API change, and we have multiple changes in-flgiht for the API already

    Sounds like correlation may be a large portion of the value this field provides.

  3. changed the title [-][Design] ate.actor.incarnation[/-] [+][Design] ate.actor.activation[/+] on Aug 19, 2026
  4. git286 commented on Aug 20, 2026

    @git286
    Collaborator

    So for example "show me everything this actor did on Tuesday afternoon" is not a query we can run today.

    Why? Can't we run a query over the logs today with something like "where uid = xxx AND timestamp in a range"?

    we can make crash loops become visible as incarnation rate is increasing

    I think we already have this one? ate.actor.crashes is a counter in controlapi/metrics.go with template/pool/reason attributes, so crash rate is available today ?

    it seems to be the proper writer identity for the relayed metric stream. One incarnation is exactly one writer by design, which is a cleaner than a worker pod

    Above you said it won't be added to metrics (since the cardinality will be even higher than actor ids) then why can this be used as metric writer identity?

  5. added
    kind/design
    on Sep 17, 2026
  6. sfunkenhauser commented on Nov 23, 2026

    @sfunkenhauser
    Collaborator

    A similar field is being added in actor_status.worker_assignment.actor_execution_uid. Naming aside (which sounds like we should re-name to actor_activation_uid #483 (comment)), can this be re-used for this feature?

    This field will be set when the actor state switches to RUNNING and will be removed on CRASHED and SUSPENDED (when the worker assignment is cleared).

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

    area/observabilitykind/designkind/feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions