Protocol Documentation
Table of Contents
deepproto/proto/poll/v1/poll.proto
PollRequest
PollRequest is sent by the client to check its current config with the server.
Field | Type | Label | Description |
---|---|---|---|
ts_nanos | fixed64 | The time (as epoch nanos) when the message was sent, acts as message ID. | |
current_hash | string | This should the the hash that was last sent by the server, this is used to determine if the config has changed since the last poll. If no hash is available (e.g. first poll) then do not set this value. | |
resource | deepproto.proto.resource.v1.Resource | The attributes that represent the client making the request. These attributes are used to filter the tracepoint response to just the tracepoints that are for the requesting client. |
PollResponse
PollResponse is the response the server will send in response to a PollRequest.
Field | Type | Label | Description |
---|---|---|---|
ts_nanos | fixed64 | The time (as epoch nanos) then he message was sent. This should match the 'ts_nanos' from the triggering PollRequest. | |
current_hash | string | This is the hash that the server has assigned this current config for this client. This should be sent with the next PollRequest. | |
response | deepproto.proto.tracepoint.v1.TracePointConfig | repeated | This is the list of tracepoints that are currently configured for this client. |
response_type | ResponseType | This indicates if the config has changed or not. If 'NO_CHANGE' then 'response' should be null or empty. |
ResponseType
ResponseType is used to indicate if the response from the server should trigger an update of the client config. If the client sends the same 'current_hash' as that which the server has for the client, then the server will response with 'NO_CHANGE'. This allows the client to not trigger any changes to the current tracepoint configs.
Name | Number | Description |
---|---|---|
NO_CHANGE | 0 | This is sent when the 'current_hash' from the request is the same as the response. So the client should do nothing. |
UPDATE | 1 | This is sent when the client should process the response to update the config. |
PollConfig
This is how the application agent should request the config of the tracepoints.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
poll | PollRequest | PollResponse | Call this function as often as is required to ensure config is up to date. |