want a way to get a trace of api calls

Bug #520219 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Triaged
Low
Unassigned

Bug Description

api calls to Launchpad can be a bit slow. It would be nice if there was a way to see a trace of what's happening, so that we can either give the user some idea of progress, or so that the application author can get an idea of inefficient things they may be doing. Because it runs only over https you can't watch the requests at the network level.

Something like LAUNCHPADLIB_TRACE=1 would be nice, and would let it be turned on without app-specific patches.

Probably the output should go through python's logging module so it can be redirected.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 520219] [NEW] want a way to get a trace of api calls

On Thu, 11 Feb 2010 02:12:28 -0000, Martin Pool <email address hidden> wrote:
> Public bug reported:
>
> api calls to Launchpad can be a bit slow. It would be nice if there was
> a way to see a trace of what's happening, so that we can either give the
> user some idea of progress, or so that the application author can get an
> idea of inefficient things they may be doing. Because it runs only over
> https you can't watch the requests at the network level.
>
> Something like LAUNCHPADLIB_TRACE=1 would be nice, and would let it be
> turned on without app-specific patches.

Do you know about "import httplib2; httplib2.debuglevel = 1"?

It's not suitable for displaying to users, and it doesn't satisy your
last constraint, but I use it for looking at the requests when
developing.

It may be useful to you until this bug is fixed.

Thanks,

James

Revision history for this message
Martin Pool (mbp) wrote :

On 11 February 2010 14:09, James Westby <email address hidden> wrote:
> On Thu, 11 Feb 2010 02:12:28 -0000, Martin Pool <email address hidden> wrote:
>> Public bug reported:
>>
>> api calls to Launchpad can be a bit slow.  It would be nice if there was
>> a way to see a trace of what's happening, so that we can either give the
>> user some idea of progress, or so that the application author can get an
>> idea of inefficient things they may be doing.  Because it runs only over
>> https you can't watch the requests at the network level.
>>
>> Something like LAUNCHPADLIB_TRACE=1 would be nice, and would let it be
>> turned on without app-specific patches.
>
> Do you know about "import httplib2; httplib2.debuglevel = 1"?
>
> It's not suitable for displaying to users, and it doesn't satisy your
> last constraint, but I use it for looking at the requests when
> developing.
>
> It may be useful to you until this bug is fixed.

I didn't; thanks.
--
Martin <http://launchpad.net/~mbp/>

Changed in launchpadlib:
status: New → Triaged
importance: Undecided → Low
Martin Pool (mbp)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.