Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Sep 18, 2025

Important

This pull request adds support for managing blob storage integrations and organization memberships, updates ingestion to recommend OpenTelemetry, and includes minor improvements to scores and traces handling.

  • Blob Storage Integrations:
    • Added BlobStorageIntegrationsClient and AsyncBlobStorageIntegrationsClient in client.py to manage blob storage integrations.
    • Introduced methods: get_blob_storage_integrations(), upsert_blob_storage_integration(), and delete_blob_storage_integration().
    • Added types for blob storage integration requests and responses in types/.
  • Organization Memberships:
    • Added methods in OrganizationsClient and AsyncOrganizationsClient to manage organization and project memberships.
    • Introduced methods: delete_organization_membership() and delete_project_membership().
    • Added types for membership deletion requests and responses in types/.
  • Ingestion:
    • Updated IngestionClient and AsyncIngestionClient to mark batch ingestion as legacy and recommend using OpenTelemetry.
  • Scores and Traces:
    • Added session_id filter to get() in score_v_2/client.py.
    • Updated fields parameter description in trace/client.py to clarify behavior when fields are excluded.
  • Miscellaneous:
    • Fixed imports in test_http_client.py and test_query_encoding.py.
    • Minor README update in api/README.md.

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

Disclaimer: Experimental PR review

Greptile Summary

Updated On: 2025-09-18 08:55:48 UTC

This PR represents an automated API specification update from the main Langfuse repository, introducing significant new functionality while maintaining backward compatibility. The changes add two major feature areas: blob storage integrations and enhanced organization membership management.

Blob Storage Integrations - A comprehensive new feature that allows users to configure automated data exports to cloud storage services like AWS S3, S3-compatible storage, and Azure Blob Storage. This includes:

  • Complete CRUD operations (get, create/update, delete) for blob storage configurations
  • Support for different export frequencies (hourly, daily, weekly), modes (full history, from today, from custom date), and file formats (JSON, CSV, JSONL)
  • Proper authentication handling with encrypted credential storage
  • Integration with the main API client through the new client.blob_storage_integrations interface

Organization Membership Management - Extended membership deletion capabilities:

  • New endpoints for deleting organization and project memberships
  • Proper request/response models (DeleteMembershipRequest, MembershipDeletionResponse)
  • Both synchronous and asynchronous client support

Additional Enhancements:

  • Score filtering now supports session_id parameter for more granular queries
  • Enhanced documentation for trace field selection with detailed behavior explanations
  • Deprecation warnings for legacy batch ingestion endpoints, guiding users toward OpenTelemetry
  • Updated documentation paths reflecting the "observability" rebrand

All changes follow the established code generation patterns using Fern, maintaining consistency with existing API client structure. The implementation includes proper error handling, comprehensive docstrings with examples, and standard Pydantic model configurations with immutable settings and custom serialization methods.

Confidence score: 3/5

  • This PR contains mostly safe auto-generated code but has several enum visitor pattern implementations missing default cases that could cause runtime errors
  • Score reflects the systematic nature of generated code but concerns about incomplete visitor methods and import path changes that may not exist yet
  • Pay close attention to blob storage integration enum files and test files with updated import paths

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.

26 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

Comment on lines +19 to +25
) -> T_Result:
if self is BlobStorageExportFrequency.HOURLY:
return hourly()
if self is BlobStorageExportFrequency.DAILY:
return daily()
if self is BlobStorageExportFrequency.WEEKLY:
return weekly()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Missing return statement or exception for unhandled enum values. If an unexpected enum value exists, this method will return None instead of T_Result, violating the type contract.

Suggested change
) -> T_Result:
if self is BlobStorageExportFrequency.HOURLY:
return hourly()
if self is BlobStorageExportFrequency.DAILY:
return daily()
if self is BlobStorageExportFrequency.WEEKLY:
return weekly()
) -> T_Result:
if self is BlobStorageExportFrequency.HOURLY:
return hourly()
if self is BlobStorageExportFrequency.DAILY:
return daily()
if self is BlobStorageExportFrequency.WEEKLY:
return weekly()
raise ValueError(f"Unexpected enum value: {self}")

Comment on lines +20 to +25
if self is BlobStorageIntegrationType.S_3:
return s_3()
if self is BlobStorageIntegrationType.S_3_COMPATIBLE:
return s_3_compatible()
if self is BlobStorageIntegrationType.AZURE_BLOB_STORAGE:
return azure_blob_storage()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Missing default case or exception handling. If a new enum value is added but this method isn't updated, it will return None implicitly, causing potential runtime errors.

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