Skip to content

rpcmiddleware: propagate certain context values across grpc #933

@ellemouton

Description

@ellemouton

Opening the general tracking issue here although most of the work will probably take place in LND and LND client.

Feature description

Today in LiT, if we have a request coming through LNC, we can intercept it there before it gets sent
to any of the interceptors registered with the LND RPC middleware interceptor. This can be useful
for adding the LNC session's ID to the context of the incoming request. That way the Action Logger
interceptor should, for example, be able to extract the session ID from the incoming context. This,
however, does not work today since the RPC middleware interception management happens over gRPC
which does not propagate context values by default. We should be able to make use of gRPC metadata
to transmit certain context values (at least those that have a String() method).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions