Comments (5)
Are you explicitly creating one in your app (I think that's what you're saying) or is it something coming implicitly from Webflux?
If it's your own, do you create a bean of type ContextRegistgry
as well? The DGS provided one is @ConditionalOnMissingBean
so you can override it by providing one yourself. Does that work?
I'm trying to fully understand the scenario to figure out if we should have other conditionals (or config) for this.
from dgs-framework.
We don't create or try to load our own, and I'm not entirely sure where it came from. The ObervationRegistry
is autowired. The DGS bean is loaded, so that means there isn't any other, based on the conditional on the DGS one.
I haven't tried creating our own context registry bean, but can try, although we never needed one.
from dgs-framework.
This works too indeed:
@Bean
fun contextRegistry(): ContextRegistry = ContextRegistry()
But obviously this just hides the DGS bean
from dgs-framework.
The one that already loads the ObservationThreadLocalAccessor
comes from io.micrometer:micrometer-observation
from META-INF/services/io.micrometer.context.ThreadLocalAccessor
:
io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor
And is loaded via a ServiceLoader
in ContextRegistry
from:
private static final ContextRegistry instance = new ContextRegistry().loadContextAccessors()
.loadThreadLocalAccessors();
// ...
public ContextRegistry loadThreadLocalAccessors() {
ServiceLoader.load(ThreadLocalAccessor.class).forEach(this::registerThreadLocalAccessor);
return this;
}
from dgs-framework.
Probably relevant, it's ContextPropagationSupport
that loads the class, which is triggered because we have Hooks.enableAutomaticContextPropagation()
in our Spring Boot app:
fun main(vararg args: String) {
Hooks.enableAutomaticContextPropagation()
runApplication<MySecondApplication>(*args)
}
ContextPropagationSupport
comes from io.projectreactor:reactor-core
from dgs-framework.
Related Issues (20)
- bug: Make path field of GraphQLError nullable HOT 6
- documentation: error handling example is outdated for currentl graphql-java version HOT 3
- bug: Application context fails to load after upgrade to springboot 3.x HOT 4
- InputMapDefinesTooManyFieldsException: Cancel Field Validation HOT 1
- bug: BaseDgsQueryExecutor silently handles exceptions from instrumentations HOT 5
- feature: Allow specifying custom scalars when generating queries using Kotlin query projections HOT 11
- bug: webRequest.getResponse() is null HOT 5
- bug: CORS errors in frontend app only after updating to v6 (with SpringBoot 3) HOT 1
- Scalar backed by value class inside input type fail to deserialize HOT 3
- bug: No qualifying bean of type 'com.fasterxml.jackson.databind.ObjectMapper' available HOT 6
- bug: unmapped fields after version upgrade when using dgs.graphql.schema-locations HOT 5
- bug: Deadlock after upgrading to DGS 7.6.0 version HOT 7
- bug: Switching to `graphql-dgs-spring-graphql-starter` breaks `Upload` GraphQL scalar HOT 3
- documentation: Incorrect Information in DGS Framework Documentation Regarding WebSocket Sub-Protocols HOT 2
- bug: unmapped fields after switching to Spring GraphQL integration HOT 5
- bug: "path" is not mapped from DataFetchingException to TypedGraphQLError HOT 1
- bug: scalar coercing exceptions don't use typed graphql error HOT 6
- bug: XML Injection (AKA Blind Xpath Injection) in ORG.XMLUNIT:XMLUNIT-CORE [CVE-2024-31573]
- bug: Java Optional<> - Failed to convert from type LinkedHasMap<?, ?> to type HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgs-framework.