You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/platforms/php/common/integrations.mdx
+18-26Lines changed: 18 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,49 +8,43 @@ redirect_from:
8
8
9
9
## Default Integrations
10
10
11
-
Default integrations are integrations enabled by default that integrate into the
12
-
standard library or the interpreter itself. They are documented so you can see
13
-
what they do and that they can be disabled if they cause issues. To disable
14
-
system integrations set `default_integrations => false` when calling `init()`.
11
+
These integrations are enabled by default and integrate into the
12
+
standard library or the interpreter itself. They are documented so you can be both aware of what they do and disable them if they cause issues.
13
+
14
+
To disable system integrations, set `default_integrations => false` when calling `\Sentry\init()`.
15
15
16
16
### ExceptionListenerIntegration
17
17
18
18
This integration catches all global uncaught exceptions and emits events when an error occurs.
19
19
20
-
To do that, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it
21
-
as an exception listener.
20
+
To do so, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it as an exception listener.
22
21
23
22
### ErrorListenerIntegration
24
23
25
24
This integration hooks into the global PHP `error_handler` and emits events when an error occurs.
26
25
27
-
To do that, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it
28
-
as an error listener. By default, the `ErrorHandler` reserves 10 kilobytes of memory to handle
29
-
fatal errors.
26
+
To do so, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it as an error listener. By default, the `ErrorHandler` reserves 10 kilobytes of memory to handle fatal errors.
27
+
28
+
For some frameworks or projects, specific integrations are provided both officially and by third-party users that automatically register the error handlers. Please refer to their documentation.
30
29
31
-
For some frameworks or projects, there are specific integrations provided both
32
-
officially and by third-party users that automatically register the error
33
-
handlers. In that case, please refer to their documentation.
30
+
By default, the error_types option defaults to the value returned by the `error_reporting()` function, which can change at runtime. Alternately, you can set the option to a fixed value by setting its value to a bitmask of the PHP `E_*` constants in `\Sentry\init()`. In this case, Sentry will log only errors of those specific types regardless of the current reporting level.
34
31
35
-
Also, by default `E_ALL` will be handled, you can change it by setting `error_types`
36
-
a different constant in `init()`.
37
32
38
33
### FatalErrorListenerIntegration
39
34
40
35
This integration catches all fatal errors and emits the corresponding events.
41
36
42
-
To do that, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it
43
-
as a fatal error listener.
37
+
To do so, it ensures that Sentry's `ErrorHandler` is registered, and adds a callback to it as a fatal error listener.
44
38
45
39
### RequestIntegration
46
40
47
-
This integration adds to the event request data like:
41
+
This integration adds to the event request data:
48
42
49
43
- HTTP method
50
44
- URL (including the query string)
51
45
- Body (by default only if the body is 10Kb or less)
52
46
53
-
If the [`send_default_pii` option](../configuration/options/#send-default-pii) is enabled, it will also send PII information like:
47
+
If the [`send_default_pii` option](../configuration/options/#send-default-pii) is enabled, it will also send the following PII:
54
48
55
49
- IP address
56
50
- Cookies
@@ -68,12 +62,11 @@ This integration reads excerpts of code around the line that originated an error
68
62
69
63
This integration fills the event data with PHP runtime and server OS information.
70
64
71
-
72
65
## Optional Integrations
73
66
74
-
You can enable option integration by passing them to the `integrations` option when initializing the Sentry SDK.
67
+
You can enable these integrations by passing them to the `integrations` option when initializing the Sentry SDK.
75
68
76
-
In the example below we add the optional `ModulesIntegration`.
69
+
In this example, the optional `ModulesIntegration` is added:
77
70
78
71
```php
79
72
\Sentry\init([
@@ -90,14 +83,13 @@ This integration decides whether an event should not be captured according to a
90
83
91
84
### ModulesIntegration
92
85
93
-
This integration logs with the event details all the versions of the packages installed with Composer; the root project is included too.
94
-
86
+
This integration logs all the versions of the packages installed with Composer with the event details; the root project is also included.
95
87
96
-
## Customize Integrations
88
+
## Custom Integrations
97
89
98
-
It is also possible to customize the list of integration without disabling the default integration using the `integrations` option and passing a callable.
90
+
You can customize the list of integration without disabling the default integration using the `integrations` option. You can pass a callable for advanced needs, though a fixed list of integrations will work in most use cases.
99
91
100
-
In the example below we leave all integrations enabled exception for the `ExceptionListenerIntegration` and add the `ModulesIntegration`.
92
+
In the example below, all integrations are enabled except the `ExceptionListenerIntegration`. In addition, the `ModulesIntegration` is added.
Copy file name to clipboardExpand all lines: src/platforms/php/guides/symfony/index.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,14 @@ SENTRY_DSN="___PUBLIC_DSN___"
48
48
###< sentry/sentry-symfony ###
49
49
```
50
50
51
+
<Alert level= "warning" title="Performance">
52
+
53
+
Performance monitoring integrations to support tracing are enabled by default. To use them, update to the latest version of the SDK.
54
+
55
+
These integrations hook into critical paths of the framework and of the vendors. As a result, there may be a performance penalty. To disable tracing, please see the [Integrations documentation](/platforms/php/guides/symfony/performance/pm-integrations/).
56
+
57
+
</Alert>
58
+
51
59
If you **are not** using Symfony Flex, you'll also need to enable the bundle in `config/bundles.php`:
description: "Learn about the the integrations Sentry provides for performance monitoring and how to configure them."
4
+
sidebar_order: 500
5
+
---
6
+
7
+
The Symfony SDK offers integrations to support tracing that are enabled by default. To use them, update to the latest version of the SDK.
8
+
9
+
If the vendors (DBAL, Cache, and Twig) are installed, `enabled` will be set to `true`, so it's likely that this configuration is the same in your app.
10
+
11
+
These integrations are hooking into critical paths of the framework and of the vendors. As a result, there may be a performance penalty. If you are updating from a previous version or installing the SDK, you may observe a degradation of your app performance, though it may not be noticeable. If you need to disable tracing, you can do so by setting `enabled` to `false`.
12
+
13
+
```yaml {filename:config/packages/sentry.yaml}
14
+
sentry:
15
+
tracing:
16
+
enabled: true
17
+
dbal: # DB queries
18
+
enabled: true
19
+
cache:
20
+
enabled: true
21
+
twig: # templating engine
22
+
enabled: true
23
+
```
24
+
25
+
You can adjust the integrations to your needs if you want to disable a specific integration.
26
+
27
+
### DBAL
28
+
29
+
This integration supports tracking database queries as Spans. Enabling this option will create Spans for your queries.
30
+
31
+
It is enabled by default. To disable tracking database queries, set `enabled` to `false`.
32
+
33
+
```yaml {filename:config/packages/sentry.yaml}
34
+
sentry:
35
+
tracing:
36
+
dbal: # DB queries
37
+
enabled: true
38
+
```
39
+
40
+
### Twig
41
+
42
+
This integration adds distributed tracing for Twig template rendering using Sentry.
43
+
44
+
It is enabled by default. To disable it, set `enabled` to `false`.
45
+
46
+
```yaml {filename:config/packages/sentry.yaml}
47
+
sentry:
48
+
tracing:
49
+
twig: # templating engine
50
+
enabled: true
51
+
```
52
+
53
+
### Cache
54
+
55
+
This integration adds support for distributed tracing of cache pools.
56
+
57
+
It is enabled by default. To disable it, set `enabled` to `false`.
0 commit comments