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

Make the scope current when needed for grpc server instrumentation #3806

Commits on May 3, 2023

  1. Make the scope current when needed for grpc server instrumentation

    When grpc client uses non-blocking requests, the server calls
    `interceptor#interceptCall` multiple times first, then proceed to the
    `listener#on...` methods.  It is different from blocking requests that call
    those methods sequentially per request.  The behavior causes multiple scopes to
    be opened on the same thread in `interceptCall` and wrongly consumes them in
    `on...` methods.
    
    This change compares the current scope held by the `ObservationRegistry`
    against the withheld `scope`.  When they are different, make the withheld scope
    current; then, the subsequent logic can pick the proper target observation.
    
    Closes micrometer-metricsgh-3805
    ttddyy committed May 3, 2023
    Configuration menu
    Copy the full SHA
    79f54c0 View commit details
    Browse the repository at this point in the history