Skip to content

Commit

Permalink
Add telemetry for get configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Dec 20, 2024
1 parent e5a747f commit 2c431df
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nodeman/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
nodes_public_key_queries = meter.create_counter(
"nodes.public_key_queries", description="The number of node public keys queried"
)
node_configurations_requested = meter.create_counter(
"nodes.configurations", description="The number of node configurations requested"
)

router = APIRouter()

Expand Down Expand Up @@ -362,4 +365,8 @@ async def get_node_configuration(
logging.debug("Node %s not activated", name, extra={"nodename": name})
raise HTTPException(status.HTTP_400_BAD_REQUEST, detail="Node not activated")

return create_node_configuration(name=name, request=request)
res = create_node_configuration(name=name, request=request)

node_configurations_requested.add(1)

return res

0 comments on commit 2c431df

Please sign in to comment.