Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Jan 7, 2026

Important

Add expandMetadata parameter to ObservationsV2 API for retrieving full metadata values for specified keys.

  • Behavior:
    • Add expandMetadata parameter to GetObservationsV2Request to allow retrieval of full metadata values for specified keys.
    • Update __getMany method in Client.ts to handle expandMetadata parameter, adding it to query parameters if provided.
  • Documentation:
    • Update docstring in GetObservationsV2Request.ts to describe expandMetadata usage and provide examples.
    • Update comments in Client.ts to reflect metadata truncation behavior and expandMetadata usage.

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

Disclaimer: Experimental PR review

Greptile Summary

Added expandMetadata parameter to the observations V2 API endpoint to allow retrieving non-truncated metadata values for specific keys.

  • Added new optional expandMetadata string parameter accepting comma-separated list of metadata keys
  • Updated API documentation to clarify that metadata values are truncated to 200 characters by default
  • Properly integrated the parameter into query string handling with null-safe checks
  • This is an auto-generated API spec update from the upstream langfuse/langfuse repository

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Auto-generated API spec update that adds a backward-compatible optional parameter with proper null-safe handling and clear documentation. No breaking changes or logical errors detected.
  • No files require special attention

Important Files Changed

Filename Overview
packages/core/src/api/api/resources/observationsV2/client/requests/GetObservationsV2Request.ts Added expandMetadata optional parameter with clear documentation for retrieving non-truncated metadata values
packages/core/src/api/api/resources/observationsV2/client/Client.ts Integrated expandMetadata parameter into API client, updated docs, and added proper query parameter handling

Sequence Diagram

sequenceDiagram
    participant Client
    participant ObservationsV2
    participant API as /api/public/v2/observations
    
    Client->>ObservationsV2: getMany(request)
    Note over Client,ObservationsV2: request includes optional expandMetadata
    ObservationsV2->>ObservationsV2: Destructure request parameters
    Note over ObservationsV2: Extract expandMetadata from request
    ObservationsV2->>ObservationsV2: Build query params
    alt expandMetadata is provided
        ObservationsV2->>ObservationsV2: Add expandMetadata to _queryParams
    end
    ObservationsV2->>API: GET with query parameters
    Note over API: Returns observations with metadata<br/>- Truncated to 200 chars by default<br/>- Full values for keys in expandMetadata
    API-->>ObservationsV2: ObservationsV2Response
    ObservationsV2-->>Client: Return response
Loading

@langfuse-bot langfuse-bot requested a review from sumerman January 7, 2026 08:45
@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
langfuse-js Ready Ready Preview Jan 7, 2026 8:45am

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