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

metric-api: Add prometheus metrics #2060

Open
wants to merge 31 commits into
base: dev-next
Choose a base branch
from

Conversation

juvenn
Copy link

@juvenn juvenn commented Aug 24, 2024

It adds Prometheus metrics api, along with built-in go process metrics, it includes a few more packet metrics

  "experimental": {
    "metrics": {
      "listen": ":8080"
    }
  }
curl localhost:8080/metrics

# HELP inbound_packet_bytes Total bytes of inbound packets
# TYPE inbound_packet_bytes counter
inbound_packet_bytes{inbound="mixed-in",user=""} 1310
# HELP outbound_packet_bytes Total bytes of outbound packets
# TYPE outbound_packet_bytes counter
outbound_packet_bytes{outbound="DIRECT",user=""} 4081
outbound_packet_bytes{outbound="Proxies",user=""} 8704

It should close #87 and serves a starting point for #1564

RoutedPacketConnection(inbound string, outbound string, user string, conn N.PacketConn) N.PacketConn
type MetricService interface {
Service
PacketTracking
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is a good name, suggestions are welcome.

@juvenn
Copy link
Author

juvenn commented Aug 27, 2024

@nekohasekai PTAL, let me know if you've any questions.

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.

Feature request: Prometheus metrics
3 participants