Skip to content

Add w3c tracing headers validation lib#43481

Merged
botengyao merged 20 commits intoenvoyproxy:mainfrom
antoniovleonti:tracing-validation
Feb 19, 2026
Merged

Add w3c tracing headers validation lib#43481
botengyao merged 20 commits intoenvoyproxy:mainfrom
antoniovleonti:tracing-validation

Conversation

@antoniovleonti
Copy link
Copy Markdown
Contributor

Commit Message: Add tracing validation lib for mcp
Additional Description:

I'm working on features for mcp relating to extracting tracing fields from the mcp params. This requires validation. This PR adds a small validation lib for me to use for these features.

Risk Level: low / none
Testing: unit tests added
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: antoniovleonti <leonti@google.com>
Comment thread source/extensions/filters/http/mcp/mcp_tracing_validation.cc Outdated
Comment thread source/common/tracing/tracing_validation.cc
Comment thread test/extensions/filters/http/mcp/mcp_tracing_validation_test.cc Outdated
Comment thread test/extensions/filters/http/mcp/mcp_tracing_validation_test.cc Outdated
Comment thread source/extensions/filters/http/mcp/mcp_tracing_validation.h Outdated
Comment thread test/extensions/filters/http/mcp/BUILD Outdated
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Copy link
Copy Markdown
Contributor

@wdauchy wdauchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clean implementation! Cross-referencing against the W3C Trace Context and Baggage ABNF grammars, I found three spec-compliance issues (see inline comments).

nit: McpTracingValidation namespace inside Mcp namespace is a bit redundant -- consider just TracingValidation.

Comment thread source/extensions/filters/http/mcp/mcp_tracing_validation.cc Outdated
Comment thread source/extensions/filters/http/mcp/mcp_tracing_validation.cc Outdated
Comment thread source/extensions/filters/http/mcp/mcp_tracing_validation.cc Outdated
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

@wdauchy PTAL when you get a chance :)

Copy link
Copy Markdown
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice PR, thanks for adding this support, and some more comments, otherwise LGTM.

/wait

Comment thread source/common/tracing/tracing_validation.cc
Comment thread source/extensions/filters/http/mcp/tracing_validation.cc Outdated
Comment thread source/extensions/filters/http/mcp/tracing_validation.cc Outdated
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Copy link
Copy Markdown
Contributor

@wdauchy wdauchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all three issues from the previous review are fixed, and the move to source/common/tracing/ makes sense. one minor nit on test coverage inline

Comment thread test/common/tracing/tracing_validation_test.cc
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: antoniovleonti <leonti@google.com>
@antoniovleonti antoniovleonti changed the title Add tracing validation lib for mcp Add w3c tracing headers validation lib Feb 19, 2026
Signed-off-by: antoniovleonti <leonti@google.com>
Copy link
Copy Markdown
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@botengyao botengyao enabled auto-merge (squash) February 19, 2026 15:56
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/retest

@antoniovleonti
Copy link
Copy Markdown
Contributor Author

(failure looks unrelated-- something about go xds)

Signed-off-by: antoniovleonti <leonti@google.com>
@botengyao botengyao merged commit 34ccad4 into envoyproxy:main Feb 19, 2026
28 checks passed
@antoniovleonti antoniovleonti deleted the tracing-validation branch February 19, 2026 21:11
bmjask pushed a commit to bmjask/envoy that referenced this pull request Mar 14, 2026
<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)

!!!ATTENTION!!!

Please check the [use of generative AI
policy](https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md?plain=1#L41).

You may use generative AI only if you fully understand the code. You
need to disclose
this usage in the PR description to ensure transparency.
-->

Commit Message: Add tracing validation lib for mcp
Additional Description:

I'm working on features for mcp relating to extracting tracing fields
from the mcp params. This requires validation. This PR adds a small
validation lib for me to use for these features.

Risk Level: low / none
Testing: unit tests added
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: antoniovleonti <leonti@google.com>
Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
bvandewalle pushed a commit to bvandewalle/envoy that referenced this pull request Mar 17, 2026
<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)

!!!ATTENTION!!!

Please check the [use of generative AI
policy](https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md?plain=1#L41).

You may use generative AI only if you fully understand the code. You
need to disclose
this usage in the PR description to ensure transparency.
-->

Commit Message: Add tracing validation lib for mcp
Additional Description:

I'm working on features for mcp relating to extracting tracing fields
from the mcp params. This requires validation. This PR adds a small
validation lib for me to use for these features.

Risk Level: low / none
Testing: unit tests added
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: antoniovleonti <leonti@google.com>
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)

!!!ATTENTION!!!

Please check the [use of generative AI
policy](https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md?plain=1#L41).

You may use generative AI only if you fully understand the code. You
need to disclose
this usage in the PR description to ensure transparency.
-->

Commit Message: Add tracing validation lib for mcp
Additional Description:

I'm working on features for mcp relating to extracting tracing fields
from the mcp params. This requires validation. This PR adds a small
validation lib for me to use for these features.

Risk Level: low / none
Testing: unit tests added
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: antoniovleonti <leonti@google.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)

!!!ATTENTION!!!

Please check the [use of generative AI
policy](https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md?plain=1#L41).

You may use generative AI only if you fully understand the code. You
need to disclose
this usage in the PR description to ensure transparency.
-->

Commit Message: Add tracing validation lib for mcp
Additional Description:

I'm working on features for mcp relating to extracting tracing fields
from the mcp params. This requires validation. This PR adds a small
validation lib for me to use for these features.

Risk Level: low / none
Testing: unit tests added
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: antoniovleonti <leonti@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants