Skip to content

Commit 62173a1

Browse files
authored
stats: add reason to upload (#101)
Signed-off-by: Matt Klein <mklein@bitdrift.io>
1 parent d475e2a commit 62173a1

File tree

1 file changed

+14
-0
lines changed
  • src/bitdrift_public/protobuf/client/v1

1 file changed

+14
-0
lines changed

src/bitdrift_public/protobuf/client/v1/api.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,17 @@ message LogUploadResponse {
374374
}
375375

376376
message StatsUploadRequest {
377+
enum UploadReason {
378+
// Default value. Should not be used.
379+
UPLOAD_REASON_UNSPECIFIED = 0;
380+
381+
// Periodic upload of stats.
382+
UPLOAD_REASON_PERIODIC = 1;
383+
384+
// Upload triggered by a specific event, e.g., buffer flush.
385+
UPLOAD_REASON_EVENT_TRIGGERED = 2;
386+
}
387+
377388
// Upload UUID used to provide idempotence and to correlate a response with this request.
378389
string upload_uuid = 1 [(validate.rules).string = {min_len: 1}];
379390

@@ -420,6 +431,9 @@ message StatsUploadRequest {
420431
// The idea is that upon receiving the stats payload, the server's current time should be close to this
421432
// value.
422433
google.protobuf.Timestamp sent_at = 3;
434+
435+
// The reason for this stats upload.
436+
UploadReason upload_reason = 4;
423437
}
424438

425439
message StatsUploadResponse {

0 commit comments

Comments
 (0)