Skip to content

Commit f914c14

Browse files
committed
PWA-1311: New Relic is not being given useful transaction names for graphql requests
- remove logging for introspection queries
1 parent c693842 commit f914c14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/GraphQl/Controller/GraphQl.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ public function dispatch(RequestInterface $request): ResponseInterface
189189
$jsonResult->setData($result);
190190
$jsonResult->renderResult($this->httpResponse);
191191

192-
// log information about the query
193-
$queryInformation = $this->logDataHelper->getRequestInformation($request, $data, $schema, $this->httpResponse);
194-
$this->loggerPool->execute($queryInformation);
192+
// log information about the query, unless it is an introspection query
193+
if (strpos($data['query'], 'IntrospectionQuery') === false) {
194+
$queryInformation = $this->logDataHelper->getRequestInformation($request, $data, $schema, $this->httpResponse);
195+
$this->loggerPool->execute($queryInformation);
196+
}
195197

196198
return $this->httpResponse;
197199
}

0 commit comments

Comments
 (0)