You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would test against master, but if you're seeing issues its because we dont hijack all URL generation areas yet, and you're hosting on a subpath (which requires SCRIPT_NAME changes via proxying).
Really? And it was working before new version - with exactly same setup. Everything works but email notifications so I honestly doubt that is the correct explanation... Especially as @Hopson commented - it is flawed under gunicorn as well.
@23doors in master (which may not be 5.4) nearly all URLs are generated using SENTRY_URL_PREFIX
This doesnt guarantee things will work. You'll likely still need to set FORCE_SCRIPT_NAME if you're doing something with a path (which is a Django thing).
This isn't really a Sentry bug, but its more of a "we dont support subpaths" or at least "we dont document how to run Sentry in a subdirectory"
I understand but it doesn't really seem like subpath thingie. Mind that I am using queue (celery) to deliver messages. And from what I saw - mail notifications are also sent from celery level. Which would mean that urls are also generated from there. It seems like something that would work like that irrelevant of subpath (or lack of it) or server choice/configuration.
When not using queue I am getting URL + double sentry/sentry (but I havent tested with proper urls.py). With celery I am getting correct path but no server url - is there a way to force server url to use? As I see it is not using django current site url so how to force it from celery level (where things like pathinfo etc does not exist).
Without celery (queue = false) I am seeing:
http://server_url/sentry/sentry/team-slug/project-slug/group/group_id/
With celery:
I am seeing:
/sentry/team-slug/project-slug/group/group-id/
So basically correct path but no http and no server_url.
Update: I checked how url is generated and got it resolved. For sentry I got SENTRY_URL_PREFIX = ''.
For celery I am setting this to server base url. And finally email is working fine.
I assume that when using queue this has to be set, as there is no request hostname or anything like that so url prefix will remain empty. This should be documented I guess.
You basically always have to set SENTRY_URL_PREFIX. It's documented. Where
is the confusion?
On Thursday, June 27, 2013, Robert Kopaczewski wrote:
Without celery (queue = false) I am seeing:
http://server_url/sentry/sentry/team-slug/project-slug/group/group_id/
With celery:
I am seeing:
/sentry/team-slug/project-slug/group/group-id/
So basically correct path but no http and no server_url.
Update: I checked how url is generated and got it resolved. For sentry I
got SENTRY_URL_PREFIX = ''.
For celery I am setting this to server base url. And finally email is
working fine.
I assume that when using queue this has to be set, as there is no request
hostname or anything like that so url prefix will remain empty. This should
be documented I guess.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/804#issuecomment-20148166
.
There is no indication anywhere that it should be set. Most of the time it works fine without it. And I have never been using it before (set to '' just as it is default).
Example value in docs is also confusing:
SENTRY_URL_PREFIX = '/sentry'
Which seems to be pointing out that it should contain path prefix but not base url as well.
Activity
23doors commentedon Feb 27, 2013
Haven't tried 5.4 yet, is it something that may have been fixed by this version?
robertlucido commentedon Mar 1, 2013
Problem exists for me in 5.4.2, running under gunicorn.
23doors commentedon Jun 27, 2013
After adding (r'^sentry/', include('sentry.web.urls')), to django app I got:
/sentry/default/blabla
Basically - yup, no /sentry/sentry but also hmm.. Server url disappeared... They are no longer valid links. href="/sentry/defaultblabla".
dcramer commentedon Jun 27, 2013
I would test against master, but if you're seeing issues its because we dont hijack all URL generation areas yet, and you're hosting on a subpath (which requires SCRIPT_NAME changes via proxying).
23doors commentedon Jun 27, 2013
Really? And it was working before new version - with exactly same setup. Everything works but email notifications so I honestly doubt that is the correct explanation... Especially as @Hopson commented - it is flawed under gunicorn as well.
dcramer commentedon Jun 27, 2013
@23doors in master (which may not be 5.4) nearly all URLs are generated using SENTRY_URL_PREFIX
This doesnt guarantee things will work. You'll likely still need to set FORCE_SCRIPT_NAME if you're doing something with a path (which is a Django thing).
This isn't really a Sentry bug, but its more of a "we dont support subpaths" or at least "we dont document how to run Sentry in a subdirectory"
23doors commentedon Jun 27, 2013
I understand but it doesn't really seem like subpath thingie. Mind that I am using queue (celery) to deliver messages. And from what I saw - mail notifications are also sent from celery level. Which would mean that urls are also generated from there. It seems like something that would work like that irrelevant of subpath (or lack of it) or server choice/configuration.
When not using queue I am getting URL + double sentry/sentry (but I havent tested with proper urls.py). With celery I am getting correct path but no server url - is there a way to force server url to use? As I see it is not using django current site url so how to force it from celery level (where things like pathinfo etc does not exist).
dcramer commentedon Jun 27, 2013
The URL should be team-slug/project-slug, are you sure this isn't what you're seeing?
23doors commentedon Jun 27, 2013
Without celery (queue = false) I am seeing:
http://server_url/sentry/sentry/team-slug/project-slug/group/group_id/
With celery:
I am seeing:
/sentry/team-slug/project-slug/group/group-id/
So basically correct path but no http and no server_url.
Update: I checked how url is generated and got it resolved. For sentry I got SENTRY_URL_PREFIX = ''.
For celery I am setting this to server base url. And finally email is working fine.
I assume that when using queue this has to be set, as there is no request hostname or anything like that so url prefix will remain empty. This should be documented I guess.
dcramer commentedon Jun 27, 2013
You basically always have to set SENTRY_URL_PREFIX. It's documented. Where
is the confusion?
On Thursday, June 27, 2013, Robert Kopaczewski wrote:
David Cramer
http://disqus.com/zeeg
http://twitter.com/zeeg
23doors commentedon Jun 27, 2013
There is no indication anywhere that it should be set. Most of the time it works fine without it. And I have never been using it before (set to '' just as it is default).
23doors commentedon Jun 27, 2013
Example value in docs is also confusing:
SENTRY_URL_PREFIX = '/sentry'
Which seems to be pointing out that it should contain path prefix but not base url as well.
dcramer commentedon Jun 27, 2013
The docs need updated, but the example config shows:
dcramer commentedon Jun 27, 2013
docs updated in a9bb47d
23doors commentedon Jun 27, 2013
Great! Thanks!