Are there any hooks that could be used to track queries from a provider?

24 показвания
Преминаване към първото непрочетено съобщение

Thomas Kolanko

непрочетено,
23.09.2022 г., 12:20:2523.09.22 г.
до Gremlin-users
Is it possible to track queries and if they succeed or their errors if the query failed as a provider? Are there any hooks to be able to get at this information?

One of the things we are looking at is adding a custom step to a traversal determine when a query ends but that doesn't help with understanding if/why a query failed.

We extend WebSocketChannelizer as our entry point and I tried something similar to:

public class CustomWebSocketChannelizer extends WebSocketChannelizer {
Consumer<Bindings> afterSuccessConsumer = value -> {
logger.info("In after success consumer");
};
GremlinExecutor gremlinExecutor = GremlinExecutor.build()
.executorService(serverGremlinExecutor.getGremlinExecutorService())
.afterSuccess(afterSuccessConsumer).create();

ServerGremlinExecutor sc = new ServerGremlinExecutor(
serverGremlinExecutor.getSettings(), gremlinExecutor.getExecutorService(),
gremlinExecutor.getScheduledExecutorService());

...rest of our init code ...
}


but as far as I can see the afterSuccess consumer never gets called when a query completes

Stephen Mallette

непрочетено,
26.09.2022 г., 7:06:2726.09.22 г.
до gremli...@googlegroups.com
I don't think there's anything quite like that in Gremlin Server. I think that there are GremlinExecutor lifecycle overrides which are probably preventing your special consumer from being used. I don't know all the requirements you are looking for but as I mentioned in your other thread, this might be something more easily achieved by adding the feature directly to Gremlin Server as a new improvement. 



--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/3f152af0-d0dc-4f9b-8380-6ae102e68been%40googlegroups.com.
Отговор до всички
Отговор до автора
Препращане
0 нови съобщения