You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/instrumentation.rst
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ Instrumentation
3
3
4
4
5
5
The ``graphql.execution.instrumentation.Instrumentation`` interface allows you to inject code that can observe the
6
-
execution of a query and also change the runtime behaviour somewhat.
6
+
execution of a query and also change the runtime behaviour.
7
7
8
-
The primary use case for this to allow say performance monitoring and custom logging but it could be used for many purposes.
8
+
The primary use case for this is to allow say performance monitoring and custom logging but it could be used for many different purposes.
9
9
10
10
When you build the ```Graphql`` object you can specify what ``Instrumentation`` to use (if any).
11
11
@@ -19,12 +19,12 @@ When you build the ```Graphql`` object you can specify what ``Instrumentation``
19
19
Custom Instrumentation
20
20
----------------------
21
21
22
-
An implementation of ``Instrumentation`` needs to implement the "step" methods that represent the execution of a graphql query.
22
+
An implementation of ``Instrumentation`` needs to implement the "begin" step methods that represent the execution of a graphql query.
23
23
24
24
Each step must give back a non null ``graphql.execution.instrumentation.InstrumentationContext`` object which will be called back
25
-
when the step completes, indicating that it succeeded or failed with a Throwable.
25
+
when the step completes, and will be told that it succeeded or failed with a Throwable.
26
26
27
-
The following is a basic custom ``Instrumentation`` that times overall execution time and puts it into a stateful object.
27
+
The following is a basic custom ``Instrumentation`` that measures overall execution time and puts it into a stateful object.
28
28
29
29
.. code-block:: java
30
30
@@ -108,7 +108,7 @@ Chaining Instrumentation
108
108
------------------------
109
109
110
110
You can combine multiple ``Instrumentation``s together using the ``graphql.execution.instrumentation.ChainedInstrumentation`` class which
111
-
accepts a list of ``Instrumentation`` objects and called them in that defined order.
111
+
accepts a list of ``Instrumentation`` objects and calls them in that defined order.
112
112
113
113
.. code-block:: java
114
114
@@ -126,10 +126,10 @@ accepts a list of ``Instrumentation`` objects and called them in that defined or
126
126
Apollo Tracing Instrumentation
127
127
------------------------------
128
128
129
-
``graphql.execution.instrumentation.tracing.TracingInstrumentation`` is an implementation that creates tracing information
129
+
``graphql.execution.instrumentation.tracing.TracingInstrumentation`` is an ``Instrumentation`` implementation that creates tracing information
130
130
about the query that is being executed.
131
131
132
-
It follows the Apollo proposed tracing format defined at https://github.com/apollographql/apollo-tracing
132
+
It follows the Apollo proposed tracing format defined at `https://github.com/apollographql/apollo-tracing<https://github.com/apollographql/apollo-tracing>`_
133
133
134
134
A detailed tracing map will be created and placed in the ``extensions`` section of the result.
0 commit comments