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

Add metrics endpoint #46

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Add metrics endpoint #46

merged 1 commit into from
Dec 24, 2024

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Dec 23, 2024

Add a Prometheus metrics endpoint.

  • Expose some srt socket stats.
  • Bump minimum Go version to 1.21.
  • Update Go build to 1.23.
  • Cleanup Makfile.

@SuperQ
Copy link
Contributor Author

SuperQ commented Dec 23, 2024

Note, this is just a quick start to get something testable. I don't know much about SRT, so I have only test that this compiles and returns some basic process metrics.

@SuperQ SuperQ changed the title [wip] Add metrics endpoint Add metrics endpoint Dec 23, 2024
Add a Prometheus metrics endpoint.
* Expose some srt socket stats.
* Bump minimum Go version to 1.21.
* Update Go build to 1.23.
* Cleanup Makfile.

Signed-off-by: SuperQ <[email protected]>
@danimo
Copy link
Contributor

danimo commented Dec 24, 2024

LGTM!

n.b. I'm not a big fan of enabling metrics by default, but that can be remedied by another PR.

@danimo danimo merged commit 6f4ef3f into voc:master Dec 24, 2024
2 checks passed
@SuperQ
Copy link
Contributor Author

SuperQ commented Dec 24, 2024

n.b. I'm not a big fan of enabling metrics by default, but that can be remedied by another PR.

Any specific reason? This implements essentially the same metrics system as is done in the api package HandleStreams() function. The stats are produce by that json API endpoint are stored exactly the same way in Prometheus client_golang, as an atomic.Value.

Only the Prometheus library and format are more efficient for output since it's protbuf/optimized text instead of JSON.

@SuperQ SuperQ deleted the metrics branch December 24, 2024 09:55
@iSchluff
Copy link
Member

Fyi the reason for the strange Makefile is the voc debian package build.
As of this PR that wont work anymore, but I also haven't come up with a good idea yet to solve both debian builds and local builds.

@SuperQ
Copy link
Contributor Author

SuperQ commented Dec 24, 2024

Oh, ok. I can take a look at the Debian setup

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.

3 participants