Skip to content

Commit 88c0f14

Browse files
committed
add metric and observation call
1 parent df26949 commit 88c0f14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/cloud/services/networking/floatingip.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ func (s *Service) GetOrCreateFloatingIP(openStackCluster *infrav1.OpenStackClust
5757
}
5858

5959
if len(openStackCluster.Spec.Tags) > 0 {
60+
mc := metrics.NewMetricPrometheusContext("floating_ip", "update")
6061
_, err = attributestags.ReplaceAll(s.client, "floatingips", fp.ID, attributestags.ReplaceAllOpts{
6162
Tags: openStackCluster.Spec.Tags,
6263
}).Extract()
63-
if err != nil {
64+
if mc.ObserveRequest(err) != nil {
6465
return nil, err
6566
}
6667
}

0 commit comments

Comments
 (0)