Repository navigation
Route AEM telemetry by domestic/intl site - #349
Merged
Merged
Conversation
After rebasing onto first-install ReportedEvent unions, site routing tests must use asCommand before buildRemoteAemOptions.
hopelynd
force-pushed
the
feat/telemetry-region-endpoint
branch
from
November 26, 2026 02:50
eeffcc5 to
3dfe17b
Compare
Resolve the conflict in packages/core/src/telemetry/sink.ts between PR #348 (await in-flight local JSONL writes) and PR #349 (per-site Tracker map): - Keep both state holders: inflightLocalWrites (from #348) and remoteBySite (from #349). Drop remoteClient / remoteInitialized, which initRemoteForSite() fully replaced and nothing references. - flushTelemetry() drains _sendAll() on every site tracker, then waits on local writes and remote sends under the same budget; only remote work is abortable on timeout. - Merge both doc-comment variants into one accurate description. Verified: vp check (0 errors), 101 core telemetry tests, 65 runtime flush/exit/telemetry-stage tests.
PR #349 replaced the single global remoteSendEvent with a per-site Tracker map (entry.sendEvent), but two lines in the checklist and the first-install call chain still named the removed symbol. They described a symbol that no longer exists, so a reader following the "no await before enqueue" rule could not locate it.
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.
Summary
gm.mmstat.com, pidbailian-cli-node) or Singapore (sg.mmstat.com/aes.1.1, pidbailian-cli-node-intl) by declared auth domainconsoleSite, apiKey/openapi via model-domain host/region (includingcn-hongkongas international), andauth: noneas an OR of bothDescription
Command telemetry previously always reported to the domestic Aplus endpoint. This change adds site resolution in
telemetryStageafter command execution, so the sink can open a keyed Tracker per site.Model hosts and workspace regions are centralized in
model-endpoints.ts(shared with API-key login candidates).Client.url()/ upload default-base callbacks recordlastResolvedOriginfor decision/prime-style overrides; most traffic still falls back toclient.baseUrl. Events carrysiteand optionalsiteReasonin both local JSONL and AEMext. Unknown or custom hosts default to domestic.