File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type GetAggregateAppMetricsRouteParams struct {
1212}
1313
1414type GetMetricsAppsQueryParams struct {
15- Limit int `query:"limit" default:"100 " validate:"min=1,max=1000"`
15+ Limit int `query:"limit" default:"500 " validate:"min=1,max=1000"`
1616}
1717
1818type AppMetric struct {
Original file line number Diff line number Diff line change @@ -146,7 +146,6 @@ func (app *ApiServer) v1MetricsAppsUnique(c *fiber.Ctx) error {
146146 // When no app_name is provided, we need to ensure all buckets are included
147147 // by limiting apps per bucket rather than applying a global limit
148148 if queryParams .AppName == "" {
149- // Collect all apps for each bucket, sorted by unique count
150149 type bucketAppResult struct {
151150 Timestamp string
152151 AppUniqueMetric
@@ -248,7 +247,7 @@ func (app *ApiServer) v1MetricsAppsUnique(c *fiber.Ctx) error {
248247 return result [i ].UniqueCount > result [j ].UniqueCount
249248 })
250249
251- // Apply limit (for app_name case, or as final safeguard)
250+ // Apply limit
252251 if len (result ) > queryParams .Limit {
253252 result = result [:queryParams .Limit ]
254253 }
You can’t perform that action at this time.
0 commit comments