Score:0

How to trace API calls on Ubuntu?

bf flag

I have an application installed on Ubuntu 22.04. The application connects to an API and when I run a command in the application input space, it starts communication with the API and retrieves the results. The connection and communication with the API happen under the hood and there is no way defined inside the application to find out what the communication is or how the communication happens. Is there any way on Ubuntu to trace all API calls and see what is sent and received as the communications between the application and the API? I tried to use strace but as it is my first time using it, I couldn't find an appropriate command and I am not sure if strace is the appropriate tool for tracing external calls. Or I wonder if there is any tool or approach to use.

Thank you.

Tom Newton avatar
cn flag
can you specify more details about application you use and API in general, please? AFAIK, the ```strace``` is mostly for system calls. The tool choice depends on what application you need to monitor. For shared libraries there is https://en.wikipedia.org/wiki/Ltrace tool, for example
plpm avatar
bf flag
@TomNewton Thank you. The application refers to the GitHub Copilot installed on Visual studio code or PyCharm, and the API is the OpenAI Codex.
Score:0
aw flag

Not sure if it supports Ubuntu but you can investigate here - A tool for tracing that includes API observability with API calls... >> Here's an article they wrote about it: https://gethelios.dev/blog/api-observability-leveraging-otel-to-improve-developer-experience/

David avatar
cn flag
This is a comment not an answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.