Return Logs in pyTigerGraph

Hello is there a way I can view query logs but accessed from pyTigerGraph driver? My library is in python and I don’t tend to log into the TG server directly or execute anything from the command line…

@emackie There aren’t any functions to extract logs using the pyTigerGraph package. You could access the Admin Portal of your solution and explore the logs. Alternatively, you could set up a log monitoring solution (ELK, TIG, DataDog) to pull log files out. (If interested I can walk you through some of the log monitoring solutions via Discord TigerGraph - It’s like Slack)

The TigerGraph team is constantly updating the Developer Experience. One of the ongoing efforts is extensibility through endpoints. Once those features are available we can work on updating pyTigerGraph with the functions to access them.

accessed from pyTigerGraph driver

The component under pyTigerGraph is called pyTigerDriver which accesses TigerGraph via the /gsql endpoint and the /restpp endpoints. Hopefully, I’ve answered the question above correctly.

1 Like

Ok this is fine for now I think we can use the operating model of Data Scientists developing and optimising GSQL queries in Studio and then productionising in python with pyTigerDriver. At the moment only the Data Engineers access the admin portal.

Ideally though we would like to remove Studio as a “middle man” maybe a log monitoring solution is a way to go.

@emackie Totally understand. What IDE do you use? There are some marketplace options for GSQL development available. If you’re using exclusively python there is a GSQL pygments lexer.

Log monitoring is pretty beneficial because you can set up dashboards, and alerts and fine-tune the queries to optimize the performance of resources. There was some work being done in this space to setup gronk patterns. It’s the regular expression needed to extract information from TigerGraph logs. If you do go down that route let me know!