Skip to content

Commit

Permalink
Merge pull request #186 from appuio/feat/info-metric-no-be
Browse files Browse the repository at this point in the history
Remove billing entity information from `appuio_control_organization_info` metric
  • Loading branch information
HappyTetrahedron authored Dec 19, 2023
2 parents 1f9af43 + ae24f36 commit f852eaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions controllers/org_info_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
var orgInfoMetricDesc = prometheus.NewDesc(
"appuio_control_organization_info",
"Information about APPUiO Cloud organizations",
[]string{"organization", "billing_entity", "sales_order"},
[]string{"organization", "sales_order"},
nil,
)

Expand Down Expand Up @@ -47,7 +47,6 @@ func (o *OrgInfoMetric) Collect(ch chan<- prometheus.Metric) {
prometheus.GaugeValue,
1,
org.Name,
org.Spec.BillingEntityRef,
org.Status.SaleOrderName,
)
}
Expand Down
6 changes: 3 additions & 3 deletions controllers/org_info_metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ func TestOrgInfoMetric(t *testing.T) {
testutil.CollectAndCompare(&controllers.OrgInfoMetric{c}, strings.NewReader(`
# HELP appuio_control_organization_info Information about APPUiO Cloud organizations
# TYPE appuio_control_organization_info gauge
appuio_control_organization_info{billing_entity="be-1734",organization="blub-org",sales_order=""} 1
appuio_control_organization_info{billing_entity="be-234",organization="foo-org",sales_order="SO9999"} 1
appuio_control_organization_info{billing_entity="test-billing-entity",organization="test-org",sales_order=""} 1
appuio_control_organization_info{organization="blub-org",sales_order=""} 1
appuio_control_organization_info{organization="foo-org",sales_order="SO9999"} 1
appuio_control_organization_info{organization="test-org",sales_order=""} 1
`),
"appuio_control_organization_info"),
)
Expand Down

0 comments on commit f852eaa

Please sign in to comment.