From 437bc764fb83087d036f89243d0ef2365ed2a67f Mon Sep 17 00:00:00 2001 From: Suvij Surya Date: Wed, 23 Oct 2024 17:41:31 +0530 Subject: [PATCH] fix: exclude query plan fetches from field usage count (#1297) --- router/core/operation_metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/core/operation_metrics.go b/router/core/operation_metrics.go index e7f432b269..c9da1ca5b0 100644 --- a/router/core/operation_metrics.go +++ b/router/core/operation_metrics.go @@ -55,7 +55,7 @@ func (m *OperationMetrics) Finish(ctx context.Context, err error, statusCode int rm.MeasureLatency(ctx, latency, attr...) rm.MeasureResponseSize(ctx, int64(responseSize), attr...) - if m.trackUsageInfo && opContext != nil { + if m.trackUsageInfo && opContext != nil && !opContext.executionOptions.SkipLoader { m.routerMetrics.ExportSchemaUsageInfo(opContext, statusCode, err != nil, exportSynchronous) } }