Skip to content

Workaround necessary to use sentry client via HTTP proxy and a local sentry relay #122

@josefglatz

Description

@josefglatz

Problem Scenario

A) You set TYPO3 HTTP/proxy as array like:

'HTTP' => [
    'proxy' => [
        'http' => $_ENV['HTTP_PROXY'] ?? '',
        'https' => $_ENV['HTTP_PROXY'] ?? '',
        'no' => [
            '127.0.0.1',
            'localhost',
        ],
    ],
],

Since the networkteam/sentry-client does not use a Guzzle Http Client, the build in HttpClient of sentry/sentry is used where only HTTP/proxy/http is retrieved and set as option http_proxy for the communication with the sentry-host.

If you run a local sentry-relay on the same host as the webserver to keep the performance up and cache errors locally until it get's delivered to the upstream Sentry Server you have the problem, that it's always using the proxy set in TYPO3's TYPO3_CONF_VARS.

However, there's a workaround

Setting TYPO3_CONF_VARS

'EXTCONF' => [
    'sentry_client' => [
        'options' => [
            // Overwrite automatic proxy configuration to add support for the local sentry relay
            'http_proxy' => null,
        ],
    ],
],

overwrites the option after the auto config of TYPO3's proxy config and befor the sentry http client steps in.


Other Solution?

Is there a way for us to find a more pleasant solution for this in this extension? Or should we point this out in the documentation again? Or is this a problem in the upstream repository?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions