Re: [Bug 181331] Re: Provide statistics on access to hosted branches
On Fri, Mar 26, 2010 at 3:24 PM, Michael Widenius <monty@askmonty.org> wrote:
>
> Hi!
>
>>>>>> "Jonathan" == Jonathan Lange <jml@canonical.com> writes:
>
> Jonathan> We'd first need to log access to branches. I've got some thoughts on how
> Jonathan> to do this, but no time to write the code. If you're interested in
> Jonathan> writing the code, let me know, and I'll help as much as I can.
>
> If you could summarize the thoughts you have about this into this bug
> report, we will see if we can allocate someone to help you with coding
> this.
- We already have some logging code in lp.codehosting.sshserver.accesslog.
- Extend this API to have new events for reading from a branch and
writing to a branch.
- In the bzr lp-serve plugin, emit an event the first time a branch
is read from and the first time a branch is written to
- Do not emit log events then, but rather wait until the client has
disconnected and then emit one event, either read or write
- The logged details should include the version of the Bazaar client
(if known) and the branch that was accessed
- This code should be written at the level of the transport or lower,
so we can re-use between the lp-serve plugin and the sftp server
I'm fiddling around with some of this code now, extracting the code
from codehosting that isn't codehosting specific so that it can be
re-used in other Launchpad SSH servers. Don't let this block you if
you want to pursue further.
Hope this helps,
jml
Re: Provide statistics on access to hosted branches
WANT