From 920840217efb9a36b3513888fb0c4618176801b5 Mon Sep 17 00:00:00 2001 From: Sam Warfield Date: Sun, 3 Mar 2024 19:55:05 -0700 Subject: [PATCH] Added addition metrics for dynamic dispatches Via RequestObserver, workers can report that they are actively dispatching a subpipeline (`setHasDispatchBinding()`), and target workers can report what worker dispatched them (`setDispatcherId()`) --- src/workerd/io/observer.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/workerd/io/observer.h b/src/workerd/io/observer.h index d6ac845b9a2..3061aef4d38 100644 --- a/src/workerd/io/observer.h +++ b/src/workerd/io/observer.h @@ -62,6 +62,9 @@ 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() {}; + virtual SpanParent getSpan() { return nullptr; } virtual void addedContextTask() {}