Skip to content

Commit

Permalink
Save orchestrator address
Browse files Browse the repository at this point in the history
Signed-off-by: Dylan Schultz <[email protected]>
  • Loading branch information
dylanschultzie committed Dec 13, 2023
1 parent c9f9a7b commit 1d7ff10
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
HTTP_PORT = int(os.getenv('HTTP_PORT'))

# Define a Gauge metric to track peggo event lag
PEGGO_EVENT_LAG = Gauge('peggo_event_lag', 'Peggo event lag')
PEGGO_NETWORK_NONCE = Gauge('peggo_network_nonce', 'Injective network current peggo nonce')
PEGGO_ORCHESTRATOR_NONCE = Gauge('peggo_orchestrator_nonce', 'Peggo orchestrator nonce')
PEGGO_EVENT_LAG = Gauge('peggo_event_lag', 'Peggo event lag', ['orchestrator_address'])
PEGGO_NETWORK_NONCE = Gauge('peggo_network_nonce', 'Injective network current peggo nonce', ['orchestrator_address'])
PEGGO_ORCHESTRATOR_NONCE = Gauge('peggo_orchestrator_nonce', 'Peggo orchestrator nonce', ['orchestrator_address'])

def process_request():
node_addr = NODE_URL
Expand All @@ -26,9 +26,9 @@ def process_request():

event_lag = network_nonce - orchestrator_nonce

PEGGO_EVENT_LAG.set(event_lag)
PEGGO_NETWORK_NONCE.set(network_nonce)
PEGGO_ORCHESTRATOR_NONCE.set(orchestrator_nonce)
PEGGO_EVENT_LAG.labels(ORCHESTRATOR_ADDR).set(event_lag)
PEGGO_NETWORK_NONCE.labels(ORCHESTRATOR_ADDR).set(network_nonce)
PEGGO_ORCHESTRATOR_NONCE.labels(ORCHESTRATOR_ADDR).set(orchestrator_nonce)

def main():
start_http_server(HTTP_PORT)
Expand Down

0 comments on commit 1d7ff10

Please sign in to comment.