telemetry: classify Contoso, Crontoso Inc, and EmployeeHub as internal tenants - #252
Open
amilandi wants to merge 2 commits into
Open
telemetry: classify Contoso, Crontoso Inc, and EmployeeHub as internal tenants#252amilandi wants to merge 2 commits into
amilandi wants to merge 2 commits into
Conversation
…l tenants Analysis of the customer-attribution dashboard (post-PR #242) surfaced twointernal ESS dogfood/demo tenancies that were still resolving as customer: - Contoso (tenant_id ed667978-98e2-41a3-ad41-bafc8f728f02)- Crontoso, Inc (tenant_id 99f9fd00-6145-4c3e-b3ba-d4c7e59470d8) Both are team-owned test tenants -- their traffic was polluting the Externalcustomer bucket on the Capability Usage and FlightCheck dashboards andinflating apparent customer volume. Adds both plus the previously known EmployeeHub dogfood tenant(935884d7-bdee-469b-a461-fcc530a3ac83, called out in PR #242's attributioncomment) to _HARDCODED_INTERNAL_TENANT_IDS in flightcheck/telemetry.py.The env-var extension mechanism (ESS_ADK_INTERNAL_TENANTS) is retained; thehardcoded list is now the well-known long-lived set. Historical events already emitted with tenant_class=customer are unaffected;the Aria dashboards get a supplementary chart-level tenant_id exclusion tocover the pre-fix window. Regression test: test_classify_tenant_hardcoded_internal_dogfood_tenantsclears the parse cache and asserts each of the three new hardcoded IDsclassifies as internal without the env var, and is case/whitespace insensitive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
Adds the Cocreate test tenancy (8d36aacf-bbb3-4388-ac14-8844210f377b, devtestcocreate0630.onmicrosoft.com) to the hardcoded internal-tenant frozenset. Aria external dashboards already have this GUID in their per-tile tenant Id notIn filter (applied via REST alongside this commit). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70ddf006-7f8d-48e7-9afa-3fbae73b3864
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.
Two ESS-internal dogfood/demo tenancies were resolving as
customeron the External dashboards, inflating apparent customer volume on the Capability Usage and FlightCheck charts.The customer-attribution analysis from the last review pass (PR #242 follow-up) surfaced these tenant names via the
/organizationand/me?$select=companyNamelookups:Contosoed667978-98e2-41a3-ad41-bafc8f728f02Crontoso, Inc99f9fd00-6145-4c3e-b3ba-d4c7e59470d8Both are team-owned test tenants. Also promotes
EmployeeHub(935884d7-bdee-469b-a461-fcc530a3ac83, the tenant called out in PR #242's attribution comment) from an env-var override to the hardcoded list so it doesn't rely on a runtime setting for its correct classification.Changes
solutions/ess-maker-skills/scripts/flightcheck/telemetry.py_HARDCODED_INTERNAL_TENANT_IDS(frozenset) as the source of well-known internal tenancy classification, seeded with Microsoft Corp + EmployeeHub + the two Contoso IDs above. Each ID is a named module constant (EMPLOYEEHUB_TENANT_ID,CONTOSO_INTERNAL_TENANT_ID,CRONTOSO_INTERNAL_TENANT_ID) so analytics tooling and follow-up scripts can enumerate the same set without string duplication._parse_internal_tenant_idsnow unions the hardcoded set with the env-var extension (ESS_ADK_INTERNAL_TENANTS) rather than seeding from the single corp GUID. Env-var behavior is unchanged.tests/test_adk_telemetry.pytest_classify_tenant_hardcoded_internal_dogfood_tenantsclears the_parse_internal_tenant_idscache, unsetsESS_ADK_INTERNAL_TENANTS, and asserts each of the three new hardcoded IDs classifies asinternal(plus case/whitespace insensitivity onCONTOSO_INTERNAL_TENANT_ID).test_classify_tenant_microsoft_corp_is_internal,_env_allowlist_extends,_non_guid_maps_to_unknown) still pass unchanged — the corp tenant remains internal and the env-var extension mechanism is preserved.Historical data
Events already emitted with
tenantClass=customerbefore this change aren't reclassified. To exclude them from the External dashboards for the pre-fix window, I've added a supplementarytenantId not in (…)filter to the affected chart tiles on the Capability Usage and FlightCheck dashboards. That side-fix ships with this PR as a dashboard config update, not a code change.Verification
Full
tests/test_adk_telemetry.pyalso green; no touch to production emit code paths (the frozenset and helper signatures are unchanged for callers).ADO: https://o365exchange.visualstudio.com/O365%20Core/_workitems/edit/7764297