census-instrumentation / opencensus-python

A stats collection and distributed tracing framework
Apache License 2.0
668 stars 250 forks source link

How to include request body for 4XX status codes #1198

Open cirezd opened 1 year ago

cirezd commented 1 year ago

Hello everyone,

I have an API using the fastAPI OpenCensus Instrumentation and I am sending the data to Azure Application Insights. I am wondering how to include the request body for post requests that result in a 4XX status code? Our customers embed our application into their website and seeing the body for 404 or 422 status codes would help to debug their issues quite a bit.

I use the following packages: opencensus-ext-fastapi==0.1.0 opencensus-ext-logging==0.1.1 opencensus-ext-azure==1.1.8

Thanks!

lzchen commented 1 year ago

@jeremydvoss