Skip to main content
Applies to:


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.
// 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.