-
Notifications
You must be signed in to change notification settings - Fork 186
PMM-14555 PMM-14562 API #4864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PMM-14554-rta-in-memory-store
Are you sure you want to change the base?
PMM-14555 PMM-14562 API #4864
Conversation
…eal-time query data - Added new gRPC method `GetRealtimeQueryData` to the `RealtimeAnalyticsService` for retrieving real-time query data. - Introduced `QueryDataItem`, `GetRealtimeQueryDataRequest`, and `GetRealtimeQueryDataResponse` message types to support the new API. - Implemented request handling and validation for the new API in the service layer. - Updated documentation to reflect the new functionality and its usage.
…tics testing - Added a new `MockGenerator` to generate mock query data for testing purposes. - Integrated the mock generator into the gRPC server startup process. - The mock generator runs in a separate goroutine and generates random queries for RTA-enabled services. - This addition is intended for testing and should be configurable or removed in production.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## PMM-14554-rta-in-memory-store #4864 +/- ##
=================================================================
- Coverage 46.11% 46.04% -0.07%
=================================================================
Files 366 367 +1
Lines 38082 38187 +105
=================================================================
+ Hits 17560 17582 +22
- Misses 18836 18920 +84
+ Partials 1686 1685 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…used cluster filter parameter in query retrieval, streamlining data fetching from the store.
…nerating mock query data. The generator runs in the background and produces data for RTA-enabled services, enhancing testing capabilities. This change includes the addition of a new generator file and updates to the main.go file to utilize the new generator.
…. Added validation logic to ensure ServiceIds field is populated, enhancing data integrity for real-time query requests.
| go rtaStore.Run(ctx) | ||
|
|
||
| // Start generator for testing (TODO: remove in production or make configurable) | ||
| gen := realtimeanalytics.NewGenerator(rtaStore, deps.db) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can put it behind a PMM_DEV_ envvar.
…d on the PMM_DEV_RTA_GENERATOR_ENABLED environment variable, improving configurability for development and testing environments.
…ement TestGetRealtimeQueryData in service_test.go - Updated AGENT.md to include instructions for running make targets inside the Docker development container, ensuring consistent tooling versions and permissions. - Added TestGetRealtimeQueryData to service_test.go, implementing comprehensive tests for the GetRealtimeQueryData method, including scenarios for empty results, single service data retrieval, multiple services, and filtering non-requested services.
PMM-14555 PMM-14562
Link to the Feature Build: SUBMODULES-0
If this PR adds, removes or alters one or more API endpoints, please review and add or update the relevant API documentation as well:
If this PR is related to some other PRs in this or other repositories, please provide links to those PRs: