Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent: add per-endpoint proxy metrics #220

Merged
merged 1 commit into from
Feb 3, 2025
Merged

Conversation

andydunstall
Copy link
Owner

@andydunstall andydunstall commented Feb 3, 2025

Fixes #216, where if the agent runs multiple endpoints, it attempts to register the same metrics multiple times so panics.

This extends the proxy metrics to include an endpoint label, such as:

piko_agent_requests_total{endpoint="endpoint1",method="GET",status="200"} 1034
piko_agent_requests_total{endpoint="endpoint2",method="GET",status="200"} 1234

It also registers the metrics only once to avoid panicing.

(Based on approach in #217)

Fixes #216, where if the agent runs multiple endpoints, it attempts to
register the same metrics multiple times so panics.

This extends the proxy metrics to include an endpoint label, such as:
```
piko_agent_requests_total{endpoint="endpoint1",method="GET",status="200"} 1034
piko_agent_requests_total{endpoint="endpoint2",method="GET",status="200"} 1234
```

It also registers the metrics only once to avoid panicing.
@andydunstall andydunstall merged commit c1c4fdf into main Feb 3, 2025
3 checks passed
@andydunstall andydunstall deleted the fix-agent-metrics branch February 3, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiple http endpoints per agent
1 participant