dbos-inc / dbos-transact

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
335 stars 22 forks source link

Better debug logging for HTTP requests parsing #431

Open maxdml opened 3 months ago

maxdml commented 3 months ago

Today, it isn't possible to print the body or headers of an HTTP request, before they are parsed with DBOS HTTP handler wrappers. It would be very useful to enable this when logLevel=debug.

Of course this needs a warning in the documentation: headers / body could contain secrets that should not be captured by the telemetry export infrastructure.

qianl15 commented 3 months ago

Today we can use KoaMiddleware https://docs.dbos.dev/api-reference/decorators#koamiddleware to achieve this.

maxdml commented 3 months ago

Yes but really not convenient and intuitive. It would be so much easier to configure the log level to debug and have these information available, than having to write a decorator, re build the app, etc