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

# Filter logs for automatically converted file attachments

> Filter your logs to find traces that contain automatically converted file attachments using SQL span filters.

> [!NOTE]
>
> **Applies to:**
>
> * Plan - Any
> * Deployment - Any
> *
> *

## Summary

In the Logs filter editor, use the following filter to find traces that contain automatically converted file attachments:

```sql theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
ANY_SPAN(search('braintrust_attachment'))
```

Braintrust represents automatically converted attachments with a `braintrust_attachment` reference in the span data. `search()` finds that reference, and `ANY_SPAN()` returns traces where it appears on any span.

## Verify the attachment type

If the filter does not match an expected trace, open an example span and inspect the **Raw** tab. Confirm that the attachment object has `type: "braintrust_attachment"`.

If the raw data does not contain `type: "braintrust_attachment"`, this filter does not apply. Create a field-specific filter for the attachment representation in your data.

For more information about automatic conversion, see [Log attachments](https://docs.braintrust.dev/instrument/attachments.md#automatic-attachment-conversion).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.