Propagate PrivacyLibAgenticContext through Carbon requests and Thrift transport headers#9778
Open
speb-meta wants to merge 1 commit into
Open
Propagate PrivacyLibAgenticContext through Carbon requests and Thrift transport headers#9778speb-meta wants to merge 1 commit into
PrivacyLibAgenticContext through Carbon requests and Thrift transport headers#9778speb-meta wants to merge 1 commit into
Conversation
…ft transport headers Summary: 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
ffd70d8 to
96b380b
Compare
speb-meta
added a commit
to speb-meta/DCPerf
that referenced
this pull request
May 18, 2026
…ft transport headers (facebookresearch#621) Summary: X-link: facebook/hhvm#9778 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
speb-meta
added a commit
to speb-meta/mcrouter
that referenced
this pull request
May 18, 2026
…ft transport headers Summary: 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
speb-meta
added a commit
to speb-meta/DCPerf
that referenced
this pull request
May 19, 2026
…ft transport headers (facebookresearch#621) Summary: X-link: facebook/mcrouter#479 X-link: facebook/hhvm#9778 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
speb-meta
added a commit
to speb-meta/mcrouter
that referenced
this pull request
May 19, 2026
…ft transport headers (facebook#479) Summary: 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
meta-codesync Bot
pushed a commit
to facebook/mcrouter
that referenced
this pull request
May 19, 2026
…ft 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
meta-codesync Bot
pushed a commit
to facebookresearch/DCPerf
that referenced
this pull request
May 19, 2026
…ft transport headers (#621) Summary: X-link: facebook/mcrouter#479 X-link: facebook/hhvm#9778 Pull Request resolved: #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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
X-link: facebookresearch/DCPerf#621
Propagate the
PrivacyLibAgenticContextas aprivacylib-propagationThrift 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:
We are focusing on Thrift transport exclusively as we are trying to close gaps in DevProxy layer.
Reviewed By: ghostonhuang
Differential Revision: D105269091