Home Is the tracing built in to ASP.Net Web Api 2 only meant for a non-production environment?
Reply: 1

Is the tracing built in to ASP.Net Web Api 2 only meant for a non-production environment?

CShark
1#
CShark Published in 2018-01-12 23:37:48Z

I read the Global Error Handling recommendations and the Tracing in Web API 2 articles, and I understand how to set these things up. However, I noticed in the error handling part, that it states:

While Web API does have tracing infrastructure that captures error conditions the tracing infrastructure is for diagnostics purposes and is not designed or suited for running in production environments. Global exception handling and logging should be services that can run during production and be plugged into existing monitoring solutions

I'm looking for clarification on this. Is this statement saying that errors should only be logged as part of the trace when not in production, or that a custom implementation of ITraceWriter should only be registered with the HttpConfiguration when not in production?

I would assume that the article says

not designed or suited for running in production environments

simply for the performance impact, but is there some different contextual info that I could see for a specific error by looking at the Exception on the TraceRecord vs. the Exception that gets passed into the IExceptionLogger?

MickyD
2#
MickyD Reply to 2018-01-13 00:37:29Z

Going by what was written, it's meant as a rudimentary form of tracing and logging that whilst fine for developer and diagnostic environments is not for production due to performance and feature reasons.

To be due-diligent it advises to use an out-of-process service (eg log4net in a separate process or take your pick from Azure) so as to reduce probability of logging failing due to a fault in the core process; room to expand performance; and potential for a more feature rich logging system not provided in the default design.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304168 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO