docs: add telemetry docs

This commit is contained in:
Vikram Rangnekar
2020-05-24 10:44:00 -04:00
parent 1344246287
commit 31afdac3af
8 changed files with 89 additions and 6 deletions

View File

@ -7,8 +7,8 @@ import (
var healthyResponse = []byte("All's Well")
func health(w http.ResponseWriter, _ *http.Request) {
ct, cancel := context.WithTimeout(context.Background(), conf.DB.PingTimeout)
func health(w http.ResponseWriter, r *http.Request) {
ct, cancel := context.WithTimeout(r.Context(), conf.DB.PingTimeout)
defer cancel()
if err := db.PingContext(ct); err != nil {

View File

@ -216,7 +216,7 @@ func initDB(c *Config, useDB, useTelemetry bool) (*sql.DB, error) {
if useTelemetry && conf.telemetryEnabled() {
opts := ocsql.TraceOptions{
AllowRoot: false,
AllowRoot: true,
Ping: true,
RowsNext: true,
RowsClose: true,