Add an ochealth package that adds a producer to the OpenCensus producer
global manager so that a health server's state can be exported as metrics.
Export the healthData struct as State to support this.
Also add an IsHealthEndpoint() function that can be used with the OpenCensus
ochttp plugin for collecting http server stats and injecting trace headers so
that it ignores requests to the health endpoints and does not accumulate stats
or traces on them.
Add an
ochealth
package that adds a producer to the OpenCensus producer global manager so that a health server's state can be exported as metrics. Export thehealthData
struct asState
to support this.Also add an
IsHealthEndpoint()
function that can be used with the OpenCensusochttp
plugin for collecting http server stats and injecting trace headers so that it ignores requests to the health endpoints and does not accumulate stats or traces on them.