Skip to content

Commit 194425a

Browse files
committed
document tagCallback option
1 parent aab2db6 commit 194425a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ Example:
8484
], 'category');
8585
```
8686

87+
If all messages need the same tag, use tagCallback in SentryTarget config:
88+
89+
```php
90+
'targets' => [
91+
[
92+
'class' => 'Sil\Sentry\SentryTarget',
93+
'dsn' => 'https://11111111111111111111111111111111@11111111111111111.ingest.us.sentry.io/1111111111111111',
94+
'levels' => ['error', 'warning'],
95+
'tagCallback' => function ($tags) {
96+
$tags['foo'] = 'bar';
97+
return $tags;
98+
},
99+
],
100+
],
101+
```
102+
87103
More about tags see https://docs.sentry.io/learn/context/#tagging-events
88104

89105
### Additional context

0 commit comments

Comments
 (0)