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

subscriber: add missing Filter::on_record for to EnvFilter #2058

Merged
merged 4 commits into from Apr 8, 2022

Commits on Apr 8, 2022

  1. subscriber: add inherent impls for EnvFilter methods

    ## Motivation
    
    Currently, there is a potential namespace resolution issue when calling
    `EnvFilter` methods that have the same name in the `Filter` and
    `Subscribe` traits (such as `enabled` and `max_level_hint`). When both
    `Filter` and `Subscribe` are in scope, the method resolution is
    ambiguous.
    
    See #1983 (comment)
    
    ## Solution
    
    This commit solves the problem by making the inherent method versions of
    these methods public. When the traits are in scope, name resolution will
    always select the inherent method prefer`entially, preventing the name
    clash.
    hawkw committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    564ad32 View commit details
    Browse the repository at this point in the history
  2. fix broken links

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    a02042e View commit details
    Browse the repository at this point in the history
  3. subscriber: add missing Filter::on_record for to EnvFilter

    Depends on #2057
    
    ## Motivation
    
    Currently, `EnvFilter`'s `Subscribe` implementation provides a
    `Subscribe::on_record` method, but its `Filter` implementation is
    missing the corresponding `Filter::on_record` implementation. This means
    that when using `EnvFilter` as a per-subscriber filter, recording span
    fields after the spans were created will not update the filter state.
    
    ## Solution
    
    This commit factors out the `on_record` implementation for `Subscribe`
    into an inherent method, and adds a new `Filter::on_record` method that
    calls it as well.
    hawkw committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    abc419a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a9676c View commit details
    Browse the repository at this point in the history