Detection of Google App Engine and AWS lambda does not work
tl;dr The fix in [GH-816] does not work but makes things worse by producing misleading log messages.
The code in https://github.com/getsentry/raven-python/blob/master/raven/conf/remote.py#L36 Should result in synchronous HTTP transport selection on AWS Lambda and Google App Engine. It produce a log entry which gives the user the feeling that raven would use synchronous HTTP transport now unless otherwise instructed.
This selection is only honored if later on RemoteConfig() is used.
But RemoteConfig.from_string() uses TransportRegistry(default_transports).
This completly ignores the DEFAULT_TRANSPORT set above.
This comment on GH-816 shows that the fix in 83984a2ad4853e1689b0aee1a800aa42618ace90 does not work. The logging information shown gives a false sense of working auto configuration.
To my understanding in the normal use caseClient(dsn) calls set_dsn(dsn) and this calls
RemoteConfig.from_string() whenever an DSN is given.
So you get a ThreadedHTTPTrasport although the Logging Message during the Import of
raven.conf.remote suggests otherwise. The result of this is that normal HTTP-Requests to Google AppEngine take 60 seconds whenever an error happens.
Possible workarounds: Configure the transport in the DSN:
raven.Client('sync+https://public_key:[email protected]/project_id')
Or provide the Transport during instantiation.
raven.Client(
'https://public_key:[email protected]/project_id'
transport=raven.transport.http.HTTPTransport)
Perhaps ist enough to update documentation and revert https://github.com/getsentry/raven-python/commit/83984a2ad4853e1689b0aee1a800aa42618ace90 to get rid of the confusing log messages.
setting the transport in the dsn is deprecated, I'll just concentrate on fixing the "auto-detect"
@ashwoods I assume you have seen https://github.com/getsentry/raven-python/pull/1193/commits/4a147f08df0f435763c39d168d27a29fab8a0cff ?
+1