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
ConstructorsConstructorDescriptionPropagationWebGraphQlInterceptor(io.micrometer.tracing.propagation.Propagator propagator) Create an interceptor that leverages the field names used by the givenPropagatorinstance. -
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, waitMethods 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 givenPropagatorinstance.- 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:WebGraphQlInterceptorIntercept a request and delegate to the rest of the chain including other interceptors and aExecutionGraphQlService.- Specified by:
interceptin interfaceWebGraphQlInterceptor- Parameters:
request- the request which may be aWebSocketGraphQlRequestwhen intercepting a GraphQL request over WebSocketchain- the rest of the chain to execute the request- Returns:
- a
Monowith the response
-