Here we expose a metrics endpoint for Prometheus to scrape the network function. Right now, we are only exposing the default Go metrics, allowing users to know whether the service is running or not in addition to valuable information (ex. memory usage, num. of goroutines, etc).
Screenshot
For example, we can now have a dashboard that tells us the status of the network function:
Implementation
We take the same approach to metrics as is done in the AMF, we create a metrics/telemetry.go file and we instantiate the server during the service startup.
Notes
If approved, we will make similar PR's in every network function.
Future Considerations
With this in place, it will be straightforward to add bespoke metrics to the network function.
Description
Here we expose a
metrics
endpoint for Prometheus to scrape the network function. Right now, we are only exposing the default Go metrics, allowing users to know whether the service is running or not in addition to valuable information (ex. memory usage, num. of goroutines, etc).Screenshot
For example, we can now have a dashboard that tells us the status of the network function:
Implementation
We take the same approach to metrics as is done in the AMF, we create a
metrics/telemetry.go
file and we instantiate the server during the service startup.Notes
If approved, we will make similar PR's in every network function.
Future Considerations
With this in place, it will be straightforward to add bespoke metrics to the network function.