You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Propagate PrivacyLibAgenticContext through Carbon requests and Thrift transport headers (#479)
Summary:
Pull Request resolved: #479
X-link: facebook/hhvm#9778
X-link: facebookresearch/DCPerf#621
Propagate the `PrivacyLibAgenticContext` as a `privacylib-propagation` Thrift header from clients through mcrouter to DevProxy.
We capture the context before enqueuing the request in the mcrouter message queue. And then we set the header in the mcrouter Thrift transport layer.
Diagram:
```
Caller thread (RequestContext available)
│
├── CacheClientImplBase::buildSingleRequest() ← captures context here
│ └── carbonReq.setPrivacyLibAgenticContext(serialized)
│
├── RequestBuilderHelper::updateTaoRequestCommonPart() ← also captures here (TAO-specific)
│ └── carbonReq.setPrivacyLibAgenticContext(serialized)
│
╧ ── MessageQueue ──────────────────── (RequestContext lost, but field survives)
│
└── ThriftTransport::sendSyncHelper()
└── request.getPrivacyLibAgenticContext().has_value()
└── rpcOptions.setWriteHeader("privacylib-propagation", value)
```
We are focusing on Thrift transport exclusively as we are trying to close gaps in DevProxy layer.
Reviewed By: ghostonhuang
Differential Revision: D105269091
fbshipit-source-id: d362d4053651b95db31e758665922a8883b6a5af
0 commit comments