Skip to content

feat(external-apps): telemetry using agentgateway - #131

Merged
murtaza-u merged 20 commits into
mainfrom
feat/agentgateway-telemetry
Oct 19, 2026
Merged

murtaza-u merged 20 commits into
mainfrom
feat/agentgateway-telemetry

Conversation

@murtaza-u

@murtaza-u murtaza-u commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

This PR lets AgentZ capture app inference and MCP operations, errors, usage, traces, and request metadata.

Murtaza Udaipurwala 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
@murtaza-u murtaza-u changed the title Add AgentGateway app telemetry and delegated route readiness feat(external-apps): telemetry using agentgateway Oct 15, 2026
Murtaza Udaipurwala and others added 14 commits October 15, 2026 16:43
- 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
@murtaza-u murtaza-u self-assigned this Oct 19, 2026
@murtaza-u
murtaza-u merged commit 438c3a4 into main Oct 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant