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

Skip to content

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Aug 12, 2025

Important

Adds a warning log in Langfuse class to notify when OTEL_SDK_DISABLED is set, disabling tracing.

  • Behavior:
    • Adds a warning log in __init__() of Langfuse class in client.py if OTEL_SDK_DISABLED environment variable is set to true, indicating that Langfuse tracing will be disabled.

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

Disclaimer: Experimental PR review

Greptile Summary

This PR adds a helpful warning message to the Langfuse client initialization process. The change detects when the OTEL_SDK_DISABLED environment variable is set to 'true' and displays a clear warning that Langfuse tracing will be disabled and no traces will appear in the UI.

The warning is strategically placed in the client constructor after authentication validation but before the LangfuseResourceManager initialization. This timing ensures that users receive immediate feedback about a configuration that would silently prevent tracing from working. The implementation uses the existing langfuse_logger and follows a simple check against the environment variable with appropriate case-insensitive handling.

This change addresses a common user experience issue where developers might have OTEL_SDK_DISABLED=true set in their environment (perhaps from other OpenTelemetry work) and then wonder why their Langfuse traces aren't appearing. Instead of silent failure, users now get explicit notification about why tracing is disabled, which significantly improves the debugging experience.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it only adds a logging statement with no functional changes
  • Score reflects the simple, non-invasive nature of adding a warning message that improves user experience
  • No files require special attention as this is a straightforward logging addition

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.

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@hassiebp hassiebp enabled auto-merge (squash) August 12, 2025 08:47
@hassiebp hassiebp merged commit ee8f092 into main Aug 12, 2025
10 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-6169 branch August 12, 2025 08:51
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.

bug: Langfuse silently "does nothing" when ENV parameter OTEL_SDK_DISABLED=TRUE is set
1 participant