Skip to content
Open
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ deps: .protoc-plugins .install-tools

.PHONY: mock
mock:
PATH="$(LOCAL_BIN):$(PATH)" mockgen \
-destination=internal/pkg/service/errorgroups/mock/service.go \
github.com/ozontech/seq-ui/internal/pkg/service/errorgroups \
Service
PATH="$(LOCAL_BIN):$(PATH)" mockgen \
-source=internal/pkg/repository/repository.go \
-destination=internal/pkg/repository/mock/repository.go
Expand Down
42 changes: 33 additions & 9 deletions api/errorgroups/v1/errorgroups.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option go_package = "github.com/ozontech/seq-ui/pkg/errorgroups/v1;errorgroups";

service ErrorGroupsService {
rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) {}
rpc GetTopGroups(GetTopGroupsRequest) returns (GetTopGroupsResponse) {}
rpc GetHist(GetHistRequest) returns (GetHistResponse) {}
rpc GetDetails(GetDetailsRequest) returns (GetDetailsResponse) {}
rpc GetReleases(GetReleasesRequest) returns (GetReleasesResponse) {}
Expand Down Expand Up @@ -40,21 +41,42 @@ message GetGroupsRequest {
}

message GetGroupsResponse {
message Group {
uint64 hash = 1;
string message = 2;
uint64 seen_total = 3;
google.protobuf.Timestamp first_seen_at = 4;
google.protobuf.Timestamp last_seen_at = 5;
string source = 6;
}

uint64 total = 1;
repeated Group groups = 2;
}

message Group {
uint64 hash = 1;
string message = 2;
uint64 seen_total = 3;
google.protobuf.Timestamp first_seen_at = 4;
google.protobuf.Timestamp last_seen_at = 5;
string source = 6;
message GetTopGroupsRequest {
optional string env = 1;
optional string source = 2;
google.protobuf.Duration duration = 3;
uint32 limit = 4;
uint32 offset = 5;
bool with_total = 6;
}

message GetTopGroupsResponse {
message Group {
uint64 hash = 1;
string message = 2;
string source = 3;
uint64 seen_total = 4;
}

uint64 total = 1;
repeated Group groups = 2;
}

message GetHistRequest {
string service = 1;
optional string service = 1;
optional uint64 group_hash = 2;
optional string env = 3;
optional string release = 4;
Expand All @@ -72,7 +94,7 @@ message Bucket {
}

message GetDetailsRequest {
string service = 1;
optional string service = 1;
uint64 group_hash = 2;
optional string env = 3;
optional string release = 4;
Expand All @@ -88,6 +110,8 @@ message GetDetailsResponse {
message Distributions {
repeated Distribution by_env = 1;
repeated Distribution by_release = 2;
repeated Distribution by_source = 3;
repeated Distribution by_service = 4;
}

uint64 group_hash = 1;
Expand Down
30 changes: 16 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ replace github.com/ozontech/seq-ui/pkg => ./pkg

require (
github.com/ClickHouse/clickhouse-go/v2 v2.29.0
github.com/Masterminds/squirrel v1.5.4
github.com/aws/aws-sdk-go v1.55.5
github.com/caarlos0/env/v11 v11.3.1
github.com/cenkalti/backoff/v4 v4.3.0
Expand All @@ -18,22 +17,23 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jackc/pgx/v5 v5.7.1
github.com/jackc/pgx/v5 v5.7.6
github.com/joho/godotenv v1.5.1
github.com/json-iterator/go v1.1.12
github.com/n-r-w/squirrel v1.5.1
github.com/ozontech/seq-ui/pkg v0.2.0
github.com/prometheus/client_golang v1.20.4
github.com/rakyll/statik v0.1.7
github.com/redis/go-redis/v9 v9.6.1
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.11.1
github.com/throttled/throttled/v2 v2.12.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
go.opentelemetry.io/otel/sdk v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
go.uber.org/mock v0.5.0
go.opentelemetry.io/otel/trace v1.37.0
go.uber.org/mock v0.6.0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.8.0
golang.org/x/sync v0.16.0
google.golang.org/grpc v1.67.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
Expand Down Expand Up @@ -61,11 +61,11 @@ require (
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 // indirect
)

Expand All @@ -76,17 +76,19 @@ require (
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.7.1 // indirect
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/paulmach/orb v0.11.1 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
)
Loading
Loading