-
Notifications
You must be signed in to change notification settings - Fork 39
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: adds admin mode #455
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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
Added admin mode functionality to Langfuse SDK allowing events to be stored locally instead of being sent to the server, with environment variable control and integration test coverage.
- Added
adminEnabled
flag andadminIngestionEvents
array inlangfuse-core/src/index.ts
to store events locally when admin mode is active - Added
_shutdownAdmin()
method to retrieve stored events and clear buffer when admin mode is enabled - Added integration test in
integration-test/langfuse-integration-langchain.spec.ts
verifying correct event sequence generation in admin mode - Modified flush logic to prevent server calls when admin mode is enabled via
LANGFUSE_SDK_ADMIN_ENABLED
environment variable - Added test case in
langfuse-core/test/langfuse.flush.spec.ts
to verify no fetch calls occur in admin mode
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
TODO: think about additional protection to have events scoped to a projectId only |
Problem
Changes
Release info Sub-libraries affected
Bump level
Libraries affected
Changelog notes
Important
Adds admin mode to Langfuse SDK to store events locally, with tests verifying no network requests in this mode.
LangfuseCoreStateless
to store events locally instead of sending to server whenLANGFUSE_SDK_ADMIN_ENABLED
is true._shutdownAdmin()
to retrieve stored events in admin mode.should export events in admin mode
inlangfuse-integration-langchain.spec.ts
to verify event storage and retrieval.should not send events in admin mode
inlangfuse.flush.spec.ts
to ensure no network requests are made in admin mode.This description was created by for 7c8e88b. It will automatically update as commits are pushed.