From fd4f55877352659feabd73640fb0816caec3dee9 Mon Sep 17 00:00:00 2001 From: vvakame Date: Wed, 31 Oct 2018 18:14:24 +0900 Subject: [PATCH] fix timing issue --- gqlapollotracing/middleware.go | 1 - gqlapollotracing/tracer.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gqlapollotracing/middleware.go b/gqlapollotracing/middleware.go index 9f6721c1c2f..2f2ce31eaad 100644 --- a/gqlapollotracing/middleware.go +++ b/gqlapollotracing/middleware.go @@ -12,7 +12,6 @@ func RequestMiddleware() graphql.RequestMiddleware { reqCtx := graphql.GetRequestContext(ctx) td := getTracingData(ctx) - td.prepare() err := reqCtx.RegisterExtension("tracing", td) if err != nil { diff --git a/gqlapollotracing/tracer.go b/gqlapollotracing/tracer.go index e654d45240a..fc204f87ac0 100644 --- a/gqlapollotracing/tracer.go +++ b/gqlapollotracing/tracer.go @@ -103,4 +103,5 @@ func (t *tracerImpl) EndFieldExecution(ctx context.Context) { func (t *tracerImpl) EndOperationExecution(ctx context.Context) { td := getTracingData(ctx) td.EndTime = timeNowFunc() + td.prepare() }