adk-telemetry: attribute Connect + FlightCheck by connector (ADO 7943641) - #344
Conversation
…641) Adds a bounded `connector` dimension to every Connect capability and FlightCheck event so PMs can report Workday vs ServiceNow adoption and reliability separately instead of a single generic `connect` wedge. Taxonomy: workday | servicenow | legacy | unknown | ` (empty = not connector-scoped). CLI: `python scripts/emit_capability.py connect --connector <workday|servicenow>`. FlightCheck derives it on-emit from scope (run) and category prefix (check); `full` scope + cross-cutting categories emit empty and per-check attribution provides the split. Schema bumps: adk_telemetry 1.3.0 -> 1.4.0, flightcheck 1.1 -> 1.2. Docs: adds telemetry_queries.kql section 9 with connector-split adoption / reliability queries. No dashboard work in this PR (per PM ask; can wire tiles once the dim lands in Kusto). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
The shim now always passes `connector=<value>` alongside `block=True` when it invokes `emit_capability_use` (ADO 7943641). The pre-existing test's monkey-patched lambda signature `(capability, block)` was missing the `connector` param, so the kwarg raised TypeError inside the shim's blanket `except Exception` -> the emit was silently swallowed and `emitted` stayed empty.
Update the lambda to accept `connector` and assert the empty-connector round-trip (`('setup', '', True)`). Add a companion test that exercises the flag-forwarding case (`--worker connect --connector workday`) -> `('connect', 'workday', True)` to lock down the parent-shim -> subprocess argv attribution round-trip.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
|
Local review findings (full first-pass threshold):
Targeted telemetry tests passed locally: 224 passed. The branch also merged cleanly with the current target. Open sibling conflicts appear to be merge-order coordination rather than additional defects. |
1. CLI runtime forwards connector to ADK emitters Both --scope and --checkpoint code paths in flightcheck/cli.py now derive the connector (from scope / from first result category) and pass it to emit_flightcheck_run/emit_flightcheck_result. Previously the ADK adk.flightcheck.* event family emitted empty connector for real runs even though standalone helper tests exercised the kwarg. 2. _WORKDAY_SCOPES covers workdayda and topics SCOPE_MAP defines both as Workday-only (workdayda -> Workday DA, topics -> Workday Topics). Left out of the frozenset earlier, so runs on those scopes emitted connector=''. 3. KQL 9a uses tenant_id (not tenantId) for adk_capability_use ADK snake_case dim; tenantId belongs to the legacy ESSMakerKit event shape and would silently return 0 tenants for ADK cubes. 4. Rollout query 9d is null-safe and separates 'unknown' Handles pre-1.4.0 events where the column is absent (isnull) plus 1.4.0+ events with connector='' (isempty). 'unknown' now reports separately instead of folding into 'attributed'. 5. Parent-path connector forwarding is directly asserted Two new tests in tests/scripts/test_emit_capability.py assert the Popen argv includes '--connector <value>' for both '--connector v' and '--connector=v' input forms, and omits it entirely when no flag is supplied (so worker parsing sees the correct default). New tests: * test_capability_emit_parent_forwards_connector_argv * test_capability_emit_parent_omits_connector_when_not_supplied * TestCheckpointAdkConnector (3 tests: workday / servicenow / cross-cutting) * test_derive_connector_from_scope_known: added workdayda + topics + case/whitespace variants Full run: 1408 passed (test_adk_telemetry + flightcheck/). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
|
Re-reviewed the latest update. The five previously reported findings are addressed: production callers now forward connector attribution, all Workday scopes are covered, the ADK tenant field is corrected, rollout buckets handle missing and unknown values, and the detached parent path is tested. The branch currently conflicts with updated Follow-up: single-checkpoint attribution currently derives from the first result row; prerequisite-failure sentinels can therefore leave an otherwise connector-specific run unattributed. This does not need to hold this PR. 266 targeted tests passed locally. |
nkemms
left a comment
There was a problem hiding this comment.
Reviewed the latest update; the reported findings are addressed. Remaining target-branch reconciliation and attribution edge are documented as follow-up.
…ry-connector-attribution # Conflicts: # solutions/ess-maker-skills/scripts/adk_telemetry.py # solutions/ess-maker-skills/scripts/flightcheck/telemetry.py
|
Thanks — merge conflicts against
Schema versions bumped:
Version-gate tests updated. 244 targeted tests pass locally ( Follow-up on single-checkpoint prerequisite-failure attribution acknowledged and tracked; keeping it out of this PR per your note. |
nkemms
left a comment
There was a problem hiding this comment.
Re-approved after the latest main merge. The conflict resolution preserves connector attribution and the existing toolkit Git dimensions; focused validation passed.
Summary
Adds a bounded
connectordimension to every Connect capability event and every FlightCheck event so PMs can report Workday vs ServiceNow adoption and reliability separately, instead of one genericconnectwedge.Closes ADO 7943641.
Taxonomy
connector ∈ { "workday", "servicenow", "legacy", "unknown", "" }workday/servicenowlegacyconnectevents surfaced retroactivelyunknown""(empty)Wiring
Connect (
emit_capability.pyshim): new--connector <workday|servicenow|legacy>flag; parsed positional-free (before or after the capability,=form also supported). Applied to worker mode, sync mode, and the detached subprocess round-trip. Skill wiring moved fromconnect/SKILL.md's top-of-file (which fired before the maker picked WD vs SN) intoconnect/step1.md§1.3 branches so the attribution is known when the emit fires.FlightCheck (derived on-emit):
derive_connector_from_scope(scope)—workday*/servicenowscopes attribute;fulland cross-cutting scopes emit empty (per-check attribution provides the finer split).derive_connector_from_category(category)— prefix-match onWorkday*/ServiceNow*; cross-cutting categories (Environment, Authentication, Prerequisites, etc.) emit empty.Schema version bumps
adk_telemetry.SCHEMA_VERSION1.3.0→1.4.0flightcheck.telemetry.TELEMETRY_SCHEMA_VERSION1.1→1.2Additive change — old cubes / queries continue to work; the new dim simply appears with empty values for events that pre-date the merge.
Dashboards
None in this PR (per PM ask). Once events land in Kusto with the new dim, we can add per-connector tiles to the FlightCheck + ADK Aria dashboards without a code change.
Docs
scripts/telemetry_queries.kql§9: connector-split adoption + reliability queries (Connect starts by connector, FlightCheck runs & per-check reliability, legacy → attributed rollout tracker).emit_capability.py --helpdocuments the new flag.Tests
38 new assertions across
tests/test_adk_telemetry.pyandtests/flightcheck/test_telemetry.py:normalize_connectortaxonomy (known / empty / legacy / unknown / case+whitespace).emit_capability_use,emit_flightcheck_run/result/error).--connectorplumbing (positional-before, positional-after,=form, dangling flag, worker mode round-trip, no-flag → empty).step*.md(not justSKILL.md) so deferred emits like the new connect wiring stay visible to the dead-capability guard.Full suite (
tests/test_adk_telemetry.py + tests/flightcheck/test_telemetry.py): 224 passed.Not in scope
emit_api_callconnector stamping — not in the AC. Some API calls are Workday/ServiceNow-specific; happy to do a follow-up if PM wants Connect-flow API attribution too.main-cacherry-pick of this change to keep CA-mode kits attribution-consistent.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864