Skip to content

Commit

Permalink
Merge pull request #30 from cardano-foundation/develop
Browse files Browse the repository at this point in the history
fix: cope with inboundGovernor metrics missing
  • Loading branch information
oversize authored Oct 17, 2024
2 parents 74de66e + 6bd4396 commit 87f6f67
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/blockperf/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ def mqtt_payload_from(self, sample: BlockSample) -> dict:
if endpoint := self.app_config.prometheus_endpoint:
metrics = self.prometheus_metrics(endpoint)
if metrics:
payload["inboundGovernor_hot"] = int(
metrics.get("cardano_node_metrics_inboundGovernor_hot")
)
payload["inboundGovernor_warm"] = int(
metrics.get("cardano_node_metrics_inboundGovernor_warm")
)
hot = metrics.get("cardano_node_metrics_inboundGovernor_hot")
if hot:
payload["inboundGovernor_hot"] = int(hot)
warm = metrics.get("cardano_node_metrics_inboundGovernor_warm")
if warm:
payload["inboundGovernor_warm"] = int(warm)
return payload

def ensure_maxblocks(self):
Expand Down

0 comments on commit 87f6f67

Please sign in to comment.