ghettovoice / gosip

SIP in Go
BSD 2-Clause "Simplified" License
430 stars 92 forks source link

[Feature Request] Export metrics of sip server. #49

Open YiuTerran opened 1 year ago

YiuTerran commented 1 year ago

When using in product env, we usually want to export service metrics to Prometheus.

For example, the client count (using TCP/UDP), transaction count, active dialog count, err rate, etc.

Maybe we should add some more functions for this purpose.

ghettovoice commented 1 year ago

Hello @YiuTerran , I agree that in prod env it can be useful. I can expose TCP connections number, transactions number, it should be quit easy. Dialogs is currently out of this lib's scope, so I'm not sure how to provide some reliable stats about them. And regarding errors rate, I guess it would be a complex task... However, probably it should be bound to some meaningful contexts, for example transactions error rate and so on. I need to think about this, there are quit a mess currently.

YiuTerran commented 1 year ago

I also searched for trace spec of sip, but only found this:

https://github.com/open-telemetry/semantic-conventions/issues/1114

maybe we can add just add traceparent and tracestate header just like the HTTP protocol.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.