38 lines
991 B
Python
38 lines
991 B
Python
"""Prometheus stats."""
|
|
from prometheus_client import Counter, Gauge, Info
|
|
|
|
tasks_info = Info("jarvis_tasks", "JARVIS Task info")
|
|
|
|
reddit_gauge = Gauge(
|
|
"jarvis_tasks_reddit_follows",
|
|
"JARVIS Reddit follows",
|
|
labelnames=["subreddit_name"],
|
|
)
|
|
reddit_count = Counter(
|
|
"jarvis_tasks_reddit_count",
|
|
"JARVIS Reddit sync count",
|
|
labelnames=["guild_id", "guild_name", "subreddit_name"],
|
|
)
|
|
|
|
twitter_gauge = Gauge(
|
|
"jarvis_tasks_twitter_follows",
|
|
"JARVIS twitter follows",
|
|
labelnames=["twitter_handle"],
|
|
)
|
|
twitter_count = Counter(
|
|
"jarvis_tasks_twitter_count",
|
|
"JARVIS twitter sync count",
|
|
labelnames=["guild_id", "guild_name", "twitter_handle"],
|
|
)
|
|
|
|
# Gauge currently not used
|
|
reminder_gauge = Gauge(
|
|
"jarvis_tasks_reminders",
|
|
"JARVIS reminders gauge",
|
|
labelnames=["guild_id", "guild_name"],
|
|
)
|
|
reminder_count = Counter(
|
|
"jarvis_tasks_reminders_count",
|
|
"JARVIS reminders notified count",
|
|
labelnames=["guild_id", "guild_name"],
|
|
)
|