Private
Public Access
1
0

Update tracing API
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-10-22 12:01:43 -07:00
parent f9b521664d
commit ceddc2564d
7 changed files with 40 additions and 38 deletions

View File

@@ -9,6 +9,7 @@ import (
"golang.org/x/sync/errgroup"
"go.ntppool.org/common/logger"
"go.ntppool.org/common/tracing"
chdb "go.ntppool.org/data-api/chdb"
"go.ntppool.org/data-api/ntpdb"
)
@@ -20,11 +21,12 @@ const pointSymbol = "‱"
// const pointSymbol = "‰"
func (srv *Server) dnsAnswers(c echo.Context) error {
log := logger.Setup()
ctx := c.Request().Context()
ctx, span := tracing.Tracer().Start(ctx, "dnsanswers")
defer span.End()
c.Response().Header().Set("Cache-Control", "max-age=20")
// conn, err := srv.chConn(ctx)

View File

@@ -57,7 +57,7 @@ func NewServer(ctx context.Context, configFile string) (*Server, error) {
return nil, err
}
srv.tracer = tracing.NewTracer("data-api-tracer")
srv.tracer = tracing.Tracer()
return srv, nil
}