Skip to content
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

Adds support for include_labels #10493

Merged
merged 13 commits into from
Nov 8, 2021
Merged

Adds support for include_labels #10493

merged 13 commits into from
Nov 8, 2021

Conversation

fanny-jiang
Copy link
Contributor

@fanny-jiang fanny-jiang commented Oct 26, 2021

What does this PR do?

Adds support for include_labels to the openmetrics base check. Labels that are configured in include_labels will be added as tags on metric submission. Can be used in conjunction with exclude_labels. If a label name is present in both options, exclude_labels will take priority.

Motivation

Support feature request

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

2 similar comments
@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #10493 (0fac2fa) into master (7619c36) will decrease coverage by 0.29%.
The diff coverage is 90.74%.

❗ Current head 0fac2fa differs from pull request most recent head c42716a. Consider uploading reports for the commit c42716a to get more accurate results
| Flag | Coverage Δ | |
|---|---|---|
| active_directory | 100.00% <ø> (ø) | |
| activemq_xml | 82.31% <ø> (ø) | |
| aerospike | ? | |
| airflow | 90.00% <ø> (ø) | |
| amazon_msk | 88.83% <ø> (ø) | |
| ambari | 85.75% <ø> (ø) | |
| apache | 95.08% <ø> (ø) | |
| aspdotnet | 93.87% <ø> (ø) | |
| avi_vantage | 91.92% <ø> (ø) | |
| azure_iot_edge | 82.01% <ø> (ø) | |
| btrfs | 82.91% <ø> (ø) | |
| cacti | 83.95% <ø> (ø) | |
| cassandra_nodetool | 94.19% <ø> (ø) | |
| ceph | ? | |
| cilium | 85.84% <ø> (+1.88%) | ⬆️ |
| cisco_aci | 95.88% <ø> (ø) | |
| citrix_hypervisor | 87.50% <ø> (ø) | |
| clickhouse | 95.63% <ø> (ø) | |
| cloud_foundry_api | 95.98% <ø> (+0.12%) | ⬆️ |
| cockroachdb | 97.18% <ø> (ø) | |
| consul | 91.74% <ø> (ø) | |
| coredns | 95.74% <ø> (ø) | |
| couch | 95.19% <ø> (+0.24%) | ⬆️ |
| couchbase | 81.45% <ø> (ø) | |
| crio | 100.00% <ø> (ø) | |
| datadog_checks_base | 89.71% <100.00%> (+0.42%) | ⬆️ |
| datadog_checks_dev | 79.69% <55.55%> (ø) | |
| datadog_checks_downloader | ? | |
| datadog_cluster_agent | 97.50% <ø> (ø) | |
| directory | 94.87% <ø> (ø) | |
| disk | 91.13% <ø> (-0.49%) | ⬇️ |
| dns_check | 94.00% <ø> (ø) | |
| dotnetclr | 100.00% <ø> (ø) | |
| druid | 97.70% <ø> (ø) | |
| ecs_fargate | 76.15% <100.00%> (ø) | |
| eks_fargate | 94.05% <ø> (ø) | |
| elastic | 88.65% <ø> (ø) | |
| envoy | 93.90% <ø> (ø) | |
| etcd | 93.27% <ø> (ø) | |
| exchange_server | 100.00% <ø> (ø) | |
| external_dns | 100.00% <ø> (ø) | |
| fluentd | 94.77% <100.00%> (ø) | |
| gearmand | 77.27% <ø> (+1.29%) | ⬆️ |
| gitlab | ? | |
| gitlab_runner | 91.94% <ø> (ø) | |
| glusterfs | ? | |
| go_expvar | 92.49% <ø> (ø) | |
| gunicorn | 93.60% <ø> (+0.75%) | ⬆️ |
| haproxy | 95.08% <ø> (+0.16%) | ⬆️ |
| harbor | 81.29% <ø> (ø) | |
| hazelcast | 92.39% <ø> (ø) | |
| hdfs_datanode | 89.30% <ø> (ø) | |
| hdfs_namenode | 87.01% <ø> (ø) | |
| http_check | 89.98% <ø> (+1.76%) | ⬆️ |
| ibm_db2 | 94.84% <ø> (ø) | |
| ibm_i | 80.65% <ø> (ø) | |
| ibm_mq | 89.61% <ø> (ø) | |
| ibm_was | 97.45% <ø> (ø) | |
| iis | 93.01% <ø> (ø) | |
| istio | 77.67% <ø> (+0.59%) | ⬆️ |
| kafka_consumer | ? | |
| kong | 92.21% <ø> (ø) | |
| kube_apiserver_metrics | 97.35% <ø> (ø) | |
| kube_controller_manager | 96.85% <ø> (ø) | |
| kube_dns | 98.85% <ø> (ø) | |
| kube_metrics_server | 100.00% <ø> (ø) | |
| kube_proxy | 100.00% <ø> (ø) | |
| kube_scheduler | 96.20% <ø> (ø) | |
| kubelet | 89.61% <ø> (ø) | |
| kubernetes_state | 89.52% <0.00%> (ø) | |
| kyototycoon | 85.96% <ø> (ø) | |
| lighttpd | 83.64% <ø> (ø) | |
| linkerd | 85.14% <ø> (+1.14%) | ⬆️ |
| linux_proc_extras | 96.22% <ø> (ø) | |
| mapr | 82.62% <ø> (ø) | |
| mapreduce | 81.30% <ø> (ø) | |
| marathon | 83.12% <ø> (ø) | |
| marklogic | ? | |
| mcache | 93.52% <ø> (ø) | |
| mesos_master | 90.68% <ø> (ø) | |
| mesos_slave | 93.63% <ø> (ø) | |
| mongo | ? | |
| mysql | ? | |
| nagios | 89.53% <ø> (ø) | |
| network | 77.76% <ø> (+1.00%) | ⬆️ |
| nfsstat | 95.20% <ø> (ø) | |
| nginx | 94.62% <ø> (+0.86%) | ⬆️ |
| nginx_ingress_controller | 98.30% <ø> (ø) | |
| openldap | 96.33% <ø> (ø) | |
| openmetrics | 97.14% <ø> (ø) | |
| openstack | 51.30% <ø> (ø) | |
| openstack_controller | 90.74% <ø> (ø) | |
| oracle | 93.65% <ø> (+0.52%) | ⬆️ |
| pdh_check | 95.65% <ø> (ø) | |
| pgbouncer | 90.45% <ø> (ø) | |
| php_fpm | 90.04% <ø> (+0.43%) | ⬆️ |
| postfix | 88.04% <ø> (ø) | |
| postgres | ? | |
| powerdns_recursor | ? | |
| process | 85.07% <ø> (+0.28%) | ⬆️ |
| prometheus | 94.17% <ø> (ø) | |
| proxysql | 98.97% <100.00%> (ø) | |
| rabbitmq | ? | |
| redisdb | 87.28% <ø> (+0.31%) | ⬆️ |
| rethinkdb | 97.93% <ø> (ø) | |
| riak | 99.22% <ø> (ø) | |
| riakcs | ? | |
| sap_hana | ? | |
| scylla | ? | |
| singlestore | 90.81% <ø> (ø) | |
| snmp | ? | |
| snowflake | ? | |
| sonarqube | ? | |
| spark | ? | |
| sqlserver | ? | |
| squid | 100.00% <ø> (ø) | |
| ssh_check | 91.58% <ø> (ø) | |
| statsd | 87.36% <ø> (+1.05%) | ⬆️ |
| supervisord | 92.30% <ø> (ø) | |
| system_core | 91.04% <ø> (ø) | |
| system_swap | 98.30% <ø> (ø) | |
| tcp_check | 88.83% <ø> (ø) | |
| teamcity | 80.00% <ø> (ø) | |
| tls | 97.04% <ø> (+0.87%) | ⬆️ |
| tokumx | 58.40% <ø> (?) | |
| twemproxy | 78.33% <ø> (ø) | |
| twistlock | 80.25% <ø> (ø) | |
| varnish | 84.57% <ø> (+0.24%) | ⬆️ |
| vault | ? | |
| vertica | ? | |
| voltdb | ? | |
| vsphere | ? | |
| win32_event_log | ? | |
| windows_service | ? | |
| wmi_check | ? | |
| yarn | ? | |
| zk | ? | |

