This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ Add a max version for the `jaeger-client` dependency for an incompatibility with the rust reporter.
Original file line number Diff line number Diff line change @@ -236,8 +236,17 @@ class _DummyTagNames:
236236try :
237237 from rust_python_jaeger_reporter import Reporter
238238
239+ # jaeger-client 4.7.0 requires that reporters inherit from BaseReporter, which
240+ # didn't exist before that version.
241+ try :
242+ from jaeger_client .reporter import BaseReporter
243+ except ImportError :
244+
245+ class BaseReporter : # type: ignore[no-redef]
246+ pass
247+
239248 @attr .s (slots = True , frozen = True )
240- class _WrappedRustReporter :
249+ class _WrappedRustReporter ( BaseReporter ) :
241250 """Wrap the reporter to ensure `report_span` never throws."""
242251
243252 _reporter = attr .ib (type = Reporter , default = attr .Factory (Reporter ))
@@ -382,6 +391,7 @@ def init_tracer(hs: "HomeServer"):
382391 # If we have the rust jaeger reporter available let's use that.
383392 if RustReporter :
384393 logger .info ("Using rust_python_jaeger_reporter library" )
394+ assert config .sampler is not None
385395 tracer = config .create_tracer (RustReporter (), config .sampler )
386396 opentracing .set_global_tracer (tracer )
387397 else :
You can’t perform that action at this time.
0 commit comments