@@ -261,7 +261,7 @@ func (s *Server[RawConfiguration, Configuration, State]) QueryExplain(w http.Res
261261 attribute .String ("reason" , "json_decode" ),
262262 }
263263 span .SetAttributes (attributes ... )
264- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (attributes ... ))
264+ s .telemetry .queryExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (attributes ... ))
265265 return
266266 }
267267 decodeSpan .End ()
@@ -280,7 +280,7 @@ func (s *Server[RawConfiguration, Configuration, State]) QueryExplain(w http.Res
280280 attribute .String ("reason" , fmt .Sprintf ("%d" , status )),
281281 }
282282 span .SetAttributes (attributes ... )
283- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttributes ... )... ))
283+ s .telemetry .queryExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttributes ... )... ))
284284 return
285285 }
286286 execSpan .End ()
@@ -290,10 +290,10 @@ func (s *Server[RawConfiguration, Configuration, State]) QueryExplain(w http.Res
290290 _ , responseSpan := s .telemetry .Tracer .Start (ctx , "Response" )
291291 writeJson (w , logger , http .StatusOK , response )
292292 responseSpan .End ()
293- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttribute )... ))
293+ s .telemetry .queryExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttribute )... ))
294294
295295 // record latency for success requests only
296- s .telemetry .explainLatencyHistogram .Record (r .Context (), time .Since (startTime ).Seconds (), metric .WithAttributes (collectionAttr ))
296+ s .telemetry .queryExplainLatencyHistogram .Record (r .Context (), time .Since (startTime ).Seconds (), metric .WithAttributes (collectionAttr ))
297297}
298298
299299// MutationExplain implements a handler for the /mutation/explain endpoint, POST method that explains a mutation by creating an execution plan.
@@ -320,7 +320,7 @@ func (s *Server[RawConfiguration, Configuration, State]) MutationExplain(w http.
320320 attribute .String ("reason" , "json_decode" ),
321321 }
322322 span .SetAttributes (attributes ... )
323- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (attributes ... ))
323+ s .telemetry .mutationExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (attributes ... ))
324324 return
325325 }
326326 decodeSpan .End ()
@@ -343,7 +343,7 @@ func (s *Server[RawConfiguration, Configuration, State]) MutationExplain(w http.
343343 attribute .String ("reason" , fmt .Sprintf ("%d" , status )),
344344 }
345345 span .SetAttributes (attributes ... )
346- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttributes ... )... ))
346+ s .telemetry .mutationExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttributes ... )... ))
347347 return
348348 }
349349 execSpan .End ()
@@ -353,10 +353,10 @@ func (s *Server[RawConfiguration, Configuration, State]) MutationExplain(w http.
353353 _ , responseSpan := s .telemetry .Tracer .Start (ctx , "Response" )
354354 writeJson (w , logger , http .StatusOK , response )
355355 responseSpan .End ()
356- s .telemetry .explainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttribute )... ))
356+ s .telemetry .mutationExplainCounter .Add (r .Context (), 1 , metric .WithAttributes (append (attributes , statusAttribute )... ))
357357
358358 // record latency for success requests only
359- s .telemetry .explainLatencyHistogram .Record (r .Context (), time .Since (startTime ).Seconds (), metric .WithAttributes (collectionAttr ))
359+ s .telemetry .mutationExplainLatencyHistogram .Record (r .Context (), time .Since (startTime ).Seconds (), metric .WithAttributes (collectionAttr ))
360360}
361361
362362// Mutation implements a handler for the /mutation endpoint, POST method that executes a mutation.
0 commit comments