Repository navigation
Conversation
051e276 to
9ec76db
Compare
a6a95a9 to
91aafe3
Compare
7f15298 to
196819e
Compare
be53dd5 to
5ec0838
Compare
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
5ec0838 to
0c1cb2d
Compare
b261ad5 to
78820ca
Compare
…48249) <!-- !!!ATTENTION!!! If you are fixing **any** crash or **any** potential security issue, **do not open a pull request**. Instead, please [open a GitHub Security Advisory](https://github.com/envoyproxy/envoy/security/advisories/new) (preferred). Alternatively, you may email [email protected]. 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: Additional Description: This is the first PR in a chain, with the high-level goal of getting McpFilter to reparent the active span based on the request body's trace context. For reference, here is the full PR chain: 1. #48249 1. #48250 1. #48449 1. #48448 1. #48516 1. #48038 1. #48450 1. #48451 This PR was created with help from generative AI (Gemini). I fully understand the code. Risk Level: Testing: 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: dmcardle <[email protected]>
021d3d4 to
874a8fb
Compare
6f45541 to
d20e2a6
Compare
<!-- !!!ATTENTION!!! If you are fixing **any** crash or **any** potential security issue, **do not open a pull request**. Instead, please [open a GitHub Security Advisory](https://github.com/envoyproxy/envoy/security/advisories/new) (preferred). Alternatively, you may email [email protected]. 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: Additional Description: This change supports #48038 This PR was created with help from generative AI (Gemini). I fully understand the code. For reference, here is the full PR chain: 1. #48249 1. #48250 1. #48449 1. #48448 1. #48516 1. #48038 1. #48450 1. #48451 Risk Level: Testing: 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: dmcardle <[email protected]>
d20e2a6 to
5ce21e7
Compare
…Extractor (#48449) <!-- !!!ATTENTION!!! If you are fixing **any** crash or **any** potential security issue, **do not open a pull request**. Instead, please [open a GitHub Security Advisory](https://github.com/envoyproxy/envoy/security/advisories/new) (preferred). Alternatively, you may email [email protected]. 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: opentelemetry: Add traceparent parse/serialize methods to SpanContextExtractor This new override will be used by McpFilter in PR #48038. Additional Description: This PR was created with help from generative AI (Gemini). I fully understand the code. For reference, here is the full PR chain: 1. #48249 1. #48250 1. #48449 1. #48448 1. #48516 1. #48038 1. #48450 1. #48451 Risk Level: Testing: 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: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
5ce21e7 to
672f6bb
Compare
Signed-off-by: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
…metryConfig Signed-off-by: dmcardle <[email protected]>
672f6bb to
fe867f3
Compare
Signed-off-by: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
Signed-off-by: dmcardle <[email protected]>
c81543e to
b14aa12
Compare
| } | ||
|
|
||
| ENVOY_LOG(debug, "Not resampling in updateParent"); | ||
| setSampled(context->sampled()); |
There was a problem hiding this comment.
updateParent() can now turn sampling on for a request Envoy decided not to trace. Driver::startSpan() passes every span from Tracer::startSpan() through applyTracingDecision (#45830), which calls setSampled(false) when tracing_decision.traced is false. Neither branch here does that. Please apply Envoy's decision on both branches, for example with Tracing::TracerUtility::shouldTraceRequest(stream_info_), and fix the second block of UpdateParentResamplesWithoutSampler, which expects a NotTraceable span to become sampled.
| setParentId(context->spanId()); | ||
|
|
||
| // Resample now that we have the correct trace context. | ||
| if (resample_on_update_parent_ && parent_tracer_.sampler() != nullptr) { |
There was a problem hiding this comment.
With a sampler configured and resample_on_update_parent unset, the sampler is skipped and line 116 overwrites its earlier decision with the parent's flag. Tracer::startSpan() with the same parent asks the sampler (line 478). If the aim is to mirror startSpan(), the sampler runs whenever one is configured and the field selects nothing. What is false meant to do when a sampler is configured? If the field stays, please add a test for a configured sampler with the field unset.
| } | ||
| } | ||
|
|
||
| TEST_F(OpenTelemetryDriverTest, UpdateParentKeepsLocalDecisionWithoutSamplerByDefault) { |
There was a problem hiding this comment.
nit: this test asserts the local decision is not kept. Maybe UpdateParentAdoptsParentDecisionWithoutSamplerByDefault. UpdateParentResamplesWithoutSampler above likewise does not resample.
| OTelSpanKind span_kind); | ||
| OTelSpanKind span_kind, bool preserve_headers = false); | ||
|
|
||
| SamplerSharedPtr sampler() const { return sampler_; } |
There was a problem hiding this comment.
nit: this copies the shared_ptr on every call, and updateParent() calls it twice. Return const SamplerSharedPtr&.
This new override will be used by McpFilter in PR #48038. Additional Description: This PR was created with help from generative AI (Gemini). I fully understand the code. For reference, here is the full PR chain: 1. #48249 1. #48250 1. #48449 1. #48448 1. #48516 1. #48038 1. #48450 1. #48451 Risk Level: Testing: 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: dmcardle <[email protected]>
This commit deduplicates constants related to W3C traceparent into source/common/tracing/tracing_validation.h. Additional Description: This PR was created with help from generative AI (Gemini). I fully understand the code. For reference, here is the full PR chain: 1. #48249 1. #48250 1. #48449 1. #48448 1. #48516 1. #48038 1. #48450 1. #48451 Risk Level: Testing: 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: dmcardle <[email protected]>
Commit Message:
Additional Description: This PR was created with help from generative AI (Gemini). I fully understand the code.
For reference, here is the full PR chain:
modefield to TraceContextPropagationConfig in mcp.proto #48249resample_on_update_parentto OpenTelemetryConfig #48450Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]