# ImqueueInstrumentation.patch() method · @imqueue/opentelemetry

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

Attaches the tracing hooks to a module's default client/service options.

**Signature:**

```typescript
patch(rpc: RpcModule): RpcModule;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| rpc | [RpcModule](https://imqueue.org/api/opentelemetry/latest/opentelemetry.rpcmodule/) | module whose default option singletons should be hooked |


**Returns:**

[RpcModule](https://imqueue.org/api/opentelemetry/latest/opentelemetry.rpcmodule/)

the same object, hooks applied in place

## Remarks

Called by [ImqueueInstrumentation.enable()](https://imqueue.org/api/opentelemetry/latest/opentelemetry.imqueueinstrumentation.enable/) with the resolved module. It is public so a test, or an app whose `rpc` copy this cannot resolve, can pass the module in explicitly.

