> On Mar 4, 2021, at 9:01 PM, Robert DiFalco <robert.difa...@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
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to