integrations-core
integrations-core copied to clipboard
feat: Collect 'argocd_app_labels' argocd metric
What does this PR do?
PR adds the argocd_app_labels argocd metric for collection
Motivation
Having app labels available in a metric will be useful for routing alerts using ArgoCD metrics based on application labels
Additional Notes
Review checklist (to be filled by reviewers)
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
- [x] Changelog entries must be created for modifications to shipped code
- [ ] Add the
qa/skip-qalabel if the PR doesn't need to be tested during QA.
Test Results
2 files 2 suites 4s :stopwatch: 10 tests 10 :white_check_mark: 0 :zzz: 0 :x: 11 runs 10 :white_check_mark: 1 :zzz: 0 :x:
Results for commit a8de36e5.
:recycle: This comment has been updated with latest results.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
ec8e570) 90.55% compared to head (a8de36e) 90.67%.
Additional details and impacted files
| Flag | Coverage Δ | |
|---|---|---|
| activemq | ? |
|
| argocd | 87.81% <ø> (ø) |
|
| cassandra | ? |
|
| confluent_platform | ? |
|
| hive | ? |
|
| hivemq | ? |
|
| hudi | ? |
|
| ignite | ? |
|
| jboss_wildfly | ? |
|
| kafka | ? |
|
| presto | ? |
|
| solr | ? |
|
| weblogic | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
Hey @maycmlee! I'm wondering if you'd know when we could merge this change in? It's blocking the creation of some monitors we need for ArgoCD
@alexstojda Hello! Thanks for contribution! The change looks fine to me. I can approve it.
Out of curiosity, can you elaborate a bit more on how you intend to use this for monitors if you don't mind? I'm always curious about the creative usage of our end users.
@steveny91 most definitely!
The argocd_app_labels metric exposes all the the labels of an ArgoCD Application as attributes on the metric. We label our Applications with additional information such as the environment to which its deployed, the business unit it belongs to, and the team that owns it.
So, using this metric along with argocd_app_info or other app metrics, we can use the label values to route an alert to different targets depending on a label value.
@alexstojda Thanks for explanation 🙇 ! I'll go ahead and approve this. Sadly, this won't be packaged with the agent until 7.53. But if you would like to use this immediately, you can add the app.label metric as an extra metric here:
https://github.com/DataDog/integrations-core/blob/master/argocd/datadog_checks/argocd/data/conf.yaml.example#L80
Again, really appreciate the contribution!