-
Notifications
You must be signed in to change notification settings - Fork 7
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
encrypted messages stats #20
encrypted messages stats #20
Conversation
Side note: There's two commits in here, aside of the actual change I fixed a mistake in the descriptions of the daily_messages and daily_sent_messages stats. |
If memory serves me correct, we've been doing them by hand. |
This might benefit from some tests added, see https://github.com/matrix-org/panopticon/tree/master/tests This would be adding a new file |
I was about to do that when I wrote the code, and then realized that the tests there already don't include most of the metrics. If you still think it's helpful, I can do it, but I'm not really convinced. Aside of that, the test cases are not in great shape in general. The lines are freakishly long, most test cases are duplicated among the scripts anyway. Instead, it'd probably make more sense to unify those into a single script, and have a few json/csv files with the request body/expected result in them. While I obviously have opinions about this, I don't really feel like fixing it in the current state. This whole repo is a bit messy, home-grown shell based tests, no db migrations, two different languages, etc. For those reasons, we're currently considering @ famedly.com to just rewrite panopticon in rust, having a single tool that does both collection and aggregation, including database migration and tests run inside cargo test directly. If we were to do that, and released it under a license you're happy with, would you consider using it as well and collaborating on it? I don't think it makes much sense to have two separate implementations for this, but at the same time, the current implementation of panopticon is really a pain to work on and upgrade. If it makes much of a difference to you, I'm relatively sure we could also donate the code to the matrix foundation and have it live here, as a replacement for the current implementation. Updated state: We've started implementing this as an intro project for a new hire, so it'll likely take a bit longer than originally anticipated, but expect this to become available soon-ish. |
Hi @jcgruenhage thanks for the PR (sorry for the lag), this is really great. I would like to see tests, be we can handle that. In terms of the codebase overall, it is true that it could do with some love, but I would prefer to evolve what we have rather than rewrite, not least because the team principally maintaining it has more experience in Go and Python than Rust. Obviously, nothing stops you from rewriting anyway, but the matrix.org hosted panopticon will continue to run the existing implementation. On the plus side, this might be the kick we need to do some basic modernising 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM merging as is. Tests to follow.
No worries, we need this too obviously, since we're still running panopticon ourselves
I totally get that having a zoo of languages is problematic, which is one of the reasons we chose to go with Rust, because our backend team has more experience with Rust. As for maintainership tasks: We can handle all that, and we'll definitely add all metrics that end up being send by synapse, so there's basically nothing you'd need to do here, if you wanted to use it.
👍
And if not, we'll always be happy to have you on our implementation if you end up changing your mind. |
I wanted to write a DB migration for this, but it seems like panopticon doesn't handle migrations at all. How have you been dealing with this internally, are these migrations part of your secret ansible sauce, or are you doing the migrations by hand?