← Back to packages

Package sentry_protos.sentry.v1

Service ConsumerService

Message RetryState

Message TaskActivation

Message InflightActivation

Message Error

Message GetTaskRequest

Message GetTaskResponse

Message FetchNextTask

Message SetTaskStatusRequest

Message SetTaskStatusResponse

Enum TaskActivationStatus

Services

service ConsumerService sentry_protos/sentry/v1/taskworker.proto

Messages

message RetryState sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 attempts int32

Current attempt number

2 kind string

The classname or adapter type for the retry policy

3 discard_after_attempt optional int32

After this attempt the task should be discarded

4 deadletter_after_attempt optional int32

After this attempt the task should be put in the dead-letter-queue.

5 at_most_once optional bool

Whether a task should be executed at most once.

message TaskActivation sentry_protos/sentry/v1/taskworker.proto

Task message that is stored in Kafka.
Once consumed, TaskActivations are wrapped with InflightActivation to track
additional state

Field Type Description
1 id string

A GUID for the task. Used to update tasks

2 namespace string

The task namespace

3 taskname string

The name of the task. This name is resolved within the worker

4 parameters string

An opaque parameter collection. Could be JSON or protobuf encoded

5 headers map<string, string>

A map of headers for the task.

6 received_at google.protobuf.Timestamp

The timestamp a task was stored in Kafka

7 deadline optional google.protobuf.Timestamp

Unused. Use expires instead.

8 retry_state sentry_protos.sentry.v1.RetryState

Retry state

9 processing_deadline_duration uint64

The duration in seconds that a worker has to complete task execution.
When an activation is moved from pending -> processing a result is expected
in this many seconds.

10 expires optional uint64

The duration in seconds that a task has to start execution.
After received_at + expires has passed an activation is expired and will not be executed.

message InflightActivation sentry_protos/sentry/v1/taskworker.proto

Once a TaskActivation has been received by the task consumer it is wrapped
with InflightActivation so that processing state can be tracked.
This proto might not be used as InflightActivations don't need to cross
process boundaries.

Field Type Description
1 activation sentry_protos.sentry.v1.TaskActivation

The TaskActivation being tracked.

2 status sentry_protos.sentry.v1.TaskActivationStatus

The current status

3 offset int64

The original offset that the WorkerTask message had
Used to find contiguous blocks of completed tasks so that offsets
can be commit to Kafka

4 added_at google.protobuf.Timestamp

The timestamp this task was added to PendingTask storage

5 deadletter_at google.protobuf.Timestamp

The timestamp that this task expires and should be deadlettered.

6 processing_deadline optional google.protobuf.Timestamp

The timestamp that processing is expected to be complete by.
If processing is not complete by this time, a retry will be attempted.

message Error sentry_protos/sentry/v1/taskworker.proto

//////////////////////////
RPC messages and services
//////////////////////////

Field Type Description
1 code int32

Taken directly from the grpc docs.

2 message string
3 details repeated google.protobuf.Any

A list of messages that carry any error details.

message GetTaskRequest sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 namespace optional string

message GetTaskResponse sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 task optional sentry_protos.sentry.v1.TaskActivation

If there are no tasks available, these will be empty

3 error optional sentry_protos.sentry.v1.Error

message FetchNextTask sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 namespace optional string

message SetTaskStatusRequest sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 id string
3 status sentry_protos.sentry.v1.TaskActivationStatus
4 fetch_next optional bool

If fetch_next is provided, receive a new task in the response

5 fetch_next_namespace optional string
6 fetch_next_task optional sentry_protos.sentry.v1.FetchNextTask

message SetTaskStatusResponse sentry_protos/sentry/v1/taskworker.proto

Field Type Description
1 task optional sentry_protos.sentry.v1.TaskActivation

The next task the worker should execute. Requires fetch_next to be set on the request.

3 error optional sentry_protos.sentry.v1.Error

Enums

enum TaskActivationStatus sentry_protos/sentry/v1/taskworker.proto

Name Number Description
TASK_ACTIVATION_STATUS_UNSPECIFIED 0
TASK_ACTIVATION_STATUS_PENDING 1
TASK_ACTIVATION_STATUS_PROCESSING 2
TASK_ACTIVATION_STATUS_FAILURE 3
TASK_ACTIVATION_STATUS_RETRY 4
TASK_ACTIVATION_STATUS_COMPLETE 5