You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A WorkerEntrypoint class implementation that is wrapped in a Proxy throws the following runtime error when the service binding is invoked. This was created in a Worker with a service binding to its own entrypoint for testing.
✘ [ERROR] workerd/io/worker.c++:1819: error: worker is not an actor but class name was requested; n = RpcEntrypoint
I found the error at the line below and attempted to trace how WorkerEntrypoint exports are determined. From what I understand, it should be detecting from __proto__, though in the JS side this seems to be retained by the proxy wrapper. This is my first time digging through the workerd code though so I could be off track.
LOG_ERROR_PERIODICALLY("worker is not an actor but class name was requested", n);
Why proxy a WorkerEntrypoint?
I'm attempting the Proxy wrapper as a way to apply OpenTelemetry instrumentation to a WorkerEntrypoint class. The proxy would extract the env form the constructor for configuration, wrap all RPC method invocations in spans, and export those spans automatically when the RPC method completes.
The text was updated successfully, but these errors were encountered:
A
WorkerEntrypoint
class implementation that is wrapped in aProxy
throws the following runtime error when the service binding is invoked. This was created in a Worker with a service binding to its own entrypoint for testing.✘ [ERROR] workerd/io/worker.c++:1819: error: worker is not an actor but class name was requested; n = RpcEntrypoint
I found the error at the line below and attempted to trace how
WorkerEntrypoint
exports are determined. From what I understand, it should be detecting from__proto__
, though in the JS side this seems to be retained by the proxy wrapper. This is my first time digging through the workerd code though so I could be off track.workerd/src/workerd/io/worker.c++
Line 1819 in 92c30c9
Why proxy a WorkerEntrypoint?
I'm attempting the
Proxy
wrapper as a way to apply OpenTelemetry instrumentation to aWorkerEntrypoint
class. The proxy would extract the env form the constructor for configuration, wrap all RPC method invocations in spans, and export those spans automatically when the RPC method completes.The text was updated successfully, but these errors were encountered: