Can we monitor c# background Service using Prometheus

Hi Team,

I have added Prometheus packages into my application, but it is only monitoring HTTP, means only monitor API requests.

I want to monitor background services, want Prometheus matrics to track background services, means how many times, how long etc.

Can we do this using Prometheus ?

Thanks