Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fixes for opentracing scopes #11869

Merged
merged 6 commits into from
Feb 2, 2022
Merged

Fixes for opentracing scopes #11869

merged 6 commits into from
Feb 2, 2022

Commits on Feb 1, 2022

  1. Fixes for opentracing scopes

    `start_active_span` was inconsistent as to whether it would activate the span
    immediately, or wait for `scope.__enter__` to happen (it depended on whether
    the current logcontext already had an associated scope). The inconsistency was
    rather confusing if you were hoping to set up a couple of separate spans before
    activating either.
    
    Looking at the other implementations of opentracing `ScopeManager`s, the
    intention is that it *should* be activated immediately, as the name
    implies. Indeed, the idea is that you don't have to use the scope as a
    contextmanager at all - you can just call `.close` on the result. Hence, our
    cleanup has to happen in `.close` rather than `.__exit__`.
    
    So, the main change here is to ensure that `start_active_span` does activate
    the span, and that `scope.close()` does close the scope.
    
    We also add some tests, which requires a `tracer` param so that we don't have
    to rely on the global variable in unit tests.
    richvdh committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    37b9fd7 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Fixes for olddeps

     * old twisted put MemoryReactorClock elsewhere
     * old jaeger_client had no Span.finished
    richvdh committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    217713d View commit details
    Browse the repository at this point in the history
  2. fix tests on -noextras

    richvdh committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    30cb684 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
    richvdh and babolivier authored Feb 2, 2022
    Configuration menu
    Copy the full SHA
    b184a8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    86249ef View commit details
    Browse the repository at this point in the history
  5. more -noextras fixes

    richvdh committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    136434b View commit details
    Browse the repository at this point in the history