Skip to content

Commit

Permalink
Added addition metrics for dynamic dispatches
Browse files Browse the repository at this point in the history
Via RequestObserver, workers can report that they are actively dispatching a subpipeline (`setHasDispatchBinding()`), and target workers can report what worker dispatched them (`setDispatcherId()`)
  • Loading branch information
Warfields committed Mar 5, 2024
1 parent 0bf67e4 commit d0b5602
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/workerd/io/observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ class RequestObserver: public kj::Refcounted {
return kj::mv(client);
}

// Used to record dynamic dispatch workers.
virtual void setHasDispatchBinding() {};

// Used to record what worker dispatched the current worker.
virtual void setDispatcherId(kj::Maybe<kj::String> id) {};

virtual SpanParent getSpan() { return nullptr; }

virtual void addedContextTask() {}
Expand Down

0 comments on commit d0b5602

Please sign in to comment.