@@ -32,6 +32,9 @@ message StreamingMessage {
3232 WorkerInitRequest worker_init_request = 17 ;
3333 // Worker responds after initializing with its capabilities & status
3434 WorkerInitResponse worker_init_response = 16 ;
35+
36+ // Worker periodically sends empty heartbeat message to host
37+ WorkerHeartbeat worker_heartbeat = 15 ;
3538
3639 // Host sends terminate message to worker.
3740 // Worker terminates if it can, otherwise host terminates after a grace period
@@ -117,13 +120,35 @@ message WorkerInitRequest {
117120
118121// Worker responds with the result of initializing itself
119122message WorkerInitResponse {
120- // Version of worker
123+ // NOT USED
124+ // TODO: Remove from protobuf during next breaking change release
121125 string worker_version = 1 ;
126+
122127 // A map of worker supported features/capabilities
123128 map <string , string > capabilities = 2 ;
124129
125130 // Status of the response
126131 StatusResult result = 3 ;
132+
133+ // Worker metadata captured for telemetry purposes
134+ WorkerMetadata worker_metadata = 4 ;
135+ }
136+
137+ message WorkerMetadata {
138+ // The runtime/stack name
139+ string runtime_name = 1 ;
140+
141+ // The version of the runtime/stack
142+ string runtime_version = 2 ;
143+
144+ // The version of the worker
145+ string worker_version = 3 ;
146+
147+ // The worker bitness/architecture
148+ string worker_bitness = 4 ;
149+
150+ // Optional additional custom properties
151+ map <string , string > custom_properties = 5 ;
127152}
128153
129154// Used by the host to determine success/failure/cancellation
@@ -134,6 +159,7 @@ message StatusResult {
134159 Success = 1 ;
135160 Cancelled = 2 ;
136161 }
162+
137163 // Status for the given result
138164 Status status = 4 ;
139165
@@ -147,6 +173,10 @@ message StatusResult {
147173 repeated RpcLog logs = 3 ;
148174}
149175
176+ // NOT USED
177+ // TODO: Remove from protobuf during next breaking change release
178+ message WorkerHeartbeat {}
179+
150180// Warning before killing the process after grace_period
151181// Worker self terminates ..no response on this
152182message WorkerTerminate {
@@ -291,6 +321,11 @@ message RpcFunctionMetadata {
291321
292322 // A flag indicating if managed dependency is enabled or not
293323 bool managed_dependency_enabled = 14 ;
324+
325+ // Properties for function metadata
326+ // They're usually specific to a worker and largely passed along to the controller API for use
327+ // outside the host
328+ map <string ,string > Properties = 16 ;
294329}
295330
296331// Host tells worker it is ready to receive metadata
@@ -549,11 +584,11 @@ message RpcException {
549584
550585 // Worker specifies whether exception is a user exception,
551586 // for purpose of application insights logging. Defaults to false.
552- optional bool is_user_exception = 4 ;
587+ bool is_user_exception = 4 ;
553588
554589 // Type of exception. If it's a user exception, the type is passed along to app insights.
555590 // Otherwise, it's ignored for now.
556- optional string type = 5 ;
591+ string type = 5 ;
557592}
558593
559594// Http cookie type. Note that only name and value are used for Http requests
0 commit comments