Sentry-Integration hinzugefügt
This commit is contained in:
@@ -13,4 +13,5 @@ return [
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Sentry\SentryBundle\SentryBundle::class => ['prod' => true],
|
||||
];
|
||||
|
||||
40
config/packages/sentry.yaml
Normal file
40
config/packages/sentry.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
when@prod:
|
||||
sentry:
|
||||
dsn: '%env(SENTRY_DSN)%'
|
||||
options:
|
||||
# Add request headers, cookies, IP address and the authenticated user
|
||||
# see https://docs.sentry.io/platforms/php/data-management/data-collected/ for more info
|
||||
# send_default_pii: true
|
||||
ignore_exceptions:
|
||||
- 'Symfony\Component\ErrorHandler\Error\FatalError'
|
||||
- 'Symfony\Component\Debug\Exception\FatalErrorException'
|
||||
traces_sample_rate: 0.1
|
||||
#
|
||||
# # If you are using Monolog, you also need this additional configuration to log the errors correctly:
|
||||
# # https://docs.sentry.io/platforms/php/guides/symfony/integrations/monolog/
|
||||
register_error_listener: false
|
||||
register_error_handler: false
|
||||
|
||||
monolog:
|
||||
handlers:
|
||||
# # Use this only if you don't want to use structured logging and instead receive
|
||||
# # certain log levels as errors.
|
||||
# sentry:
|
||||
# type: service
|
||||
# id: Sentry\Monolog\Handler
|
||||
#
|
||||
# Use this for structured log integration
|
||||
sentry_logs:
|
||||
type: service
|
||||
id: Sentry\SentryBundle\Monolog\LogsHandler
|
||||
|
||||
# Enable one of the two services below, depending on your choice above
|
||||
services:
|
||||
# Sentry\Monolog\Handler:
|
||||
# arguments:
|
||||
# $hub: '@Sentry\State\HubInterface'
|
||||
# $level: !php/const Monolog\Logger::ERROR
|
||||
# $fillExtraContext: true # Enables sending monolog context to Sentry
|
||||
Sentry\SentryBundle\Monolog\LogsHandler:
|
||||
arguments:
|
||||
- !php/const Monolog\Logger::INFO
|
||||
@@ -1455,6 +1455,85 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* generate_final_classes?: bool|Param, // Default: true
|
||||
* generate_final_entities?: bool|Param, // Default: false
|
||||
* }
|
||||
* @psalm-type SentryConfig = array{
|
||||
* dsn?: scalar|Param|null, // If this value is not provided, the SDK will try to read it from the SENTRY_DSN environment variable. If that variable also does not exist, the SDK will not send any events.
|
||||
* register_error_listener?: bool|Param, // Default: true
|
||||
* register_error_handler?: bool|Param, // Default: true
|
||||
* logger?: scalar|Param|null, // The service ID of the PSR-3 logger used to log messages coming from the SDK client. Be aware that setting the same logger of the application may create a circular loop when an event fails to be sent. // Default: null
|
||||
* options?: array{
|
||||
* integrations?: mixed, // Default: []
|
||||
* default_integrations?: bool|Param,
|
||||
* prefixes?: list<scalar|Param|null>,
|
||||
* sample_rate?: float|Param, // The sampling factor to apply to events. A value of 0 will deny sending any event, and a value of 1 will send all events.
|
||||
* enable_tracing?: bool|Param,
|
||||
* traces_sample_rate?: float|Param, // The sampling factor to apply to transactions. A value of 0 will deny sending any transaction, and a value of 1 will send all transactions.
|
||||
* traces_sampler?: scalar|Param|null,
|
||||
* profiles_sample_rate?: float|Param, // The sampling factor to apply to profiles. A value of 0 will deny sending any profiles, and a value of 1 will send all profiles. Profiles are sampled in relation to traces_sample_rate
|
||||
* enable_logs?: bool|Param,
|
||||
* enable_metrics?: bool|Param, // Default: true
|
||||
* attach_stacktrace?: bool|Param,
|
||||
* attach_metric_code_locations?: bool|Param,
|
||||
* context_lines?: int|Param,
|
||||
* environment?: scalar|Param|null, // Default: "%kernel.environment%"
|
||||
* logger?: scalar|Param|null,
|
||||
* spotlight?: bool|Param,
|
||||
* spotlight_url?: scalar|Param|null,
|
||||
* release?: scalar|Param|null, // Default: "%env(default::SENTRY_RELEASE)%"
|
||||
* server_name?: scalar|Param|null,
|
||||
* ignore_exceptions?: list<scalar|Param|null>,
|
||||
* ignore_transactions?: list<scalar|Param|null>,
|
||||
* before_send?: scalar|Param|null,
|
||||
* before_send_transaction?: scalar|Param|null,
|
||||
* before_send_check_in?: scalar|Param|null,
|
||||
* before_send_metrics?: scalar|Param|null,
|
||||
* before_send_log?: scalar|Param|null,
|
||||
* before_send_metric?: scalar|Param|null,
|
||||
* trace_propagation_targets?: mixed,
|
||||
* tags?: array<string, scalar|Param|null>,
|
||||
* error_types?: scalar|Param|null,
|
||||
* max_breadcrumbs?: int|Param,
|
||||
* before_breadcrumb?: mixed,
|
||||
* in_app_exclude?: list<scalar|Param|null>,
|
||||
* in_app_include?: list<scalar|Param|null>,
|
||||
* send_default_pii?: bool|Param,
|
||||
* max_value_length?: int|Param,
|
||||
* transport?: scalar|Param|null,
|
||||
* http_client?: scalar|Param|null,
|
||||
* http_proxy?: scalar|Param|null,
|
||||
* http_proxy_authentication?: scalar|Param|null,
|
||||
* http_connect_timeout?: float|Param, // The maximum number of seconds to wait while trying to connect to a server. It works only when using the default transport.
|
||||
* http_timeout?: float|Param, // The maximum execution time for the request+response as a whole. It works only when using the default transport.
|
||||
* http_ssl_verify_peer?: bool|Param,
|
||||
* http_compression?: bool|Param,
|
||||
* capture_silenced_errors?: bool|Param,
|
||||
* max_request_body_size?: "none"|"never"|"small"|"medium"|"always"|Param,
|
||||
* class_serializers?: array<string, scalar|Param|null>,
|
||||
* },
|
||||
* messenger?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* capture_soft_fails?: bool|Param, // Default: true
|
||||
* isolate_breadcrumbs_by_message?: bool|Param, // Default: false
|
||||
* },
|
||||
* tracing?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* dbal?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* connections?: list<scalar|Param|null>,
|
||||
* },
|
||||
* twig?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* },
|
||||
* cache?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* },
|
||||
* http_client?: bool|array{
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* },
|
||||
* console?: array{
|
||||
* excluded_commands?: list<scalar|Param|null>,
|
||||
* },
|
||||
* },
|
||||
* }
|
||||
* @psalm-type ConfigType = array{
|
||||
* imports?: ImportsConfig,
|
||||
* parameters?: ParametersConfig,
|
||||
@@ -1498,6 +1577,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* twig_extra?: TwigExtraConfig,
|
||||
* security?: SecurityConfig,
|
||||
* monolog?: MonologConfig,
|
||||
* sentry?: SentryConfig,
|
||||
* },
|
||||
* "when@test"?: array{
|
||||
* imports?: ImportsConfig,
|
||||
|
||||
Reference in New Issue
Block a user