Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate the public interface #7

Open
thiagomajesk opened this issue Nov 26, 2024 · 0 comments
Open

Consolidate the public interface #7

thiagomajesk opened this issue Nov 26, 2024 · 0 comments
Assignees

Comments

@thiagomajesk
Copy link
Collaborator

The original idea of this library was to detach the auto-generated underlying spec from the public interface to avoid unexpected breaking changes. That's why we created the structs you see in lib/langfuse_sdk/tracing.

We use those structs to create and update the Langfuse entities, but not when we fetch or list them. We should have a standardized way of consuming this library by either:

  • Finding a good way to map everything back to the public interface so the caller can trust to use the same "object" for every operation

    • Open question: Would a common interface between all operations be enough? What about additional metadata?
    • Open question: It's a little more work to maintain going forward since we are also maintaining custom code
  • Relax things by accepting plain maps as params and going full on the generated code (maybe getting rid of the Generated namespace in the process)

    • Open question: Exposing the auto-generated code might introduce breaking changes upon regeneration, are we ok with this?
    • Open questions: Tests can potentially break with auto-generated code, which is both good and bad. Good because if we have tests we can properly take action, bad because we are maintaining auto-generated code

PS.: The current implementation was heavily influenced by the TS SDK, so we keep taking some inspiration from them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants