-
Notifications
You must be signed in to change notification settings - Fork 23
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
Roadmap suggestion: Prometheus integration #33
Comments
It sounds like a useful addition, but I'm trying to do it keep the binary size down so irtt can be run on embedded devices. If I compile the binary as is, the size is 3983781. If I compile referencing the prometheus libs, the size increases 10049128. So, it's not something I would add by default. It could be done with build tags. Another option is to write a separate program to take the json and do whatever you want to do with prometheus separately. I'll leave the issue open in case someone wants to work on it... |
Re: Seperate program taking JSON, I did start experimenting with that, but quickly found it would be nice if irtt codebase was made more friendly for use as a go library. For example, I thought I the obvious easy solution would be to Unmarshal into the JSON struct from your codebase, but that failed miserably ( I can't remember the error now since I abandoned that test code but something like "unable to unmarshal text into irtt.Time") so I ended up having to write up my own structs. Also in general, making it easier to call measurement runs directly from go instead of having to call-out to |
Right, it could be useful. If someone writes it and keeps it opt-in with build tags I'll consider pulling that in... |
First thank you for your work on this great project which I have only discovered today !
Could I put the idea in your minds to add Prometheus integration to irtt.
To be more specific:
irtt-client
support for Prometheus text-based exposition. This would enableirtt-client
to publish output in a directory for collection bynode_exporter
when running with the--collector.textfile.directory
flag; and/orirtt-server
publish a http metrics page for Prometheus to scrapeGiven that both
irtt
andprometheus
are written in Go and prometheus publish Go libraries, I think this should be relatively straightforward to implement. I'm a noob to Go programming but even I managed to hack together something (for my own personal unrelated project) that exports to text file using the following calls from the Prometheus go library:The text was updated successfully, but these errors were encountered: