[Twisted-Python] Klein?

Glyph glyph at twistedmatrix.com
Thu Mar 4 23:42:18 MST 2021



> On Mar 4, 2021, at 9:01 PM, Robert DiFalco <robert.difalco at gmail.com> wrote:
> 
> Thanks! The trick will be figuring out how to handle Python exception vs werkzeug exception, and the branched, error handling routes etc. Currently this is the sort of data structure I'm posting to Data Dog. But I can make it a pluggable observer-type idiom so anything can receive these metrics. 
> 
> tags=[
>     "path:{}.{}.{}".format(module, className, method),
>     "blocking:{}".format(isBlocking),
>     "module:{}".format(module),
>     "class:{}".format(className),
>     "method:{}".format(method),
>     "status_code:{}".format(request_code),
>     "status_code_class:{}xx".format(status_code_class),
> ]
> metrics.timing("my.rest.endpoint", elapsed, tags=tags)
> I don't have it quite right yet. It's hard to get the status code, deal with unhandled exceptions, etc. But I'll post questions here when I'm closer. 
> 

Nifty. Thanks for working on this.  I look forward to your PR!

-g
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20210304/37bb23ac/attachment-0001.htm>


More information about the Twisted-Python mailing list