Monitoring
Please read the Ash monitoring guide for more information. Here we simply cover the additional traces & telemetry events that we publish from this extension.
A tracer can be configured in the api. It will fallback to the global tracer configuration
config :ash, :tracer, Tracer
graphql do
trace MyApp.Tracer
end
Traces
Each graphql resolver, and batch resolution of the underlying data loader, will produce a span with an appropriate name. We also set a
source: :graphql
metadata if you want to filter them out or annotate them in some way.
Telemetry
AshGraphql emits the following telemetry events, suffixed with
:start
and
:stop
. Start events have
system_time
measurements, and stop events have
system_time
and
duration
measurements. All times will be in the native time unit.
-
[:ash,
- The execution of a mutation. Use, :gql_mutation] resource_short_name
andmutation
(oraction
) metadata to break down measurements. -
[:ash,
- The execution of a mutation. Use, :gql_query] resource_short_name
andquery
(oraction
) metadata to break down measurements. -
[:ash,
- The resolution of a relationship. Use, :gql_relationship] resource_short_name
andrelationship
metadata to break down measurements. -
[:ash,
- The resolution of a calculation. Use, :gql_calculation] resource_short_name
andcalculation
metadata to break down measurements. -
[:ash,
- The resolution of a batch of relationships by the data loader. Use, :gql_relationship_batch] resource_short_name
andrelationship
metadata to break down measurements. -
[:ash,
- The resolution of a batch of calculations by the data loader. Use, :gql_calculation_batch] resource_short_name
andcalculation
metadata to break down measurements.