Skip to content

Commit 8fa7eb8

Browse files
author
Alejandro Perez
committed
Add config example for class_serializers
1 parent f587b90 commit 8fa7eb8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ final class SentryCustomizationCompilerPass implements CompilerPassInterface
201201
}
202202
```
203203

204+
#### Custom serializers
205+
206+
The option class_serializers can be used to send customize objects serialization.
207+
```yml
208+
sentry:
209+
...
210+
options:
211+
...
212+
class_serializers:
213+
SerializableClassName: '@YourSerializerService'
214+
```
215+
216+
Several serializer can be added and the serializable check is done using instanceof. The serializer must implements the `__invoke` method returning an **array** with the information to send to sentry (class name is always sent).
217+
204218
[Last stable image]: https://poser.pugx.org/sentry/sentry-symfony/version.svg
205219
[Packagist link]: https://packagist.org/packages/sentry/sentry-symfony
206220
[Travis Build Status]: http://travis-ci.org/getsentry/sentry-symfony

0 commit comments

Comments
 (0)