Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jun 10, 2025

Important

Refactors Langfuse client to centralize mask function management in LangfuseResourceManager for consistent span handling.

  • Behavior:
    • Moves mask function from Langfuse client class to LangfuseResourceManager singleton for centralized management.
    • Adds new mask parameter (type: MaskFunction) to LangfuseResourceManager class for resource-level control.
    • Ensures consistent masking behavior across all spans using the same public key.
    • Prevents potential inconsistencies by sharing mask function through resource manager singleton.
  • Code Changes:
    • Updates Langfuse class in client.py to use LangfuseResourceManager for mask function.
    • Modifies LangfuseSpanWrapper in span.py to utilize the centralized mask function.
    • Adjusts tests in test_core_sdk.py and test_otel.py to reflect changes in mask function handling.

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


Greptile Summary

Disclaimer: Experimental PR review

Refactors the masking functionality in the Python client by moving mask function management from Langfuse class to LangfuseResourceManager singleton for better resource handling and consistency.

  • Moves mask function from Langfuse client class to LangfuseResourceManager singleton for centralized management
  • Adds new mask parameter (type: MaskFunction) to LangfuseResourceManager class for resource-level control
  • Ensures consistent masking behavior across all spans using the same public key
  • Prevents potential inconsistencies by sharing mask function through resource manager singleton

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

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp changed the title fix(masking): scope mask function to resources singleton fix(client): scope mask function to resources singleton Jun 10, 2025
@hassiebp hassiebp merged commit 51a9102 into main Jun 11, 2025
10 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-5241-fix-attr-to-resources branch June 11, 2025 08:31
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