-
Notifications
You must be signed in to change notification settings - Fork 224
feat(traces): add more observation types #1290
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
Conversation
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.
6 files reviewed, 3 comments
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.
15 files reviewed, 4 comments
* unrelated changes to generated sdk * also readme * reset * revert * revert
|
#1271 this merge request “Add float to MapValue in map_value.py to support optional float values.”, why rm float support in map_value.py now? |
Important
Enhanced Langfuse SDK with new observation types, deprecated old methods, and added comprehensive tests for validation.
agent,tool,chain,retriever,evaluator,embedding,guardrailinspan.py.@observedecorator to support newtypeparameter inobserve.py.start_generationandstart_as_current_generationin favor ofstart_observation.test_deprecation.pyto ensure deprecation warnings are emitted for deprecated methods.test_langchain.pyandtest_otel.pyto cover new observation types and ensure correct behavior.observation_type.py.annotation_queues/client.py.This description was created by
for 9512f06. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
This review covers only the changes made since the last review (commit 89b1b3e), not the entire PR.
The recent changes primarily focus on addressing feedback from previous reviews and adding enhanced developer tooling. The key updates include:
New
typeParameter in@observeDecorator: Introduces a dedicatedtypeparameter alongside the existingas_typeparameter in the@observedecorator. This provides improved developer experience by allowing@observe(type="agent")syntax. The implementation includes validation logic to prevent conflicting usage of both parameters and consolidation logic that merges the parameters appropriately.Type System Refinements: Updates type annotations throughout the codebase to be more consistent and comprehensive. The
as_typeparameter in various methods has been expanded from restrictive literals to broader observation type unions, improving type safety and IDE support.Enhanced Testing Infrastructure: Adds a comprehensive test file (
test_deprecation.py) that validates deprecation warnings for methods being phased out in favor of the new unified observation API. This ensures proper backward compatibility during the transition period.Developer Tooling: Adds type checking instructions to the contributing documentation (
CONTRIBUTING.md), providing clear guidance for contributors on running mypy type checking with the--no-error-summaryflag.API Client Updates: Updates the observations API client to support a new
levelparameter for filtering observations by severity levels (DEBUG, DEFAULT, WARNING, ERROR), expanding query capabilities.These changes build upon the core generalized graph visualization functionality introduced earlier in the PR, focusing on polishing the developer experience and ensuring robust testing coverage for the new observation type system.
Confidence score: 4/5
observe.pyto ensure the newtypeparameter works correctly with existingas_typeusage