# CallHooks interface · @imqueue/datadog

Source: https://imqueue.org/api/datadog/latest/datadog.callhooks/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/datadog 3.2.0 — generated reference, not hand-written

The pair of hooks `@imqueue/rpc` invokes around a call. Structurally equal to `IMQBeforeCall`/`IMQAfterCall`, but expressed without a type parameter so the same shape works for both client and service option objects.

**Signature:**

```typescript
export interface CallHooks 
```

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [afterCall](https://imqueue.org/api/datadog/latest/datadog.callhooks.aftercall/) |  | (req?: IMQRPCRequest, res?: any) => Promise<void> | Runs after the call. Publishes `error` when the response carries one, then always publishes `finish` so the span is closed either way. |
| [beforeCall](https://imqueue.org/api/datadog/latest/datadog.callhooks.beforecall/) |  | (req?: IMQRPCRequest, res?: any) => Promise<void> | Runs before the call. Builds the call context, attaches it to the request, and publishes the `start` event. Returns immediately when the channel has no subscribers. |