Flags with carried forward coverage won't be shown. Click here to find out more.

@fanny-jiang fanny-jiang deleted the fanny/om-include-labels branch October 26, 2021 16:44
@fanny-jiang fanny-jiang restored the fanny/om-include-labels branch October 26, 2021 16:44
@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@fanny-jiang fanny-jiang reopened this Oct 26, 2021
@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link
Contributor

@jtappa jtappa left a comment

Choose a reason for hiding this comment

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

👍🏻 from docs team

@fanny-jiang fanny-jiang merged commit 1cd174e into master Nov 8, 2021
@fanny-jiang fanny-jiang deleted the fanny/om-include-labels branch November 8, 2021 20:03
github-actions bot pushed a commit that referenced this pull request Nov 8, 2021
* initial commit for include_labels

* add tests

* add include_labels to v2, add tests

* resolve config sync

* update config specs

* sync configs and data models

* Revert "sync configs and data models"

This reverts commit c20bd3d.

* remove changes to config templates

* resync configs and models

* apply suggestions from review

* address comments from review, add tests

* add additional tests for more v1 coverage

* clean up tests 1cd174e
if not isinstance(entry, str):
raise ConfigurationError(f'Entry #{i} of setting `include_labels` must be a string')
if entry in self.exclude_labels:
self.log.debug(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should have been a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants