Closed sergeifilippov closed 5 years ago
@sergeifilippov I'm unfamiliar with self-hosted Sentry installations, could you point me in the direction of api documentation regarding this?
As far as I know you just need to change the hostname to which you're sending the requests to.
So https://sentry.io/api/0/
would become https://self-hosted-sentry.example.com/api/0/
.
I can send you a docker-compose.yml
configuration to get it setup locally for testing if you need.
@sergeifilippov can you replace line 108 of SentryService.php:
$sentryClient = new Raven_Client($settings->clientDsn);
with:
$sentryClient = new Raven_Client($settings->clientDsn, [
'name' => 'hostname'
]);
as per the docs and then let me know if this works for you?
I have a Sentry stack running in docker on http://localhost:8080
It works if I do the following:
Update base_uri
in SentryService.php
on line 53
:
$client = new \GuzzleHttp\Client([
'base_uri' => 'http://localhost:8080',
'http_errors' => false,
'timeout' => 5,
'headers' => [
'Authorization' => 'Bearer ' . $authToken
]
]);
and update href
in settings.twig
on line 56
:
{% if 'authToken' not in overrides %}
<a class="btn" href="http://localhost:8080/api/" target="_blank">Get Authentication Token</a>
{% endif %}
@sergeifilippov Guzzle is used to fetch the available config settings from Sentry, the actual error handling is managed using Sentry's Raven Client.
You'll still need to update the Raven Client parameters.
It would be great if you could specify the host to be used for Sentry so you can send the data to the self hosted version. 👍🏻