Brian Clozel 94e9a8d2d7 Set current observation in data fetching environment
Prior to this commit, the Observability instrumentation would instrument
`DataFetcher` instances and set the current observation in the local
context of the value returned by the data fetcher itself.
This allowed to properly build a parent/child chain of observations
between the main request and the instrumented data fetching
observations.

Because the current observation was not set in the
`DataFetchingEnvironment` given as a parameter to the data fetcher, any
operation done in the data fetcher would not propagate using the current
observation but instead the parent one.

This commit revisits the implementation of the instrumentation to not
wrap the result anymore, but to build a new local `GraphQLContext` that
holds the current observation right before calling the data fetcher.
Note that we cannot "just" set the current observation in that local
context as this is shared mutable instance for all child data fetchers.

Fixes gh-757
2023-08-17 18:21:41 +02:00
2023-07-17 16:20:17 +02:00
2023-07-17 16:18:23 +02:00
2023-07-17 17:40:54 +02:00
2023-03-02 12:15:08 +00:00
2023-07-17 16:18:23 +02:00
2023-03-21 17:47:04 +01:00
2020-07-23 09:40:14 +03:00

Spring for GraphQL Build status

GraphQL support for Spring applications with GraphQL Java.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

Documentation

This project has reference documentation (published and source), an API reference. The are samples in the 1.0.x branch that will be moved out into a separate repository.

Continuous Integration Builds

Information regarding CI builds can be found in the project's Concourse pipeline documentation.

Stay in Touch

Follow @SpringCentral.

License

This project is released under version 2.0 of the Apache License.

Description
No description provided
Readme 5.9 MiB
Languages
Java 97.9%
CSS 1.2%
Shell 0.7%
HTML 0.2%