> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Metadata filtering in custom views shows partial data

export const plans_0 = "Any"

export const deployments_0 = "Braintrust-hosted"

export const data_plane_version_0 = undefined

export const use_case_0 = "Use case - Custom views and filtering in monitor dashboard with hierarchical trace structures from SDK integrations"

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

## Summary

**Issue:** Custom views in the monitor dashboard show partial data when filtering by metadata fields added to root traces. Child spans from `openai-agents-sdk-js` integration are missing from filtered results.

**Cause:** Metadata added to root traces does not automatically propagate to child spans for filtering purposes—metadata indexing is span-level, not inherited.

**Resolution:** Add metadata to all relevant child spans during logging, or use trace ID filtering to examine full trace hierarchies.

## Resolution Steps

### If you need to filter entire trace hierarchies by metadata

#### Step 1: Add metadata to child spans

Include the same metadata fields on all child spans when logging, not just the root trace.

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
// Add metadata to both root and child spans
const trace = braintrust.startTrace({ metadata: { feature: "checkout" } });
const span = trace.startSpan({ metadata: { feature: "checkout" } });

```

#### Step 2: Filter in custom views

Apply your metadata filter in the custom view—all spans with the metadata will now appear.

### Otherwise, if you want to view full traces matching root metadata

#### Step 1: Filter by metadata to find root traces

Apply your metadata filter in the custom view to identify matching root traces.

#### Step 2: Use trace ID to view complete hierarchy

Click on a matching root trace to open the full trace tree with all child spans.

### Alternative: Use trace-level grouping

#### Step 1: Configure custom view grouping

Set the view to group by trace ID instead of filtering individual spans.

#### Step 2: Apply trace-level filters

Filter using fields that exist on root traces to see complete trace groups.
