Skip to content

Commit eb8aa6f

Browse files
committed
Improve README.md
1 parent 96dc57f commit eb8aa6f

File tree

1 file changed

+44
-40
lines changed

1 file changed

+44
-40
lines changed

README.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ sentry:
6262
dsn: "https://public:[email protected]/1"
6363
```
6464
65-
### Configuration
65+
## Configuration
6666
67-
The following can be configured via ``app/config/config.yml``.
67+
The following options can be configured via ``app/config/config.yml``.
6868
69-
#### Skip some exceptions
69+
### Skip some exceptions
7070
7171
```yaml
7272
sentry:
7373
skip_capture:
7474
- "Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface"
7575
```
7676
77-
#### Listeners' priority
77+
### Listeners' priority
7878
7979
You can change the priority of the 3 default listeners of this bundle with the `listener_priorities` key of your config.
8080
The default value is `0`, and here are the 3 possible sub-keys:
@@ -88,55 +88,51 @@ listener_priorities:
8888

8989
... respectively for the `onKernelRequest`, `onKernelException` and `onConsoleException` events.
9090

91-
#### Deprecated configuration options
91+
### Options
9292

93-
In previous releases of this bundle, some of the previous options where set outside of the options level of the configuration file. Those still work but are deprecated, and they will be dropped in the 2.x release, so you are advised to abandon them; to provide forward compatibility, they can be used alongside the standard syntax, but values must match. This is a list of those options:
93+
In the following section you will find some of the available options you can configure, listed alphabetically. All available options and a more detailed description of each can be found [here](https://docs.sentry.io/clients/php/config/), in the Sentry documentation.
94+
95+
#### app_path
96+
97+
The base path to your application. Used to trim prefixes and mark frames of the stack trace as part of your application.
9498

9599
```yaml
96100
sentry:
97-
app_path: ~
98-
environment: ~
99-
error_types: ~
100-
prefixes: ~
101-
release: ~
102-
excluded_app_paths: ~
101+
options:
102+
app_path: "/path/to/myapp"
103103
```
104104

105-
#### Options
106-
107-
In the following section you will find some of the available options you can configure. All available options and a more detailed description of each can be found [here](https://docs.sentry.io/clients/php/config/).
108-
109-
##### app_path
105+
#### environment
110106

111-
The base path to your application. Used to trim prefixes and mark frames as part of your application.
107+
The environment your code is running in (e.g. production).
112108

113109
```yaml
114110
sentry:
115111
options:
116-
app_path: "/path/to/myapp"
112+
environment: "%kernel.environment%"
117113
```
118114

119-
##### environment
115+
#### error types
120116

121-
The environment your code is running in (e.g. production).
117+
Define which error types should be reported.
122118

123119
```yaml
124120
sentry:
125121
options:
126-
environment: "%kernel.environment%"
122+
error_types: E_ALL & ~E_DEPRECATED & ~E_NOTICE
127123
```
128124

129-
##### release
125+
#### exception_listener
130126

131-
The version of your application. Often this is the git sha.
127+
This is used to replace the default exception listener that this bundle uses. The value must be a FQCN of a class implementing the SentryExceptionListenerInterface interface. See [Create a Custom ExceptionListener](#create-a-custom-exceptionlistener) for more details.
132128

133129
```yaml
134130
sentry:
135131
options:
136-
release: "beeee2a06521a60e646bbb8fe38702e61e4929bf"
132+
exception_listener: AppBundle\EventListener\MySentryExceptionListener
137133
```
138134

139-
##### prefixes
135+
#### prefixes
140136

141137
A list of prefixes to strip from filenames. Often these would be vendor/include paths.
142138

@@ -147,17 +143,17 @@ sentry:
147143
- /usr/lib/include
148144
```
149145

150-
##### error types
146+
#### release
151147

152-
Define which error types should be reported.
148+
The version of your application. Often this is the Git SHA hash of the commit.
153149

154150
```yaml
155151
sentry:
156152
options:
157-
error_types: E_ALL & ~E_DEPRECATED & ~E_NOTICE
153+
release: "beeee2a06521a60e646bbb8fe38702e61e4929bf"
158154
```
159155

160-
##### tags
156+
#### tags
161157

162158
Define tags for the logged errors.
163159

@@ -169,27 +165,35 @@ sentry:
169165
tag2: tagvalue
170166
```
171167

168+
### Deprecated configuration options
169+
170+
In previous releases of this bundle, up to 0.8.2, some of the previous options where set outside of the options level of the configuration file. Those still work but are deprecated, and they will be dropped in the stable 1.x release, so **you are advised to abandon them**; to provide forward compatibility, they can still be used alongside the standard syntax, but values must match. This is a list of those options:
171+
172+
```yaml
173+
sentry:
174+
app_path: ~
175+
environment: ~
176+
error_types: ~
177+
excluded_app_paths: ~
178+
prefixes: ~
179+
release: ~
180+
```
181+
172182
## Customization
173183

174-
It is possible to customize the configuration of the user context, as well
175-
as modify the client immediately before an exception is captured by wiring
176-
up an event subscriber to the events that are emitted by the default
177-
configured `ExceptionListener` (alternatively, you can also just defined
178-
your own custom exception listener).
184+
It is possible to customize the configuration of the user context, as well as modify the client immediately before an exception is captured by wiring up an event subscriber to the events that are emitted by the default configured `ExceptionListener` (alternatively, you can also just define your own custom exception listener).
179185

180-
### Create a Custom ExceptionListener
186+
### Create a custom ExceptionListener
181187

182-
You can always replace the default `ExceptionListener` with your own custom
183-
listener. To do this, assign a different class to the `exception_listener`
184-
property in your Sentry configuration, e.g.:
188+
You can always replace the default `ExceptionListener` with your own custom listener. To do this, assign a different class to the `exception_listener` property in your Sentry configuration, e.g.:
185189

186190
```yaml
187191
sentry:
188192
options:
189193
exception_listener: AppBundle\EventListener\MySentryExceptionListener
190194
```
191195

192-
... and then define the custom `ExceptionListener`, e.g.:
196+
... and then define the custom `ExceptionListener` that implements the `SentryExceptionListenerInterface`, e.g.:
193197

194198
```php
195199
// src/AppBundle/EventSubscriber/MySentryEventListener.php

0 commit comments

Comments
 (0)