From c1fdac8b988fd51cc44cc2ddd51e1b1cf943c144 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Tue, 23 Dec 2025 13:38:29 -0800 Subject: [PATCH] rename rest to http for mcp filters --- arch/arch_config_schema.yaml | 2 +- .../src/handlers/pipeline_processor.rs | 32 +++++++++---------- demos/use_cases/mcp_filter/arch_config.yaml | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/arch_config_schema.yaml b/arch/arch_config_schema.yaml index 1895a819..78856adf 100644 --- a/arch/arch_config_schema.yaml +++ b/arch/arch_config_schema.yaml @@ -36,7 +36,7 @@ properties: type: string enum: - mcp - - rest + - http transport: type: string enum: diff --git a/crates/brightstaff/src/handlers/pipeline_processor.rs b/crates/brightstaff/src/handlers/pipeline_processor.rs index c1bf5ca4..04aa427a 100644 --- a/crates/brightstaff/src/handlers/pipeline_processor.rs +++ b/crates/brightstaff/src/handlers/pipeline_processor.rs @@ -132,7 +132,7 @@ impl PipelineProcessor { } /// Record a span for MCP protocol interactions - fn record_mcp_span( + fn record_agent_filter_span( &self, collector: &std::sync::Arc, operation: &str, @@ -243,7 +243,7 @@ impl PipelineProcessor { .await?; } else { chat_history_updated = self - .execute_rest_filter( + .execute_http_filter( &chat_history_updated, agent, request_headers, @@ -489,7 +489,7 @@ impl PipelineProcessor { attrs.insert("mcp.session_id", mcp_session_id.clone()); attrs.insert("http.status_code", http_status.as_u16().to_string()); - self.record_mcp_span( + self.record_agent_filter_span( collector, "tool_call", &agent.id, @@ -690,8 +690,8 @@ impl PipelineProcessor { session_id } - /// Execute a REST-based filter agent - async fn execute_rest_filter( + /// Execute a HTTP-based filter agent + async fn execute_http_filter( &mut self, messages: &[Message], agent: &Agent, @@ -702,11 +702,11 @@ impl PipelineProcessor { ) -> Result, PipelineError> { let tool_name = agent.tool.as_deref().unwrap_or(&agent.id); - // Generate span ID for this REST call (child of filter span) - let rest_span_id = generate_random_span_id(); + // Generate span ID for this HTTP call (child of filter span) + let http_span_id = generate_random_span_id(); // Build headers - let trace_parent = format!("00-{}-{}-01", trace_id, rest_span_id); + let trace_parent = format!("00-{}-{}-01", trace_id, http_span_id); let mut agent_headers = request_headers.clone(); agent_headers.remove(hyper::header::CONTENT_LENGTH); @@ -742,7 +742,7 @@ impl PipelineProcessor { let start_instant = Instant::now(); debug!( - "Sending REST request to agent {} at URL: {}", + "Sending HTTP request to agent {} at URL: {}", agent.id, agent.url ); @@ -761,16 +761,16 @@ impl PipelineProcessor { let end_time = SystemTime::now(); let elapsed = start_instant.elapsed(); - // Record REST call span + // Record HTTP call span if let Some(collector) = trace_collector { let mut attrs = HashMap::new(); - attrs.insert("rest.tool_name", tool_name.to_string()); - attrs.insert("rest.url", agent.url.clone()); + attrs.insert("http.tool_name", tool_name.to_string()); + attrs.insert("http.url", agent.url.clone()); attrs.insert("http.status_code", http_status.as_u16().to_string()); - self.record_mcp_span( + self.record_agent_filter_span( collector, - "rest_call", + "http_call", &agent.id, start_time, end_time, @@ -778,7 +778,7 @@ impl PipelineProcessor { Some(attrs), trace_id.clone(), filter_span_id.clone(), - Some(rest_span_id), + Some(http_span_id), ); } @@ -801,7 +801,7 @@ impl PipelineProcessor { } info!( - "Response from REST agent {}: {}", + "Response from HTTP agent {}: {}", agent.id, String::from_utf8_lossy(&response_bytes) ); diff --git a/demos/use_cases/mcp_filter/arch_config.yaml b/demos/use_cases/mcp_filter/arch_config.yaml index a006e969..b70d817b 100644 --- a/demos/use_cases/mcp_filter/arch_config.yaml +++ b/demos/use_cases/mcp_filter/arch_config.yaml @@ -7,8 +7,8 @@ agents: filters: - id: query_rewriter url: http://host.docker.internal:10500 - type: rest - # type: rest or mcp, mcp is default + type: http + # type: http or mcp, mcp is default # transport: streamable-http # default is streamable-http # tool: query_rewriter # default name is the filter id - id: context_builder