Hi, igniters!
Recently, one user asked me to add this functionality to pyignite.
Many users want:
1. To expose client metrics of app to prometheus (for example)
2. To write custom logic on specific client events (connect, disconnect,
reconnect)
3. To perform tracing
I suggests to introduce client side events listener API to pyignite.
In few words, a proposed API looks like this.
from pyignite.monitoring import QueryEventListener, ConnectionEventListener
class MyQueryEventListener(QueryEventListener):
def on_query_success(self, event):
.......
class MyQueryEventListener(QueryEventListener):
def on_handshake_success (self, event):
.......
client = Client(event_listeners=[MyQueryEventListener(),
MyConnectionEventListener()]
More details are here in PR[1]
What do you think about this feature? I suppose that it is of crucial
importance and
may be introduced to others thin clients.
[1] --- https://github.com/apache/ignite-python-thin-client/pull/46/files