linode / provider-linode

Provider Linode is a Crossplane provider for managing Linode Akamai Cloud Computing resources.
Apache License 2.0
12 stars 9 forks source link

New upjet + Api Call counter metrics #35

Closed tchinmai7 closed 4 months ago

tchinmai7 commented 4 months ago

Description of your changes

  1. Bump to latest upjet 1.4.0
  2. Introduce a API call counter middleware to count api requests, grouped by URL and method
  3. bump go version to 1.22
  4. Use crossplane/build instead of upbound/build - see https://github.com/crossplane-contrib/provider-upjet-aws/pull/1313
  5. Set user-agent for requests to the linode api

Fixes #

I have:

How has this code been tested

Running this locally, and creating an instance, I see

# HELP linode_api_calls_total Number of API calls to the Linode API
# TYPE linode_api_calls_total counter
linode_api_calls_total{method="GET",url="linode/instances/59257627"} 1
linode_api_calls_total{method="GET",url="linode/instances/59257627/configs"} 1
linode_api_calls_total{method="GET",url="linode/instances/59257627/disks"} 1
linode_api_calls_total{method="GET",url="linode/instances/59257627/ips"} 1