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

chore: remove enabling local export mode via env #459

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Nov 20, 2024

Important

Remove local export mode activation via environment variable, replacing it with a constructor parameter in LangfuseCoreStateless.

  • Behavior:
    • Remove enabling local export mode via LANGFUSE_JS_SDK_LOCAL_EVENT_EXPORT_ENABLED environment variable.
    • Add _isLocalEventExportEnabled parameter to LangfuseCoreOptions in types.ts.
    • Update LangfuseCoreStateless constructor to use _isLocalEventExportEnabled parameter.
  • Functions:
    • Rename _shutdownAdmin() to _exportLocalEvents() in index.ts.
    • Replace adminIngestionEvents with localEventExportMap in index.ts.
  • Tests:
    • Update tests in langfuse.flush.spec.ts and langfuse-integration-langchain.spec.ts to use _isLocalEventExportEnabled parameter instead of environment variable.

This description was created by Ellipsis for 4a0e37e. It will automatically update as commits are pushed.

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langfuse-js ✅ Ready (Inspect) Visit Preview Nov 20, 2024 10:04am

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: Experimental PR review

PR Summary

Simplified local event export configuration in langfuse-js by replacing environment variables with direct constructor parameters.

  • Replaced LANGFUSE_JS_SDK_LOCAL_EVENT_EXPORT_ENABLED env var with _isLocalEventExportEnabled boolean flag in CallbackHandler constructor
  • Renamed adminIngestionEvents to localEventExportMap and _shutdownAdmin to _exportLocalEvents for clearer intent
  • Added validation logic to ensure _projectId is provided when _isLocalEventExportEnabled is true
  • Updated test cases to use new configuration approach instead of managing environment variables

4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

langfuse-core/src/index.ts Show resolved Hide resolved
langfuse-core/test/langfuse.flush.spec.ts Show resolved Hide resolved
@hassiebp hassiebp merged commit 930f663 into main Nov 20, 2024
6 of 9 checks passed
@hassiebp hassiebp deleted the remove-env-from-islocalexportenabled branch November 20, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant