Skip to content

Classify partner and Contoso test tenants as internal telemetry - #458

Merged
amilandi merged 3 commits into
mainfrom
amilandin/classify-additional-test-tenants
Oct 27, 2026
Merged

amilandi merged 3 commits into
mainfrom
amilandin/classify-additional-test-tenants

Conversation

@amilandi

Copy link
Copy Markdown
Contributor

Summary

Classify six known test/demo tenancies as internal instead of customer using the existing shared tenant-ID allow-list:

Test tenancy Tenant ID
CoPilot partner test 142b48c2-943c-4d07-ad6b-b0eb5cd0e5f2
M365E5 partner test 440d6412-bc8e-49a0-9913-9f8be786b89e
Office365E5 self-service test 4636dd08-fdd9-4610-a443-762fb320fb4e
CONTOSOTPM test 6936469c-696e-4fe2-a0c8-dd16f54b1b45
Contoso demo 4345eb96-df8a-464a-9eb8-72253571a621
Contoso demo 2d5577b0-a83c-436c-9582-1c3bcd2ab0d3

The first three previously excluded IDs and the three newly identified IDs were not in the emitter allow-list. Tenant names were verified through Microsoft Graph. Classification uses explicit GUIDs, not display-name matching, so blank names are handled without broadly reclassifying customers.

Telemetry impact

Both FlightCheck (tenantClass) and ADK platform (tenant_class) use this shared classifier. Updated clones will emit these test tenants as internal. No new schema, dimensions, events, or cube changes. Historical data and older clones remain unchanged, so tenant-ID chart exclusions are still needed.

Validation

293 tests passed across tests/test_adk_telemetry.py and tests/flightcheck/test_telemetry.py. Added parameterized coverage for all six IDs, case/whitespace normalization, and ADK common-dimension classification with no environment override. Ruff and whitespace checks pass.

Avery Milandin and others added 2 commits October 23, 2026 11:00
Add six verified test tenant IDs to the shared FlightCheck/ADK allow-list. Preserve exact-ID classification, cover both event families, and document historical dashboard exclusions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864

@daeunJe0ng Dawn Jeong (daeunJe0ng) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[copilot-review] Approved the code change at dea75f3. Both FlightCheck and ADK telemetry use the shared exact-ID classifier, and the added tests cover all six tenants and normalization. Historical events and older clones still need dashboard exclusions, as documented.

One non-blocking question: could you link the evidence that these six tenants are internal/test-only? Graph display names alone do not establish ownership; a mistaken entry would exclude real customer activity from customer counts.

Static review only; I did not run tests or query the tenants live. Hosted checks passed.

@nkemms nkemms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation and targeted validation look sound overall (293 passed; Ruff clean), but one classification-contract issue should be resolved before merge.

Request changes

  1. internal no longer matches its documented meaning. flightcheck/telemetry.py currently describes the allow-list as Microsoft-owned internal tenancy, while this change adds partner and self-service test tenants. Since tenantClass controls exclusion from customer metrics, please either confirm and document that internal means all known non-customer test/demo tenancy, or introduce a distinct classification. The module comment, _internal_tenant_ids docstring, and TELEMETRY.md should agree on the contract and provenance of these IDs.

Non-blocking follow-ups

  • TELEMETRY.md correctly notes that historical events require tenant-ID exclusions, but the bundled telemetry_queries.kql customer queries do not contain those exclusions. Please add a shared exclusion list or link to the maintained external dashboard configuration.
  • The six GUIDs are duplicated as anonymous literals in production and tests, unlike the existing named tenant constants. Named constants or a shared tuple would prevent drift and make failures readable.
  • test_external_usage_test_tenants_are_internal_in_both_emitters exercises the shared classifier and ADK dimensions, but not a FlightCheck event payload. Either add one direct build_events assertion or rename the test to match its actual coverage.

There is also a same-location documentation conflict with open PR #449. Please coordinate merge order and preserve both sections when rebasing.

Document the internal bucket contract and provenance, centralize the known test tenant IDs, add historical KQL exclusions, and verify both telemetry payload families.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 95071db8-bd9f-4036-b163-165d5a3dcf09
@amilandi

Copy link
Copy Markdown
Contributor Author

Addressed the review in 267f1935.

  • Clarified that internal is the historical reporting bucket for known non-customer traffic, not a claim that every allow-listed tenant is Microsoft-owned. The module comment, _internal_tenant_ids docstring, and TELEMETRY.md now use the same contract.
  • Recorded the provenance for these six IDs: production external-usage investigation, tenant-name resolution through Microsoft Graph, followed by the telemetry maintainer's explicit decision to classify them as test/demo traffic and exclude them from customer dashboards. PR Classify partner and Contoso test tenants as internal telemetry #458 is the durable change record for that decision.
  • Replaced anonymous GUID literals with named constants and a shared KNOWN_NON_CUSTOMER_TEST_TENANT_IDS tuple used by production code and tests.
  • Added direct build_events assertions covering FlightCheck run/check payloads for all six tenants.
  • Added the canonical historical-data exclusion list to telemetry_queries.kql, applied it to customer-only queries, and added a drift test tying the query pack to the production tuple.

Validation: 300 passed; Ruff and git diff --check clean.

PR #449 is still open, so the same-location TELEMETRY.md section will need to preserve both changes when the second PR rebases.

@daeunJe0ng Dawn Jeong (daeunJe0ng) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[copilot-review] Approved at 267f193. The shared classifier, documented non-customer reporting contract, and added coverage address the previous feedback. One non-blocking historical-query correction is noted inline.

Static review only. All nine hosted checks passed; I did not run local tests or verify live tenant data or deployed dashboards.

@amilandi
amilandi merged commit c64a8ad into main Oct 27, 2026
9 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.

3 participants