Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,7 @@ import Bar from "@/components/Bar";
Vue.use(Router);

const router = new Router({
routes: [
{
path: "/",
name: "HelloWorld",
component: HelloWorld,
},
{ path: "/foo/:id", component: Foo },
{ path: "/bar", component: Bar },
],
// your router configuration
});

Sentry.init({
Expand All @@ -53,3 +45,19 @@ new Vue({
template: "<App/>",
});
```

## Configuration

You can pass an optional configuration object as second argument to the router instrumentation:

```javascript
vueRouterInstrumentation(vueRouter, {
routeLabel: "path"
});
```

The available options are:

| Key | Type | Default | Description |
| ------------ | ------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| routeLabel | string | `name` | The label to use for the route transactions. Can be either `name` or `path`. When this is `name`, the transaction will use `route.name`, if it is set, and else use the path of the route. By setting this to `path` you can opt-out of this and always use the path. |