> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# plugin-path-decorator

## Installation

Add the `@appsignal/plugin-path-decorator` and `@appsignal/javascript` packages to your `package.json`. Then, run `yarn install`/`npm install`.

You can also add these packages to your `package.json` on the command line:

<CodeGroup>
  ```bash Bash theme={null}
  yarn add @appsignal/javascript @appsignal/plugin-path-decorator
  npm install @appsignal/javascript @appsignal/plugin-path-decorator
  ```
</CodeGroup>

## Usage

The `plugin-path-decorator` is a plugin that decorates all outgoing `Span`s with the current path. This is computed by reading from `window.location.pathname`.

<CodeGroup>
  ```javascript JavaScript theme={null}
  import { plugin } from `@appsignal/plugin-path-decorator`
  appsignal.use(plugin(options))
  ```
</CodeGroup>

## `plugin` options

The plugin currently takes no options as parameters.
