Skip to content

Commit 7730e9e

Browse files
committed
Add reportInternalException to RequestObserver
1 parent e328a31 commit 7730e9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/workerd/io/observer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ class RequestObserver: public kj::Refcounted {
9999
// occurred asynchronously.
100100
virtual void reportFailure(const kj::Exception& e, FailureSource source = FailureSource::OTHER) {}
101101

102+
// Called when an internal exception is observed during this request. Used to track which
103+
// internal exception types occurred during a request, for metrics purposes. The same exception
104+
// type may be reported multiple times during a single request; implementations should deduplicate.
105+
virtual void reportInternalException(
106+
const kj::Exception& e, jsg::InternalExceptionObserver::Detail detail) {}
107+
102108
// Wrap the given WorkerInterface with a version that collects metrics. This method may only be
103109
// called once, and only one method call may be made to the returned interface.
104110
//

0 commit comments

Comments
 (0)