-
Notifications
You must be signed in to change notification settings - Fork 182
PMM-14567: Add MongoDB Realtime Agent Type (Option 3) #4805
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
Draft
BupycHuk
wants to merge
3
commits into
PMM-14550-rt-qan-mongo
Choose a base branch
from
PMM-14567
base: PMM-14550-rt-qan-mongo
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−3
Conversation
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
Implement database schema for feature configuration using Option 3: - Create new agent record type for real-time analytics - Add MongoDBRealtimeAgentType constant to agent types - Use existing agents table infrastructure - Associate agent with service - Agent status (running/stopped) represents enabled/disabled - Retrieve credentials from existing MongoDB agents during creation Changes: - Add MongoDBRealtimeAgentType constant to models - Update DSN helpers to handle MongoDB realtime agent - Add CreateMongoDBRealtimeAgent helper function - Update proto file with new agent type and messages - Add agent to Files() method for certificate handling No database migration needed as existing agents table supports new type.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## PMM-14550-rt-qan-mongo #4805 +/- ##
==========================================================
+ Coverage 45.28% 45.87% +0.59%
==========================================================
Files 364 364
Lines 37777 37813 +36
==========================================================
+ Hits 17106 17347 +241
+ Misses 19028 18793 -235
- Partials 1643 1673 +30
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:
|
- Introduced RTAOptions type for future Real-Time Analytics configuration. - Implemented database/sql/driver.Valuer and Scanner interfaces for RTAOptions. - Updated Agent and CreateAgentParams to include RTAOptions. - Modified database schema to add rta_options column to agents table.
- Deleted MongoDBRealtimeAgent message and its associated parameters from the proto file. - Removed AGENT_TYPE_MONGODB_REALTIME_AGENT from AgentType enum. - Cleaned up related comments and documentation for clarity.
Member
Author
|
@copilot run |
Contributor
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
Implements PMM-14567: Create Database Schema for Feature Configuration using Option 3 - Create Record in Agents Table.
This PR adds a new agent type
mongodb-realtime-agentthat uses the existing agents table infrastructure to store real-time analytics enable/disable status per service.Key Changes
MongoDBRealtimeAgentTypeconstantCreateMongoDBRealtimeAgent()helper that retrieves credentials from existing MongoDB agents (QAN/exporter) for the serviceImplementation Details
Files Changed
api/inventory/v1/agents.proto: Added AGENT_TYPE_MONGODB_REALTIME_AGENT enum and messagesmanaged/models/agent_model.go: Added MongoDBRealtimeAgentType constant and DSN supportmanaged/models/agent_helpers.go: Added CreateMongoDBRealtimeAgent() helper functionmanaged/models/dsn_helpers.go: Updated to include new agent type in service lookupsTest Plan