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

# Trace Sink Protocol • Rust AI Agent SDK

> TraceSinkProtocol: Trace sink protocol trait

# TraceSinkProtocol

> Defined in the [**specialized**](../modules/specialized) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Trace sink protocol trait

## Methods

### `write`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn write(&self, event: &TraceEvent) -> ()
```

Write a trace event

**Parameters:**

| Name    | Type          |
| ------- | ------------- |
| `event` | `&TraceEvent` |

### `flush`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn flush(&self) -> ()
```

Flush pending events

### `close`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn close(&self) -> ()
```

Close the sink

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/specialized.rs">
  `praisonai/src/parity/specialized.rs` at line 0
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Tracing" icon="chart-line" href="/docs/rust/tracing" />

  <Card title="Rust Telemetry" icon="signal" href="/docs/rust/telemetry" />
</CardGroup>
