# `SnakeBridge.Telemetry.RuntimeForwarder`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.16.0/lib/snakebridge/telemetry/runtime_forwarder.ex#L1)

Enriches Snakepit runtime telemetry with SnakeBridge context.

This module listens to Snakepit's call events and re-emits them under
the `:snakebridge` namespace with additional context like the SnakeBridge
version and library information.

## Events

Original Snakepit events:
- `[:snakepit, :python, :call, :start]`
- `[:snakepit, :python, :call, :stop]`
- `[:snakepit, :python, :call, :exception]`

Are forwarded as:
- `[:snakebridge, :runtime, :call, :start]`
- `[:snakebridge, :runtime, :call, :stop]`
- `[:snakebridge, :runtime, :call, :exception]`

With added metadata:
- `snakebridge_library` - The library name from the original event
- `snakebridge_version` - The current SnakeBridge version

## Usage

    # In your application startup
    SnakeBridge.Telemetry.RuntimeForwarder.attach()

# `attach`

```elixir
@spec attach() :: :ok | {:error, :already_exists}
```

Attaches the runtime forwarder to Snakepit events.

Returns `:ok` on success or `{:error, :already_exists}` if already attached.

# `detach`

```elixir
@spec detach() :: :ok | {:error, :not_found}
```

Detaches the runtime forwarder.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
