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 25adfa3
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 when a worker has a dynamic dispatch binding (Called on the dispatching side)
virtual void setHasDispatchBinding() {};

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

virtual SpanParent getSpan() { return nullptr; }

virtual void addedContextTask() {}
Expand Down

0 comments on commit 25adfa3

Please sign in to comment.