Class PropagationWebGraphQlInterceptor
java.lang.Object
org.springframework.graphql.observation.PropagationWebGraphQlInterceptor
- All Implemented Interfaces:
WebGraphQlInterceptor
WebGraphQlInterceptor
that copies propagation
headers
from the HTTP request to the GraphQLContext
.
This makes it possible to propagate tracing information sent by HTTP clients.- Since:
- 1.1.1
- Author:
- Brian Clozel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.graphql.server.WebGraphQlInterceptor
WebGraphQlInterceptor.Chain
-
Constructor Summary
ConstructorDescriptionPropagationWebGraphQlInterceptor
(io.micrometer.tracing.propagation.Propagator propagator) Create an interceptor that leverages the field names used by the givenPropagator
instance. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<WebGraphQlResponse>
intercept
(WebGraphQlRequest request, WebGraphQlInterceptor.Chain chain) Intercept a request and delegate to the rest of the chain including other interceptors and aExecutionGraphQlService
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.graphql.server.WebGraphQlInterceptor
andThen, apply
-
Constructor Details
-
PropagationWebGraphQlInterceptor
public PropagationWebGraphQlInterceptor(io.micrometer.tracing.propagation.Propagator propagator) Create an interceptor that leverages the field names used by the givenPropagator
instance.- Parameters:
propagator
- the propagator that will be used for tracing support
-
-
Method Details
-
intercept
public reactor.core.publisher.Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request, WebGraphQlInterceptor.Chain chain) Description copied from interface:WebGraphQlInterceptor
Intercept a request and delegate to the rest of the chain including other interceptors and aExecutionGraphQlService
.- Specified by:
intercept
in interfaceWebGraphQlInterceptor
- Parameters:
request
- the request which may be aWebSocketGraphQlRequest
when intercepting a GraphQL request over WebSocketchain
- the rest of the chain to execute the request- Returns:
- a
Mono
with the response
-