Sha256: 24ea7b101833591aab56211db279bb6835381a99e683557fd631cd1f1f04c1f0
Contents?: true
Size: 581 Bytes
Versions: 36
Compression:
Stored size: 581 Bytes
Contents
# frozen_string_literal: true module AnyCable module Rails module Middlewares # Middleware to add `sid` (session ID) tag to logs. # # Session ID could be provided through gRPC metadata `sid` key. # # See https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md class LogTagging < AnyCable::Middleware def call(_method, _request, metadata) sid = metadata["sid"] return yield unless sid AnyCable.logger.tagged("AnyCable sid=#{sid}") { yield } end end end end end
Version data entries
36 entries across 36 versions & 2 rubygems