> ## 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

Ajoutez les packages `@appsignal/plugin-path-decorator` et `@appsignal/javascript` à votre `package.json`. Ensuite, exécutez `yarn install`/`npm install`.

Vous pouvez également ajouter ces packages à votre `package.json` en ligne de commande :

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

## Utilisation

Le `plugin-path-decorator` est un plugin qui décore tous les `Span`s sortants avec le chemin actuel. Celui-ci est calculé en lisant `window.location.pathname`.

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

## Options de `plugin`

Le plugin ne prend actuellement aucune option en paramètre.
