Open tazarov opened 11 months ago
I realize that getting traceId in JSON response might be a tall order given that Chroma API does not return generic responses where such info can easily be provided as inband metadata.
{
"data": {...},
"message": "success",
....
"traceId":"e8cb65e3ad4c30b9de68cc8b10e65e95"
}
So perhaps we can communicate that through headers (which can be tricky with proxies) and then materialize that via methods on the client:
client.enable_tracing()
client.create_collection(...) #returning a header "X-Trace-ID"
client.get_last_operation_trace_id()
client.disable_tracing()
Describe the problem
When OTEL is enabled, it would be beneficial to receive traceId information on failures or upon specifically requesting traceId from client-side for a particular operation.
Describe the proposed solution
Return traceId in the header or the JSON response from Chroma API.
Alternatives considered
N/A
Importance
would make my life easier
Additional Information
No response