Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/bitdrift/public/unary/issues/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ service IssueService {
// Lists issues in an issue group that match the specified filter criteria.
rpc ListIssuesV2(.bitdrift.public.unary.issues.v1.ListIssuesV2Request) returns (.bitdrift.public.unary.issues.v1.ListIssuesV2Response);

// Retrieves the occurrence time series for issues matching a query.
rpc GetAggregateIssueEvents(.bitdrift.public.unary.issues.v1.GetAggregateIssueEventsRequest) returns (.bitdrift.public.unary.issues.v1.GetAggregateIssueEventsResponse);

// Retrieves the feature flags associated with an issue.
rpc GetIssueFeatureFlags(.bitdrift.public.unary.issues.v1.GetIssueFeatureFlagsRequest) returns (.bitdrift.public.unary.issues.v1.GetIssueFeatureFlagsResponse);

Expand Down
28 changes: 24 additions & 4 deletions src/bitdrift/public/unary/issues/v1/issues.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package bitdrift.public.unary.issues.v1;
import "bitdrift/public/shared/platform/v1/platform.proto";
import "bitdrift/public/unary/common/v1/common.proto";
import "bitdrift/public/unary/issues/v1/crash.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "validate/validate.proto";

Expand Down Expand Up @@ -155,13 +156,12 @@ message IssueGroupQuery {
}];
}

// An aggregate of the number of instances of the issue group.
// With the count being the sum of instances within a time window.
// A time-series data point that counts issue occurrences in an aggregation interval.
message Event {
// The timestamp at which the time window begins.
// The start of the aggregation interval.
.google.protobuf.Timestamp period_start = 1 [(validate.rules).message = {required: true}];

// The number of instances within the time window.
// The number of issue occurrences in the aggregation interval.
uint64 count = 2;
}

Expand Down Expand Up @@ -607,6 +607,26 @@ message ListIssuesV2Response {
optional string next_page_token = 3;
}

// Requests occurrence time-series data for issues matching a query.
message GetAggregateIssueEventsRequest {
// Selects the issues included in the occurrence time series.
.bitdrift.public.unary.issues.v1.IssueQuery issue_query = 4;

// Optionally sets the duration of each aggregation interval. The value must be a positive whole
// number of minutes that does not exceed the queried time range. If omitted, the server selects
// an interval based on the queried time range.
optional .google.protobuf.Duration aggregation_window = 5;
}

// Returns occurrence time-series data for the requested issues.
message GetAggregateIssueEventsResponse {
// Occurrence counts, ordered by aggregation interval start time.
repeated .bitdrift.public.unary.issues.v1.Event events = 1;

// The duration of each aggregation interval used to produce events.
.google.protobuf.Duration aggregation_window = 2;
}

message GetIssueFeatureFlagsRequest {
// The unique identifier for the issue.
string issue_id = 1 [(validate.rules).string = {
Expand Down
Loading