# ImqClientPlugin class · @imqueue/datadog

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

Traces outgoing `@imqueue` RPC calls — the CLIENT half of the `imq` integration, producing the `imq.request` span.

**Signature:**

```typescript
export declare class ImqClientPlugin extends TracingPlugin 
```
**Extends:** TracingPlugin

## Remarks

Subscribes to `apm:imq:request:{start,error,finish}` — the channels the instrumentation in `./instrumentation` publishes from the client's `beforeCall`/`afterCall` hooks.

Instantiated by the tracer through [ImqPlugin](https://imqueue.org/api/datadog/latest/datadog.imqplugin/), not directly. Switch it off with `tracer.use('imq', { client: false })`.

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [component](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.component/) | `static` | string | Component tag reported on every span, `'imq'`. |
| [id](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.id/) | `static` | string | Integration this plugin belongs to, `'imq'`. |
| [kind](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.kind/) | `static` | string | Datadog span kind: this half issues calls. |
| [operation](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.operation/) | `static` | string | Operation half, `'request'` — the middle segment of the `apm:imq:request:*` channels this subscribes to. |
| [type](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.type/) | `static` | string | Datadog span type — RPC over a queue is messaging. |


## Methods


| Method | Modifiers | Description |
| --- | --- | --- |
| [error(ctx)](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.error/) |  | Marks the span as failed. The span itself is finished by `finish()`, which the instrumentation always publishes. |
| [finish(ctx)](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.finish/) |  | Finishes the span of a completed call. |
| [start(ctx)](https://imqueue.org/api/datadog/latest/datadog.imqclientplugin.start/) |  | Starts the span for an outgoing call and injects the trace context into the carrier so the handling service can continue the trace. |

