• Sean McGivern's avatar
    Use surrounding context's feature category for unowned workers · cf9a27f0
    Sean McGivern authored
    When we're in Sidekiq, in most cases we want to use the feature category
    of the current worker class in logs and metrics. If a worker with the
    'users' feature category is called by an endpoint that has the
    'issue tracking' feature category, then 'users' is the more specific
    category.
    
    However, for workers without an owning feature category, this is worse:
    we're effectively throwing away the information from the surrounding
    context to give the least-specific information we could possibly give.
    This changes that so that in logs and in metrics, we'll use the feature
    category from the calling context for workers that don't have an owner.
    cf9a27f0
client_metrics_spec.rb 2.79 KB