Repository navigation
feat(external-apps): telemetry using agentgateway - #131
Merged
Merged
Conversation
added 5 commits
October 14, 2026 16:32
- Capture native app inference and MCP operations - Persist telemetry through observer and expose it in Lens - Build and deploy the patched agentgateway image
- Apply gofmt-style formatting across controllers, gateways, and tests - Improve readability of telemetry and validation conditionals
- Scan all parent references when detecting delegated routes - Stop checking delegation conditions once a ready parent is found
- Refine OTLP tracing and delegation metadata - Update observability APIs and Lens trace filtering
- Replace the Dockerfile-based image build with reproducible Nix packaging - Generalize CI image publishing for Nix-built agent and agentgateway images
- Replace separate registry, repository, and tag settings - Pass the configured Agentgateway image through Makefile and Helm
- Filter and label models based on compatibility across selected APIs - Preserve agent-specific API selection behavior
- Remove manual inference API selection from consent - Evaluate model compatibility based on the selected client agent
Keep native MCP history and source selection available when runtime session discovery fails. Preserve remembered sessions and allow aggregate persisted reads without live sessions. Bound optional native and payload invocation identifiers to 512 bytes so composite B-tree keys fit. Retain raw observations and payloads when optional identifiers are unusable.
Sessionless MCP requests bypassed conversation ownership and could aggregate another user's coding activity. Require a conversation in the API authorization path and keep coding users without conversations in an empty UI state. Shared-workspace historical aggregation remains available. Add regression coverage for agent/Lens users with missing, blank, foreign and owned sessions, plus shared-workspace aggregation. Verify the live API and empty-conversation UI with two users in an isolated database.
State the nonempty call-ID predicate explicitly so PostgreSQL can use the partial index instead of scanning historical observations. Regenerate sqlc bindings from the query source. Scope, ambiguity, and locking rules are unchanged. Ten samples per case, 142,000-operation isolated fixture: NativeTurnBatch/claude: 77.757ms -> 7.221ms (-90.71%) NativeTurnBatch/codex: 76.588ms -> 7.003ms (-90.86%) 75-observation batches: -64.30% to -64.85% 450-observation batches: -39.99% to -41.81% All native reductions p < 0.001; ordinary app timing unchanged. Validated with full Go race/shuffle tests, golangci-lint, repeatable generation, and manual correlation, concurrency, isolation, 8 MiB payload, and identifier boundary scenarios. The temporary database and DB-dependent harnesses were removed.
Data endpoints only need to verify that the scoped app is available. Use an indexed existence query instead of aggregating its complete history. Keep catalog and graph descriptor loading in their consuming handlers, and return the existing resourceAccess type from authorization. Regenerate sqlc bindings from the query source. 142,000-operation fixture, ten warm samples: Claude availability: 36.945ms -> 0.0215ms (-99.94%) Codex availability: 34.9015ms -> 0.019ms (-99.95%) Actual gateway HTTP comparison, ten warm samples per endpoint: sessions: 66.08ms -> 28.35ms (-57.10%) traces: 95.41ms -> 42.65ms (-55.29%) chart: 73.79ms -> 48.44ms (-34.35%) spans: 53.74ms -> 16.93ms (-68.49%) detail: 61.65ms -> 13.68ms (-77.81%) All reductions p <= 0.005; catalog/graph controls unchanged. Validated identical bodies across all seven endpoints, thirteen source eligibility cases, authorization and membership revocation, workspace/client isolation, and scoped pagination. Gateway race/shuffle tests and lint pass; generation is repeatable. Temporary DB and verification programs removed.
- Add Agentgateway telemetry integration, tracing, and stream error handling - Expose telemetry configuration and publish the Agentgateway image - Update pagination, shutdown, dashboard cleanup, and self-hosting upgrade guidance
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.
This PR lets AgentZ capture app inference and MCP operations, errors, usage, traces, and request metadata.