Disable traces and metrics
Opened this issue · 0 comments
I need to add an options for disabling traces and metrics for the client and server separately. Names for those parameters will be -no-client-traces
, -no-server-traces
, -no-client-metrics
and -no-server-metrics
.
First of all this need to me to disable traces and metrics on code generating stage. I know that I can pass NoopTracer
from the client code which will use this library, but why? If I know I don't need this code, I just need to be able to turn it off.
Usecase for that. I want to have the monitor server (liveness, readiness, etc.) and API server with the same code base. With current configuration I will get monitor server with traces and metrics. I no need this. I want statically generate the server and use it in every service.
Secondly, I do not like how it designed, so I want to rewrite it for myself in the next issue. NOTE: that could be done with middleware not for the Handler
, but for the standard http.Handler
.