Add event that KAS registered an agent
What does this MR do and why?
Add a new event kas_registered_agent
to track GitLab Agent registration. Agents send the register request to KAS periodically (default every 5 min). KAS registers the agent to keep track of connected agents.
This MR is a part of gitlab-org/cluster-integration/gitlab-agent#533 (comment 1916343566) and aims to get more agent information: agent_version
and architecture
through the event. This MR adds new event and metrics, and the following MR will call track_event
method. (Update: agent_id
, kubernetes_version
, and os
will be added as an additional properties after #462378 is available. See !154883 (comment 1940317693))
This MR adds four metrics:
- Monthly count of GitLab agents registered with KAS
- Weekly count of GitLab agents registered with KAS
- Monthly count of unique projects where Gitlab agent was registered to KAS
- Weekly count of unique projects where Gitlab agent was registered to KAS
About additional properties:
- A discussion about other four attributes: gitlab-org/cluster-integration/gitlab-agent#533 (comment 1920624301)
- A discussion about adding
AgentID
: gitlab-org/cluster-integration/gitlab-agent#550 (comment 1936175296)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.