-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Absolute paths instead of relative paths since 4.0 #431
Comments
@ste93cry are you using 4.0 in prod? Do you have the same issue? [EDIT] I see that |
I'm using 3.5.2 in prod with default options and I do NOT get the full path. Hence, it's probably due to 4.0. |
Not yet |
I tried this config in production but it doesn't solve the problem: sentry:
options:
in_app_include:
- '%kernel.project_dir%' |
I checked the compiled container on production and found that my // var/cache/prod/ContainerCsF2Fdk/App_KernelProdContainer.php
// ...
public function __construct(array $buildParameters = [], $containerDir = __DIR__)
{
// ...
$this->targetDir = \dirname($containerDir);
// ...
}
// ....
protected function getSentry_ClientService()
{
$a = new \Sentry\Options([
'in_app_include' => [
0 => \dirname(__DIR__, 4),
],
'integrations' => [
0 => new \Sentry\Integration\IgnoreErrorsIntegration(['ignore_exceptions' => $this->parameters['excluded_exceptions_in_tracking']]),
1 => new \Sentry\Integration\RequestIntegration(
new \Sentry\SentryBundle\Integration\RequestFetcher(
($this->services['request_stack'] ?? ($this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack())),
null
)
),
],
'release' => $this->getEnv('APP_REVISION'),
'environment' => 'production',
'prefixes' => [],
'tags' => [],
'in_app_exclude' => [
0 => $this->targetDir . '',
1 => $this->targetDir . '',
2 => (\dirname(__DIR__, 4) . '/vendor'),
],
'class_serializers' => [],
'dsn' => $this->getEnv('SENTRY_DSN'),
]);
} But I find it weird that for |
sentry-symfony/src/DependencyInjection/Configuration.php Lines 99 to 101 in 24b1dac
So it could be duplicated, that's normal. |
If I'm following right, the issue is the prefixes option isn't being set, and you'll need this to make relative paths again: sentry:
options:
prefixes:
- '%kernel.project_dir%' |
@mbabker Thanks. I'm going to try that out next week and reply back. |
The @HazAT can you to report it to the proper channels? |
Scratch that, |
I've also found the related PR for the slash that needs to be trimmed: getsentry/sentry-php#1163 |
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
Symfony 4.0
Steps to Reproduce
Since upgrading to Symfony 4.0 I noticed that reported paths are no longer relative to the
project_dir
but absolute paths like this:I searched the docs but couldn't find anything related to this.
Expected Result
Relative path to
%kernel.project_dir%
.The text was updated successfully, but these errors were encountered: