crossplane-contrib / crossplane-provider-newrelic

Apache License 2.0
0 stars 3 forks source link

Upgrade crossplane-runtime and implement new metrics #17

Closed smcavallo closed 6 months ago

smcavallo commented 6 months ago

Signed-off-by: smcavallo smcavallo@hotmail.com

Description of your changes

Consume https://github.com/crossplane/crossplane-runtime/pull/683 and https://github.com/crossplane/upjet/pull/390.

Implements new metrics. Ex.

# HELP crossplane_managed_resource_exists The number of managed resources that exist
# TYPE crossplane_managed_resource_exists gauge
crossplane_managed_resource_exists{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Channel"} 0
crossplane_managed_resource_exists{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Destination"} 0
crossplane_managed_resource_exists{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Policy"} 0
crossplane_managed_resource_exists{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=Dashboard"} 0
crossplane_managed_resource_exists{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=DashboardJSON"} 0
crossplane_managed_resource_exists{gvk="log.newrelic.upbound.io/v1alpha1, Kind=ParsingRule"} 0
crossplane_managed_resource_exists{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=AlertCondition"} 0
crossplane_managed_resource_exists{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=DropRule"} 0
crossplane_managed_resource_exists{gvk="workflow.newrelic.upbound.io/v1alpha1, Kind=Workflow"} 0
# HELP crossplane_managed_resource_ready The number of managed resources in Ready=True state
# TYPE crossplane_managed_resource_ready gauge
crossplane_managed_resource_ready{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Channel"} 0
crossplane_managed_resource_ready{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Destination"} 0
crossplane_managed_resource_ready{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Policy"} 0
crossplane_managed_resource_ready{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=Dashboard"} 0
crossplane_managed_resource_ready{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=DashboardJSON"} 0
crossplane_managed_resource_ready{gvk="log.newrelic.upbound.io/v1alpha1, Kind=ParsingRule"} 0
crossplane_managed_resource_ready{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=AlertCondition"} 0
crossplane_managed_resource_ready{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=DropRule"} 0
crossplane_managed_resource_ready{gvk="workflow.newrelic.upbound.io/v1alpha1, Kind=Workflow"} 0
# HELP crossplane_managed_resource_synced The number of managed resources in Synced=True state
# TYPE crossplane_managed_resource_synced gauge
crossplane_managed_resource_synced{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Channel"} 0
crossplane_managed_resource_synced{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Destination"} 0
crossplane_managed_resource_synced{gvk="alert.newrelic.upbound.io/v1alpha1, Kind=Policy"} 0
crossplane_managed_resource_synced{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=Dashboard"} 0
crossplane_managed_resource_synced{gvk="dashboard.newrelic.upbound.io/v1alpha1, Kind=DashboardJSON"} 0
crossplane_managed_resource_synced{gvk="log.newrelic.upbound.io/v1alpha1, Kind=ParsingRule"} 0
crossplane_managed_resource_synced{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=AlertCondition"} 0
crossplane_managed_resource_synced{gvk="nrql.newrelic.upbound.io/v1alpha1, Kind=DropRule"} 0
crossplane_managed_resource_synced{gvk="workflow.newrelic.upbound.io/v1alpha1, Kind=Workflow"} 0

Fixes #

I have:

How has this code been tested