Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 15, 2025

Important

Modified metadata handling in CallbackHandler.py to retain session/user keys for better tracking and marked a test as flaky in test_openai.py.

  • Metadata Handling:
    • Modified _strip_langfuse_keys_from_dict in CallbackHandler.py to retain langfuse_session_id and langfuse_user_id keys.
    • Enhances cross-session user activity tracking and request correlation.
    • Aligns with OpenTelemetry trace attributes for better observability.
  • Testing:
    • Marked test_response_api_image_input in test_openai.py as flaky and skipped.

This description was created by Ellipsis for 1946a76. You can customize this summary. It will automatically update as commits are pushed.


Greptile Summary

Disclaimer: Experimental PR review

Modified metadata handling in LangChain callback handler to preserve session and user tracking information for improved request tracing.

  • Changed _strip_langfuse_keys_from_dict in langfuse/langchain/CallbackHandler.py to retain langfuse_session_id and langfuse_user_id keys in metadata
  • Enhancement enables better cross-session user activity tracking and request correlation
  • Aligns with OpenTelemetry trace attributes implementation for more comprehensive observability

Copy link
Contributor

@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.

LGTM

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit 13ef221 into main Jun 16, 2025
10 checks passed
@hassiebp hassiebp deleted the feat-otel-trace-attributes-metadata branch June 16, 2025 11:52
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.

2 participants