Repository navigation
Add Agent Gateway runtime governance observability - #7921
Conversation
…ateway-p105 # Conflicts: # shenyu-plugin/shenyu-plugin-agent-gateway/src/main/java/org/apache/shenyu/plugin/agent/gateway/AgentGatewayPlugin.java # shenyu-plugin/shenyu-plugin-agent-gateway/src/main/java/org/apache/shenyu/plugin/agent/gateway/protocol/AgentMcpHttpHandler.java # shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-proxy/src/main/java/org/apache/shenyu/plugin/ai/proxy/enhanced/service/AiProxyEngine.java # shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-agent-gateway/src/main/java/org/apache/shenyu/springboot/starter/plugin/agent/gateway/AgentGatewayPluginConfiguration.java
…to integration/agent-gateway-p105 # Conflicts: # .github/scripts/test-agent-gateway-migrations.py # shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-proxy/src/main/java/org/apache/shenyu/plugin/ai/proxy/enhanced/service/AiProxyEngine.java # shenyu-plugin/shenyu-plugin-metrics/src/main/java/org/apache/shenyu/plugin/metrics/reporter/MetricsReporter.java # shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-agent-gateway/src/main/java/org/apache/shenyu/springboot/starter/plugin/agent/gateway/AgentGatewayPluginConfiguration.java
Aias00
left a comment
There was a problem hiding this comment.
Incremental runtime-governance review: 51 targeted tests passed at head 3f417a3, covering AgentRuntimeMetrics, metric/plugin/catalog collection, key-auth rejection reporting, starter wiring, loopback HTTP governance, and OTLP behavior. The fixed enum labels and deactivation of retired runtime reporters are appropriate; no new blocker found in the reviewed observability delta.
This remains a stacked Draft depending on #7860. Its current diff still modifies released 2.7.1 -> 2.7.2 migration scripts and adds the old standalone order script. Incorporate #7860's latest f9eb7ba/a34127bc8 correction, then rebuild the branch against the merged prerequisite before requesting independent merge approval. Passing these targeted tests does not validate those inherited migration edits.
Validation used isolated worktrees, the Maven wrapper, JDK 21 with the project compiler settings, and targeted tests. Checkstyle passed; RAT and JaCoCo were skipped. This does not claim a full reactor, e2e, or live deployment test run.
…ion/agent-gateway-p105 # Conflicts: # shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-agent-gateway/src/main/java/org/apache/shenyu/springboot/starter/plugin/agent/gateway/AgentGatewayPluginConfiguration.java
…ateway-p105 # Conflicts: # shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-proxy/src/test/java/org/apache/shenyu/plugin/ai/proxy/enhanced/AiProxyPluginTest.java
…to integration/agent-gateway-p105
Aias00
left a comment
There was a problem hiding this comment.
Reviewed 1a05008.
The updated branch incorporates the corrected prerequisite migrations and current-master baseline. Bounded metric categories and retired-reporter deactivation remain intact. The previous branch/migration validation condition is now represented in source, and the targeted governance/metrics/starter/ordering regressions pass. No blocking issue found in the reviewed incremental change.
Coordinate merging with its request-context prerequisite.
Targeted test report: 428 cases, 0 failures, 0 errors, 0 skipped.
Validation used ./mvnw, Amazon Corretto 21 and project target Java 17. Targeted Checkstyle, separately executed Apache RAT and git diff --check pass. No full-repository or Docker E2E pass is claimed; required CI must succeed before merge.
Aias00
left a comment
There was a problem hiding this comment.
Re-reviewed the updated head after merging master to resolve the overlap with the now-merged #7860. All nine conflicting paths retain the previously reviewed metrics implementation; I verified that the master versions of those paths were identical to #7860 before resolving them. Other master changes were included by the normal three-way merge.
Validation on the integrated tree: 417 targeted tests passed, with 0 failures, 0 errors and 0 skipped, across the Agent Gateway starter reactor and its dependencies; Maven Checkstyle and git diff --check also passed. This is focused verification, not a full repository/E2E run. The required GitHub checks must pass on this new head before merge.
Depends on #7860
Background
Agent Gateway needs a consistent operational view of logical MCP/LLM outcomes, actual AI upstream attempts, remote catalog state, and pre-routing authentication rejections. Retries should not be counted as additional logical requests.
This PR is a draft based on the unmerged #7860 head. It must not be merged independently before that prerequisite is reconciled and merged.
Changes
tracingTracerbean, and preserve application-provided custom MCP tracers. The plugin still creates no additional SDK, provider, or exporter.Verification
./mvnw -B -ntp -pl shenyu-plugin/shenyu-plugin-metrics,shenyu-plugin/shenyu-plugin-tracing,shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-tracing,shenyu-plugin/shenyu-plugin-security/shenyu-plugin-key-auth,shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-proxy,shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-prompt,shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-token-limiter,shenyu-plugin/shenyu-plugin-agent-gateway,shenyu-spring-boot-starter/shenyu-spring-boot-starter-plugin/shenyu-spring-boot-starter-plugin-agent-gateway -am test -DskipRemoteResources=true -Djacoco.skip=true: BUILD SUCCESS; 355 test classes; 2,819 tests, 0 failures, 0 errors, 4 skipped.