Skip to content

agentconfig-mcp: add shared LPC operation telemetry (main-ca) - #437

Open
Asher Johnson Hogan (asherjh) wants to merge 5 commits into
main-cafrom
users/asherj/adk-core-lpc-observability-main-ca
Open

Asher Johnson Hogan (asherjh) wants to merge 5 commits into
main-cafrom
users/asherj/adk-core-lpc-observability-main-ca

Conversation

@asherjh

Copy link
Copy Markdown
Contributor

Description

Add shared LPC operation telemetry for main-ca.

This is the CA mirror of agentconfig-mcp: add shared LPC operation telemetry (#436). It cherry-picks only that implementation onto the current main-ca base and leaves the primary PR and its main target unchanged.

  • Add optional schema-1.8 server and usage fields to the existing adk.api.call event, preserving existing callers' field shape and error semantics when metadata is not supplied.
  • Observe all ten LPC business tools through native FastMCP's public call boundary, with one canonical terminal event covering validation, handler execution, returned tool errors, output conversion, unknown tools, exceptions, and cancellation.
  • Isolate authenticated tenant attribution, annotations, monotonic timing, and operation IDs per request. Record actual HTTP attempts/replays, single-flight refresh attempts, retry exhaustion, observed statuses, and confirmed writes without changing core HTTP/auth/idempotency behavior.
  • Keep usage content-free: recognized section-presence flags, actual discovery/configuration/draft counts, and code-owned widget values. Missing or malformed shapes omit counts; explicit empty lists retain zero. No arbitrary configuration keys, content, search terms, URLs, backend messages, exception text, or personal identifiers enter these server records.
  • Preserve the app-only schema-v2 LPC client bridge, its parameters and accepted/rejected verdict, and its exclusion from business-call records.
  • Document canonical cohorts, active installations rather than unique people, separate client/server populations, redelivery deduplication, and missing-completion/delivery limitations.

CA compatibility and conflict resolution

  • Preserve CA's existing onboarding capability, capability taxonomy, connector support, agent-type derivation, and common identity/version fields. Structural comparison against the CA base verifies all existing SDK functions are unchanged except the intended emit_api_call extension, and existing assignments are unchanged except SCHEMA_VERSION.
  • Use the shared optional MCP schema 1.8 while retaining CA's schema history and updating its two existing version assertions. No unrelated main-only lifecycle emitter or capability is imported.
  • Resolve documentation/query insertion conflicts by adding only the LPC content. Main-only Workday lifecycle documentation and queries remain absent from CA.
  • The LPC/core implementation and protocols require no CA-specific behavioral changes. The mirror covers the same 14 files: six source files, five test files, and three documentation/query files.

Org Announcements integration remains separate. No Org Announcements source, Graph client, manifests, visual surfaces, or monitor configuration are changed. Shared HTTP hooks remain no-ops outside an observed operation; there are no new event families, per-attempt streams, or distributed tracing framework.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactor / cleanup

Testing

Validation was run against this main-ca worktree, not inferred from the primary PR:

  • 582 passed, 22 expected skips on Python 3.14.5 with native MCP 1.29.0. Skips are live-backend tests and one POSIX-only permission test.
  • Coverage includes all ten LPC tools, native in-memory MCP protocol dispatch, pre-handler validation, output conversion, cancellation/exception propagation, legacy emitter compatibility, concurrent identity/counter isolation, single-flight and failed refresh accounting, non-idempotent retry behavior, privacy fixtures, opt-out, and stable operation IDs through buffered redelivery.
  • Repository pre-commit run passed with pinned Ruff 0.16.0. Full source/changed-test lint, source syntax compilation, conflict-marker checks, and git diff --check passed.
  • All 11 changed Python files parse with Python 3.11 grammar. CA's CI uses Python 3.11 and the project supports Python >=3.11; the local Python 3.11 test invocation could not run because that interpreter is not installed. Grammar compatibility is not claimed as runtime validation, and remote CI results remain pending.

Combined test command, from the repository root:

python -m pytest tests/test_adk_telemetry.py tests/test_adk_mcp_report_client_events.py tests/mcp/agentconfig tests/mcp/agentconfig_core tests/scripts/test_mcp_config.py tests/scripts/test_setup_preserves_title_id.py tests/scripts/test_validate_branding.py -q --tb=short

No real backend or collector was used. KQL examples were reviewed locally, not executed against live production. Org integration is not exercised here. Asynchronous completion records and accepted bridge batches do not guarantee collector delivery or establish process availability.

Checklist

  • My code follows the existing style
  • I have added/updated tests where applicable
  • I have updated documentation as needed

Measure landing-page tool reliability and usage with one content-free completion record while keeping shared HTTP behavior and existing telemetry callers compatible. Make the core instrumentation opt-in so Org Announcements can integrate separately.

- Add optional MCP and usage fields to the existing API-call event schema.
- Observe all ten LPC tools with request-local identity, timing, and HTTP summaries.
- Preserve the app-only schema-v2 client bridge and exclude it from business records.
- Add native protocol, privacy, concurrency, retry, and compatibility regressions.
- Document canonical cohorts, installation metrics, and delivery limitations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fe7b727c-3609-48cc-8c27-becc4fd98998
(cherry picked from commit cd8c3e2)
Internal telemetry analysis belongs in private repositories. The existing public disclosure covers the collection categories used by this instrumentation.

- Restore the existing README and telemetry investigation guide.
- Restore the existing KQL queries.
- Preserve the shared SDK/core/LPC instrumentation and tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fe7b727c-3609-48cc-8c27-becc4fd98998
Link each widget invocation and every backend HTTP attempt without conflating retries or concurrent calls. Keep telemetry content-free while preserving existing transport behavior and schema-v2 bridge compatibility.

- Accept validated root/request correlation metadata with independent server execution IDs.
- Emit distinct HTTP attempt IDs and records across retries and 401 refresh replays.
- Return LPC correlation metadata and project optional client bridge correlation IDs.
- Cover native MCP, concurrency, error/cancellation, opt-out, and buffered redelivery.
- Preserve legacy telemetry field shapes and branch-specific SDK behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fe7b727c-3609-48cc-8c27-becc4fd98998
…/asherj/adk-core-lpc-observability-main-ca

# Conflicts:
#	solutions/ess-maker-skills/src/mcp/agentconfig_landing_page/server.py

Co-authored-by: asherjh <100732777+asherjh@users.noreply.github.com>
Canonical lowercase identifiers keep request metadata and client telemetry joinable when callers supply uppercase UUIDs.

- Normalize validated incoming MCP correlation and client request IDs.
- Normalize the three optional client correlation fields while preserving malformed-field omission and legacy operation ID validation.
- Cover uppercase metadata through native MCP execution and client telemetry ingestion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fe7b727c-3609-48cc-8c27-becc4fd98998
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.

3 participants