Im trying to monitor a simple application using prometheus but not sure where to start.
I created a simple test function that will sleep for 10 seconds and I track with prometheus - Summary metric.
from prometheus_client import Summary
import time
from datetime import datetime
TF_CALL_SUMMARY = Summary("call_seconds", "Time spent inside test function")
def test():
while True:
t1 = datetime.now()
time.sleep(10)
t2 = datetime.now()
delta = t2 - t1
TF_CALL_SUMMARY.observe(delta.total_seconds())
print delta
print 'start application'
test()
print 'end application'
Now this is not a web application that can have a /metric endpoint.
How can I export this Metric to my prometheus server?