Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TracingChannelInterceptor: simple refactoring #1948

Commits on May 12, 2021

  1. Configuration menu
    Copy the full SHA
    8c8be02 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2021

  1. * More clean up in the TracingChannelInterceptor

     - Move Spring Cloud Stream classes logic into `static` methods
    to avoid eager load for those classes which are not present on CP
    - Remove `emptyMessage()` since the contract for `ChannelInterceptor`
    never accept a `null`
    - Remove thread state manipulation from the `postReceive()` since
    no one takes care about thread local afterwards
    - Remove `afterReceiveCompletion()` in favor of its `default` impl
    in the interface: we don't do thread local manipulation for `receive()`
    since `afterReceiveCompletion()` is called *before* the message is really
    returned to the target subscriber on the channel
    artembilan committed May 13, 2021
    Configuration menu
    Copy the full SHA
    5fd6526 View commit details
    Browse the repository at this point in the history
  2. * Restore span manipulation for receive().

    Even if we don't need a thread local store, we still
    need to call `span.end()` and set an exception tag
    to it if any.
    So, just reuse an existing API which includes thread local.
    Even if we don't need it logically, there might be some
    other interceptors in between which would like to take a
    span from thread local do something even on that "void"
    `receive()` operation
    artembilan committed May 13, 2021
    Configuration menu
    Copy the full SHA
    58c8e05 View commit details
    Browse the repository at this point in the history