Sentry-laravel: Provide proper release notes / upgrade guide

Created on 31 Jul 2019  路  1Comment  路  Source: getsentry/sentry-laravel

Trying to upgrade to 1.1 from the old 0.11 is a nightmare because you don't provide any documentation. I finally found #185 which contains a link to this upgrade guide for the parent sentry-php library which, while helpful, is still woefully inadequate.

Specifically, the following options I was using just say "Removed" in the upgrade document with no information about their replacements:

user_context
trust_x_forwarded_proto
install_default_breadcrumb_handlers

Apparently user_context is now called send_default_pii, but I still have no idea about the others. Has the default behaviour changed? Who knows! There should be a single place to see all of this information when it is such a major upgrade like this. It's very frustrating to say the least. Especially because user_context was previously in the default config!

Yes, I can hunt through the code and revision history of each project to figure all this out for myself, but come on, help us out here...

Most helpful comment

I extracted all the default options in v1.1 in case this is helpful to anyone:

'attach_stacktrace'       => false,
'before_breadcrumb'       => function (Sentry\Breadcrumb $breadcrumb): ?Sentry\Breadcrumb {
    return $breadcrumb;
},
'before_send'             => function (Sentry\Event $event): ?Sentry\Event {
    return $event;
},
'breadcrumbs'             => [
    'sql_bindings' => false,
],
'capture_silenced_errors' => false,
'class_serializers'       => [],
'context_lines'           => 5,
'default_integrations'    => true,
'dsn'                     => $_SERVER['SENTRY_DSN'] ?? null,
'enable_compression'      => true,
'environment'             => app()->environment(),
'error_types'             => E_ALL,
'excluded_exceptions'     => [],
'http_proxy'              => null,
'in_app_exclude'          => [base_path('vendor')],
'integrations'            => [new Sentry\Laravel\Integration],
'logger'                  => 'php',
'max_breadcrumbs'         => 100,
'max_request_body_size'   => 'medium',
'max_value_length'        => 1024,
'prefixes'                => [base_path()],
'project_root'            => base_path(),
'release'                 => $_SERVER['SENTRY_RELEASE'] ?? null,
'sample_rate'             => 1,
'send_attempts'           => 3,
'send_default_pii'        => false,
'server_name'             => gethostname(),
'tags'                    => [],

>All comments

I extracted all the default options in v1.1 in case this is helpful to anyone:

'attach_stacktrace'       => false,
'before_breadcrumb'       => function (Sentry\Breadcrumb $breadcrumb): ?Sentry\Breadcrumb {
    return $breadcrumb;
},
'before_send'             => function (Sentry\Event $event): ?Sentry\Event {
    return $event;
},
'breadcrumbs'             => [
    'sql_bindings' => false,
],
'capture_silenced_errors' => false,
'class_serializers'       => [],
'context_lines'           => 5,
'default_integrations'    => true,
'dsn'                     => $_SERVER['SENTRY_DSN'] ?? null,
'enable_compression'      => true,
'environment'             => app()->environment(),
'error_types'             => E_ALL,
'excluded_exceptions'     => [],
'http_proxy'              => null,
'in_app_exclude'          => [base_path('vendor')],
'integrations'            => [new Sentry\Laravel\Integration],
'logger'                  => 'php',
'max_breadcrumbs'         => 100,
'max_request_body_size'   => 'medium',
'max_value_length'        => 1024,
'prefixes'                => [base_path()],
'project_root'            => base_path(),
'release'                 => $_SERVER['SENTRY_RELEASE'] ?? null,
'sample_rate'             => 1,
'send_attempts'           => 3,
'send_default_pii'        => false,
'server_name'             => gethostname(),
'tags'                    => [],
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mx0r picture mx0r  路  3Comments

andrey-helldar picture andrey-helldar  路  7Comments

errogaht picture errogaht  路  8Comments

IMM9O picture IMM9O  路  5Comments

AidasK picture AidasK  路  5Comments