feat: restore pagination, add health timeout & metrics config#50
Open
GabrielTenma wants to merge 6 commits into
Open
feat: restore pagination, add health timeout & metrics config#50GabrielTenma wants to merge 6 commits into
GabrielTenma wants to merge 6 commits into
Conversation
…buffer Add ResetTerminal function in pkg/utils/system.go to emit the escape sequence restoring the main screen buffer, cursor, and text attributes. Update ClearScreen in both pkg/utils/system.go and scripts/build/build.go to call ResetTerminal before performing platform-specific clears, and adjust the defer cleanup in runTUIBuild to also restore the main buffer. Apply similar startup clearing in scripts/docker/docker_build.go and scripts/plugin/pkg.go for consistent terminal state handling across all tools.
Records request count, duration, and sizes using the route template (c.Path()) for bounded label cardinality.
- Restore cursor-based pagination from master (pkg/pagination/cursor.go) with added offset pagination helpers - Add PaginationConfig (type, max_per_page) to config - Add InfrastructureConfig (init_timeout) to config for per-component timeout - Add MetricsConfig.SampleRate for sampled metrics recording - Use config-driven init timeout in async health checks (was hardcoded 10s) - Expose init_timeout_seconds in /health response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores pagination functionality, adds configurable health check timeout and metrics config to stackyrd.
1. Pagination Restored (
pkg/pagination/cursor.go)OffsetPaginationhelper (page/per_page based)CursorPageBuilderfor building paginated responsesParsePaginationFromQueryfor echo request parsing2. Config Enhancements (
config/config.go)PaginationConfig—Type(offset/cursor),MaxPerPageInfrastructureConfig—InitTimeout(seconds, per-component health check timeout)MetricsConfig.SampleRate— fractional rate for sampled metrics recording3. Health Check Timeout (
pkg/infrastructure/async_init.go)infrastructure.init_timeout(default 10s)4. Health Endpoint (
internal/server/server.go)/healthnow returnsinit_timeout_secondsConfig Example