Skip to content

Commit d09f371

Browse files
committed
Add missing configuration metadata for graphql metrics
1 parent 2be79c2 commit d09f371

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

graphql-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
{
44
"name": "spring.graphql.locations",
55
"defaultValue": "classpath:graphql/"
6+
},
7+
{
8+
"name": "management.metrics.graphql.autotime.enabled",
9+
"description": "Whether to automatically time graphql requests.",
10+
"defaultValue": true
11+
},
12+
{
13+
"name": "management.metrics.graphql.autotime.percentiles",
14+
"description": "Computed non-aggregable percentiles to publish."
15+
},
16+
{
17+
"name": "management.metrics.graphql.autotime.percentiles-histogram",
18+
"description": "Whether percentile histograms should be published.",
19+
"defaultValue": false
620
}
721
]
822
}

spring-graphql-docs/src/docs/asciidoc/index.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,15 @@ spring.graphql.graphiql.path=/graphiql
263263
=== Metrics
264264

265265
When the starter `spring-boot-starter-actuator` is present on the classpath, metrics for
266-
GraphQL requests are collected. You can configure metrics collection as follows:
266+
GraphQL requests are collected. You can disable metrics collection as follows:
267+
268+
[source,properties,indent=0,subs="verbatim,quotes"]
269+
----
270+
management.metrics.graphql.autotime.enabled=false
271+
----
272+
273+
Metrics can be exposed with an Actuator web endpoint.
274+
The following sections assume that its exposure is enabled in your application configuration, as follows:
267275

268276
[source,properties,indent=0,subs="verbatim,quotes"]
269277
----

0 commit comments

Comments
 (0)