Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@zqr10159
Copy link
Member

@zqr10159 zqr10159 commented Dec 3, 2025

This pull request introduces support for log content search filtering and expands GreptimeDB integration to include the PostgreSQL endpoint in both E2E tests and configuration. The main changes are grouped into API enhancements for log search functionality and improvements to GreptimeDB test setup and configuration.

Log search functionality improvements:

  • Added a search parameter to log query API endpoints in LogQueryController, allowing users to filter logs by content keyword. The filtering is case-insensitive and matches substrings within log entries. [1] [2] [3] [4] [5] [6]
  • Updated backend methods and tests to support the new search parameter, ensuring that filtering logic and pagination work correctly with content-based queries. [1] [2] [3] [4] [5] [6] [7] [8] [9]

GreptimeDB integration and configuration:

  • Added support for the GreptimeDB PostgreSQL endpoint (GREPTIME_PG_PORT, port 4003) in E2E test containers for both alert and log storage tests, including startup commands and port exposure. [1] [2] [3] [4]
  • Updated dynamic property registration in E2E tests to include the new PostgreSQL endpoint for GreptimeDB. [1] [2]
  • Added the postgres-endpoint property to the GreptimeDB configuration in application-test.yml for test environments.
  • Updated test queries to match the new method signatures that include the search parameter.

These changes collectively enhance log filtering capabilities for users and improve the reliability and completeness of GreptimeDB integration in the test suite.

zqr10159 added 30 commits April 23, 2024 10:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the GreptimeDB integration to use JDBC (PostgreSQL protocol) instead of HTTP REST API, while also adding log content search filtering capabilities across the application. The main changes include migrating from HTTP-based queries to JDBC-based queries using Spring's JdbcTemplate with HikariCP connection pooling, and adding a new search parameter to filter logs by content.

  • Migration from HTTP REST API to PostgreSQL JDBC protocol for GreptimeDB queries
  • Addition of log content search filtering with case-insensitive substring matching
  • Updates to E2E test infrastructure to expose and configure the PostgreSQL endpoint (port 4003)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
web-app/src/assets/i18n/*.json Added internationalized labels for log content search field across 5 languages
web-app/src/app/service/log.service.ts Added search parameter to all log query methods
web-app/src/app/routes/log/log-stream/log-stream.component.* Added log content filter input field and state management
web-app/src/app/routes/log/log-manage/log-manage.component.* Added search content field and integrated with query/stats methods
hertzbeat-warehouse/pom.xml Added spring-boot-starter-jdbc and postgresql driver dependencies
hertzbeat-warehouse/src/main/java/.../GreptimeSqlQueryExecutor.java Complete rewrite to use JdbcTemplate with HikariCP instead of RestTemplate
hertzbeat-warehouse/src/main/java/.../GreptimeDbDataStorage.java Updated to use parameterized queries and changed body field type to String
hertzbeat-warehouse/src/main/java/.../GreptimeProperties.java Added postgresEndpoint configuration property
hertzbeat-warehouse/src/main/java/.../HistoryDataReader.java Added searchContent parameter to log query interface methods with legacy overloads
hertzbeat-log/src/main/java/.../LogQueryController.java Added search parameter to all API endpoints
hertzbeat-log/src/main/java/.../LogSseFilterCriteria.java Added logContent field for SSE filter matching
hertzbeat-warehouse/src/test/java/.../GreptimeDbDataStorageTest.java Updated mocks to use new JDBC query methods instead of HTTP execute
hertzbeat-warehouse/src/test/java/.../GreptimeSqlQueryExecutorTest.java Completely rewritten to test JDBC-based implementation
hertzbeat-log/src/test/java/.../LogQueryControllerTest.java Updated test mocks to include new searchContent parameter
hertzbeat-e2e/.../GreptimeLogStorageE2eTest.java Added PostgreSQL port exposure and dynamic property registration
hertzbeat-e2e/.../LogPeriodicAlertE2eTest.java Added PostgreSQL port exposure and dynamic property registration
script/docker-compose/.../application.yml Added postgres-endpoint configuration for GreptimeDB
script/application.yml Added postgres-endpoint configuration template
hertzbeat-startup/src/main/resources/application*.yml Added postgres-endpoint configuration for test and production profiles

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

web-app/src/assets/i18n/zh-CN.json Outdated Show resolved Hide resolved
web-app/src/assets/i18n/en-US.json Outdated Show resolved Hide resolved
hertzbeat-warehouse/pom.xml Show resolved Hide resolved
zqr10159 and others added 12 commits December 3, 2025 18:58
…se/db/GreptimeSqlQueryExecutor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Logic <zqr10159@126.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Logic <zqr10159@126.com>
…lication.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Logic <zqr10159@126.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Logic <zqr10159@126.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Logic <zqr10159@126.com>
- Add comprehensive tests for log content filtering including exact match,
  partial match, case insensitivity, and non-match scenarios
- Fix incorrect verify calls in GreptimeDbDataStorageTest from query() to delete()
- Update constructor and setter tests to include log content field
- Improve test coverage for null log entry bodies
- Add test for multiple filter combinations including log content
- Replace System.nanoTime() with consistent nanosecond timestamp
- Increase E2E test timeout from 30s to 60s for log processing
- Extend query time window from 5 to 10 minutes in tests
- Add logging for stored log size verification
- Fix minor formatting in Javadoc comments
- Update license header URL formatting
- Replace System.nanoTime() with consistent nanosecond timestamp
- Increase E2E test timeout from 30s to 60s for log processing
- Extend query time window from 5 to 10 minutes in tests
- Add logging for stored log size verification
- Fix minor formatting in Javadoc comments
- Update license header URL formatting
@github-actions github-actions bot added the doc Improvements or additions to documentation label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend doc Improvements or additions to documentation docker docker-compose script webapp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.