# ImqServerPlugin class · @imqueue/datadog

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

Traces incoming `@imqueue` RPC calls — the SERVER half of the `imq` integration, producing the `imq.response` span.

**Signature:**

```typescript
export declare class ImqServerPlugin extends TracingPlugin 
```
**Extends:** TracingPlugin

## Remarks

Subscribes to `apm:imq:response:{start,error,finish}` — the channels the instrumentation in `./instrumentation` publishes from the service's `beforeCall`/`afterCall` hooks.

This is the half that continues a caller's trace, and the half whose span becomes the ambient parent for everything the service method does. Instantiated by the tracer through [ImqPlugin](https://imqueue.org/api/datadog/latest/datadog.imqplugin/), not directly; switch it off with `tracer.use('imq', { server: false })`.

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [component](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.component/) | `static` | string | Component tag reported on every span, `'imq'`. |
| [id](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.id/) | `static` | string | Integration this plugin belongs to, `'imq'`. |
| [kind](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.kind/) | `static` | string | Datadog span kind: this half handles calls. |
| [operation](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.operation/) | `static` | string | Operation half, `'response'` — the middle segment of the `apm:imq:response:*` channels this subscribes to. |
| [type](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.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.imqserverplugin.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.imqserverplugin.finish/) |  | Finishes the span of a handled call. |
| [start(ctx)](https://imqueue.org/api/datadog/latest/datadog.imqserverplugin.start/) |  | Starts the span for an incoming call, continuing the caller's trace when the request carries a propagated context. |

