gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Trace ID Generator

Open ranjancse26 opened this issue 1 year ago • 1 comments

I think it's a good idea for the SDK's to have a capability for generating the Unique Trace ID by considering various parameters such as organization, llm provider, model, date time etc. Although setting the UNIQUE_TRACE_ID is up to the users, However, it's good to have the library capabilities to generate one.

ranjancse26 avatar Jan 16 '24 12:01 ranjancse26

Hi @ranjancse26,

I don't think this would help. I would assume the gateway to be a standalone deployment, which will accept the traceIDs. Having the gateway to expose GET /generate/trace-id doesn't sound right.

IMO, this is better placed as a util in the application code.

We can however attach a UUID automatically from gateway if its not passed.

Would that make sense?

ayush-portkey avatar Jan 16 '24 19:01 ayush-portkey

@ayush-portkey What I meant was to add a utility or a helper as part of the library. Don't worry about the Restful endpoint, that was never part of my thought :)

Why you let every single developer in this world to write the application code instead why not to add the utility as part of your SDK?

ranjancse26 avatar Jan 17 '24 01:01 ranjancse26

This gateway would be deployed as a standalone server, and not imported within a project as a SDK. Coming from that thought I don't see how adding a util here would help.

But yeah, it would make sense for us to add it our node and python client SDKs.

I'll close this issue here for now, client SDK repos would be a better place for it.

ayush-portkey avatar Jan 17 '24 23:01 ayush-portkey