pion / turn

Pion TURN, an API for building TURN clients and servers
MIT License
1.87k stars 319 forks source link

Prometheus metrics based on allocation? #401

Closed matiaslopezd closed 3 weeks ago

matiaslopezd commented 4 months ago

Hi guys, I want to implement Prometheus metrics to know things like:

# TYPE turn_active_connections gauge
turn_active_connections 0
# HELP turn_total_connections Total number of TURN connections
# TYPE turn_total_connections counter
turn_total_connections 0
rg0now commented 4 months ago

Currently Prometheus metric exporting is not available in pion/turn and I think this will remain so for the foreseeable future: pion/turn is a reusable software module that you can use to implement your own TURN speaker on top, and it is expected that your implementation should generate itw own Prom metrics using the pion/turn API. For instance, the value for the turn_active_connections gauge can be generated dynamically using the Server.AllocationCount call. Is there any specific function you miss in the API to implement your metrics?

rg0now commented 3 weeks ago

Closing this for now, feel free to reopen if new input becomes available.