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

# Extend retention for specific traces using separate projects

export const plans_0 = "Enterprise"

export const deployments_0 = "Any"

export const data_plane_version_0 = undefined

export const use_case_0 = "Use case - Keeping specific traces longer than the project retention window by routing them to a dedicated long-retention project at ingest time"

<Note>
  **Applies to:**

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

## Summary

**Issue:** Traces are deleted according to the project retention window even when metadata like `evalRun: true` is present. Metadata fields cannot exempt individual traces from deletion.

**Cause:** Retention is enforced by creation timestamp at the project and object type level, not by tags or metadata values.

**Resolution:** For traces that need longer retention, route them at ingest time to a separate project configured with a longer retention window, or adjust retention for the whole project/object type.

## Resolution steps

### If you are on Enterprise and want to extend retention for all traces in a project

#### Step 1: Identify the object type

Determine whether your traces are stored as **logs**, **experiments**, or **dataset rows**. Retention is configured separately for each type.

#### Step 2: Adjust the project retention window

In your project settings, raise or remove the retention limit for the relevant object type. On Enterprise, there is no enforced maximum. The 14-day retention window is a project-level configuration.

### If you only want to retain a subset of traces (e.g., `eval_run: true`)

#### Step 1: Create a dedicated project

Create a separate Braintrust project with a longer or unlimited retention window.

#### Step 2: Route matching traces at ingest time

In your logging code, inspect the metadata before logging and send matching traces to the dedicated project.

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
if metadata.get("eval_run"):
    logger = braintrust.init_logger(project="eval-runs-retained")
else:
    logger = braintrust.init_logger(project="default-project")
```

#### Step 3: Verify retention settings on the new project

Confirm the dedicated project's log retention window is set to your desired duration or unlimited before relying on it for storage.

<Note>
  On Pro and Enterprise plans, data retained in a long-retention project beyond your plan's base window incurs [retention storage charges](/admin/billing/monitor-usage#retention-storage). Weigh this cost when deciding how long to keep routed traces.
</Note>
