[Buildbot-devel] PyCon talk on logging and metrics

Maria Marcano mariangemarcano at gmail.com
Fri May 8 19:35:19 UTC 2015


Daniel handled the setup I think he just followed the instructions
here to setup sentry:
http://sentry.readthedocs.org/en/latest/quickstart/#install-sentry

We also setup raven on the build master (pip install raven), this is
the client (raven-python) here the instructions:
https://raven.readthedocs.org/en/latest/index.html

Then create a project on sentry, we are creating a project per master,
maybe too many for you :-)

And here is an example of what we added at the end of master.cfg

####### Sentry

from twisted.python import log
from raven import Client

####### the below is generated on sentry when you create the project
client = Client('http://fb9f9e31ea4f40d48855c603f15a2aa4:
6e968b3d8ba240fcb50072ad9cba0810 at example.com/1')


def logToSentry(event):

    if not event.get('isError') or 'failure' not in event:
        return

    f = event['failure']
    client.captureException((f.type, f.value, f.getTracebackObject()))

log.addObserver(logToSentry)

Hope this helps,
Maria

On Fri, May 8, 2015 at 6:49 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
> Oh, that's great to hear about.  Do you think it would make a good
> blog entry?  At Mozilla we have a crontask that scours twistd.log for
> tracebacks and emails them to us.. it's not the greatest.  It'd be
> nice to have a better example to point to!
>
> Dustin
>
> On Fri, May 8, 2015 at 8:17 AM, Maria Marcano <mariangemarcano at gmail.com> wrote:
>> Hi,
>>
>> We started using sentry and so far is looking really good, we are
>> aggregating the logs of different masters, and noticing the issues
>> sooner.
>>
>>
>> On Sat, Apr 18, 2015 at 1:07 AM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
>>> We had some pretty intense discussion (in various forums) about
>>> gathering metrics from Buildbot in a way that would be useful to users
>>> deploying the framework.
>>>
>>> I saw a talk at PyCon that addressed a lot of these issues in a nice,
>>> consistent fashion:
>>>   http://pyvideo.org/video/3479/beyond-grep-practical-logging-and-metrics
>>> It's by Hynek Schlawack and entitled "Beyond grep: Practical Logging
>>> and Metrics"
>>>
>>> There were lots of good talks at PyCon and I encourage everyone to
>>> watch them -- this one just struck me as particularly germane.
>>>
>>> Dustin
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>> _______________________________________________
>>> Buildbot-devel mailing list
>>> Buildbot-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel




More information about the devel mailing list