tokenizer: propagate trace context on vLLM render requests - #2245
Merged
Conversation
mschulist
requested review from
a team,
liu-cong,
sagearc and
vMaroon
as code owners
July 31, 2026 03:51
Contributor
|
🚨 Unsigned commits detected! Please sign your commits. For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR instruments the tokenizer’s vLLM /render HTTP client transport with OpenTelemetry’s otelhttp transport wrapper so outbound render requests propagate W3C trace context (traceparent), aligning tokenizer→vLLM tracing behavior with the existing sidecar proxy transport pattern.
Changes:
- Wrap the vLLM render
http.Clienttransport withotelhttp.NewTransport(...)so trace context is injected on outbound requests. - Add a unit test asserting that a
traceparentheader is present and carries the expected trace ID.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/vllm_http.go | Wraps the render transport with otelhttp.NewTransport to propagate trace context on outbound /render calls. |
| pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/vllm_http_test.go | Adds a test validating traceparent injection for render requests. |
Suppressed comments (1)
pkg/epp/framework/plugins/requestcontrol/dataproducer/tokenizer/vllm_http_test.go:329
- After adding a synchronization channel for the handler, wait for it before asserting on
gotTraceparentso the test has a defined happens-before relationship.
_, _, err = r.Render(ctx, fwkrh.PayloadMap{"prompt": "hello"})
require.NoError(t, err)
if gotTraceparent == "" {
t.Fatal("expected traceparent header to be injected into outbound render request, got none")
mschulist
force-pushed
the
mschulist-tokenzier-tracing
branch
2 times, most recently
from
July 31, 2026 04:05
91d49ae to
48bbc67
Compare
Wrap the render HTTP transport with otelhttp.NewTransport so that outbound /render requests carry the W3C traceparent header. This links the tokenizer-to-vLLM hop into the same trace span as the EPP request, matching the existing pattern used by the sidecar proxy transport. Signed-off-by: Mark Schulist <mschulist2@gmail.com>
mschulist
force-pushed
the
mschulist-tokenzier-tracing
branch
from
July 31, 2026 04:07
48bbc67 to
cb45b51
Compare
vMaroon
approved these changes
Aug 1, 2026
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.
Wrap the render HTTP transport with otelhttp.NewTransport so that outbound /render requests carry the W3C traceparent header. This links the tokenizer-to-vLLM hop into the same trace span as the EPP request, matching the existing pattern used by the sidecar proxy transport.