Distributed Tracing
Distributed tracing is a method for monitoring and visualizing the flow of requests through a distributed system. This enables the tracking of the request as it interacts with an external weather service and the subsequent processing by the AI model. By using distributed tracing, developers can gain insights into the performance of their system, debug issues, and understand the behavior of complex, interconnected services.
Typescript
In the TypeScript example, a LiteralClient
is used to create a step that logs a particular action, in this case, fetching weather data. This step is associated with a parentStepId
, which allows for the tracing of the request’s journey through the system.
Python
In the Python code, the LiteralClient
is used to instrument the OpenAI client, and a decorator @literal_client.step
is used to mark the function run()
as a traceable step.
Was this page helpful?