README.md in graphql-metrics-4.0.1 vs README.md in graphql-metrics-4.0.2

- old
+ new

@@ -3,10 +3,12 @@ ![](https://github.com/Shopify/graphql-metrics/workflows/Ruby/badge.svg) Extract as much much detail as you want from GraphQL queries, served up from your Ruby app and the [`graphql` gem](https://github.com/rmosolgo/graphql-ruby). Compatible with the [`graphql-batch` gem](https://github.com/Shopify/graphql-batch), to extract batch-loaded fields resolution timings. +Be sure to read the [CHANGELOG](CHANGELOG.md) to stay updated on feature additions, breaking changes made to this gem. + ## Installation Add this line to your application's Gemfile: ```ruby @@ -40,10 +42,17 @@ this data is simply stored on the GraphQL::Query context, under a namespace to avoid collisions with other analyzers etc. What you do with these captured metrics is up to you! +**NOTE**: Runtime metrics on for queries (like `query_duration`, `parsing_start_time_offset` etc.) as well as field +resolver timings (like `resolver_timings`, `lazy_resolver_timings`) may not be present in the extracted `metrics` hash, +even if you opt to collect them by using `GraphQL::Metrics::Analyzer` and `GraphQL::Metrics::Tracer`. + +More specifically, if any non-`graphql-ruby` gem-related exceptions occur in your application during query document +parsing and validation runtime metrics will not be added to the `metrics` hash. + ### Define your own analyzer subclass ```ruby class CaptureAllMetricsAnalyzer < GraphQL::Metrics::Analyzer ANALYZER_NAMESPACE = :capture_all_metrics_analyzer_namespace @@ -171,10 +180,10 @@ use GraphQL::Execution::Interpreter # Required. use GraphQL::Analysis::AST # Required. query_analyzer SimpleAnalyzer - + instrument :query, GraphQL::Metrics::Instrumentation.new # Both of these are required if either is used. tracer GraphQL::Metrics::Tracer.new # <-- Note! use GraphQL::Batch # Optional, but highly recommended. See https://github.com/Shopify/graphql-batch/. end