Open aspyatkin opened 6 years ago
This code block in RemoteConfig __init__
seems to solve the problem, but I guess it only works in Python 2.7:
self.store_endpoint = store_endpoint
# begin
if isinstance(transport, basestring):
transport_class_module = '.'.join(transport.split('.')[0:-1])
transport_module = importlib.import_module(transport_class_module)
transport_class_name = transport.split('.')[-1]
if hasattr(transport_module, transport_class_name):
transport = getattr(transport_module, transport_class_name)
# end
self._transport_cls = transport or DEFAULT_TRANSPORT
Hello, I have encountered a problem after upgrading from raven 5.x and not sure how to deal with it better.
In older raven versions it was allowed to set Transport in DSN parameter. Since my applications make use of logging dict config, I used to set Transport there. From now on it produces a warning
Transport selection via DSN is deprecated
. I was not able to set Transport class explicitly in logging dict config:Judging by the code, SentryHandler won't be instantiated if
transport
is of typestr
and notcallable
. I wonder if there is an other way to set Transport class in logging dict config? Might an extra parametertransport_class
be implemented in next versions so as to instruct SentryHandler to load the desired type of Transport by its string identifier?