Welcome to Portkey Forum

Updated 4 weeks ago

Storing the Trace Ia and Url of a Log

Hi Guys.
Is it possible to retrieve the Trace IA of a Log to be stored? Actually I would like to store the log's url on each iteration. (Prompt completion)
C
e
5 comments
Hey!
For the response in case of prompt completion. We have this method: prompt_completion.get_headers()

Here you can find the traceId

Response is like:
Plain Text
{'cache-status': 'DISABLED', 'last-used-option-index': 'config', 'retry-attempt-count': '0', 'trace-id': '<TRACE_ID>'}
Thank you, very much.
Is there any way to get it when I am using http client instead of SDK?
Yes, you may check in the response headers for x-portkey-trace-id
Thank you bro. I got it.
Add a reply
Sign up and join the conversation on Discord