Skip to content

Commit e06754f

Browse files
committed
add Encoding span.SetAttributes, fix bug in connector_sglang_test.go
Signed-off-by: roytman <roytman@il.ibm.com>
1 parent 1576cc0 commit e06754f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkg/sidecar/proxy/chat_completions.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ func (s *Server) chatCompletionsHandler(w http.ResponseWriter, r *http.Request)
8787
}
8888
}
8989

90-
// Set span attributes for prefill
9190
if len(prefillHostPort) == 0 {
9291
s.logger.V(4).Info("skip disaggregated prefill")
9392
span.SetAttributes(
@@ -165,6 +164,11 @@ func (s *Server) chatCompletionsHandler(w http.ResponseWriter, r *http.Request)
165164
// If all encoders were filtered out, log and fall through
166165
if len(encoderHostPorts) > 0 && len(allowedEncoders) == 0 {
167166
s.logger.Info("SSRF protection: all encoder targets filtered out, falling back to P/D or decoder-only")
167+
span.SetAttributes(
168+
attribute.Bool("llm_d.epd_proxy.encode_disaggregation_used", false),
169+
attribute.Int("llm_d.epd_proxy.encoder_allowed", len(allowedEncoders)),
170+
attribute.Int("llm_d.epd_proxy.encoder_candidates", len(encoderHostPorts)),
171+
)
168172
}
169173

170174
// Use P/D protocol or decoder-only

pkg/sidecar/proxy/connector_sglang_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var _ = Describe("SGLang Connector", func() {
3535

3636
BeforeEach(func() {
3737
// Mock testing setup using the SGLang connector mode
38-
testInfo = sidecarConnectionTestSetup(ConnectorSGLang)
38+
testInfo = sidecarConnectionTestSetup(KVConnectorSGLang)
3939
})
4040

4141
It("should successfully send concurrent requests to prefill and decode with bootstrap info", func() {
@@ -137,7 +137,7 @@ var _ = Describe("SGLang Connector", func() {
137137

138138
// Re-initialize proxy to fetch the new mock addresses
139139
cfg := Config{
140-
Connector: ConnectorSGLang,
140+
KVConnector: KVConnectorSGLang,
141141
}
142142
testInfo.proxy = NewProxy("0", testInfo.decodeURL, cfg)
143143

0 commit comments

Comments
 (0)