---
url: https://lit-ui-router.dev/reference/ui-router-otel/classes/OtelPlugin.md
---
[ui-router-otel](../index.md) / OtelPlugin

# Class: OtelPlugin

Defined in: [ui-router-otel/src/plugin.ts:37](https://github.com/simshanith/lit-ui-router/blob/b67ac9f739458e91fc6200281c89ddd634e053e8/packages/ui-router-otel/src/plugin.ts#L37)

Reports the router's transitions as OpenTelemetry spans; `dispose()` ends the open ones and stops.

## Implements

* [`UIRouterPlugin`](https://ui-router.github.io/core/docs/latest/interfaces/_interface_.uirouterplugin.html)

## Constructors

### Constructor

```ts
new OtelPlugin(router, __namedParameters): OtelPlugin;
```

Defined in: [ui-router-otel/src/plugin.ts:42](https://github.com/simshanith/lit-ui-router/blob/b67ac9f739458e91fc6200281c89ddd634e053e8/packages/ui-router-otel/src/plugin.ts#L42)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `router` | [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html) |
| `__namedParameters` | [`OtelPluginOptions`](../interfaces/OtelPluginOptions.md) |

#### Returns

`OtelPlugin`

## Properties

| Property | Type | Default value | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `name` | `string` | `'otel'` | The plugin's name in the router's plugin registry. | [ui-router-otel/src/plugin.ts:39](https://github.com/simshanith/lit-ui-router/blob/b67ac9f739458e91fc6200281c89ddd634e053e8/packages/ui-router-otel/src/plugin.ts#L39) |

## Methods

### dispose()

```ts
dispose(): void;
```

Defined in: [ui-router-otel/src/plugin.ts:73](https://github.com/simshanith/lit-ui-router/blob/b67ac9f739458e91fc6200281c89ddd634e053e8/packages/ui-router-otel/src/plugin.ts#L73)

Instructs the Disposable to clean up any resources

#### Returns

`void`

#### Implementation of

`UIRouterPlugin.dispose`
