fix(telemetry): drop profile field [skip-runtime-e2e]#162
Merged
saurabhjain1592 merged 2 commits intomainfrom May 8, 2026
Merged
fix(telemetry): drop profile field [skip-runtime-e2e]#162saurabhjain1592 merged 2 commits intomainfrom
saurabhjain1592 merged 2 commits intomainfrom
Conversation
The v8.0.0 telemetry payload added a `profile` field sourced from AXONFLOW_PROFILE, but that env var was already used by the agent for governance enforcement (platform/agent/profile.go EnvProfile, allowlist dev|default|strict|compliance per ADR-036). A customer with `AXONFLOW_PROFILE=strict` (a perfectly valid governance config) would have produced HTTP 400 silent drops on the heartbeat path because the v1 telemetry validator only accepts dev|prod|unknown. Drop the field rather than rename it: there are zero analytics consumers of `profile` in production today, and `deployment_mode` (self_hosted | community_saas | unknown) covers the topology dimension the field was intended to add. Renaming would force a 9-repo coordination on a value-allowlist split that nothing reads. This reverts only the profile portion of #161 (15a448e); deployment_mode, endpoint_type, telemetry_type discriminator, and stream tag are left intact. Refs #2033. Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
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
Drops the v1 telemetry
profilefield that was added in v8.0.0 (#161 / commit 15a448e). TheAXONFLOW_PROFILEenv var was already in use by the agent for governance enforcement (allowlistdev|default|strict|complianceper ADR-036), so emitting telemetry from a customer's correctly-configured governance profile (e.g.strict) would have produced HTTP 400 silent drops on the heartbeat path — the v1 telemetry validator accepts onlydev|prod|unknown.Refs getaxonflow/axonflow-enterprise#2033.
Why drop instead of rename
AXONFLOW_PROFILEis owned by the governance-enforcement layer (platform/agent/profile.go,EnvProfile = "AXONFLOW_PROFILE") and has been since ADR-036. The v1 telemetry schema (#2004) picked the same name without grepping; the values do not overlap (strict|compliancevsdev|prod|unknown), so any customer who set the env var for governance would have started emitting 400-rejected pings.platform/,ee/, and the analytics workflows forProfile.S | .Profile\b | profile.*dimension(excluding_test.goand the checkpoint-service) returns nothing — no aggregator, no daily-report dimension, no dashboard reads the field. Removing it loses no signal in use today.deployment_modealready covers the topology dimension the field was meant to add:self_hosted | community_saas | unknown, single canonical form, no env-var collision, has analytics callers. Untouched by this PR.Renaming would force a 9-repo coordinated bump just to allowlist-split a value nothing currently reads. Drop is the cleanest fix.
Validator-vs-caller audit
Verified zero
AXONFLOW_PROFILE/Profilereferences remain across the 4 changed files.find . -name 'baseline*'returnedtestdata/wire_shape_baseline.json—grep -i 'profile'against it: empty.Hunk-by-hunk self-review (HARD RULE #1)
For each of the 4 hunks, the 5-question protocol from
feedback_self_review_is_mandatory_every_pr.md:Hunk 1 —
telemetry.gostruct field removal (3 lines doc + 1 line field).Profilefield fromtelemetryPayload.grepconfirms no — the only callers were the assignment site (Hunk 3) and tests (Hunks 5-6).json.Unmarshalsemantics; no client crashes from old-server-vs-new-client. Reverse direction (new server, old client emittingprofile) is also fine — server will validate-and-drop or accept under the JSON unmarshaller.Hunk 2 —
telemetry.goos.Getenv("AXONFLOW_PROFILE")read removal (8 lines).profilelocal var was used only in Hunk 3.stringsstill used (TrimPrefix on runtime.Version, EqualFold + TrimSpace + ToLower elsewhere);osstill used (Getenv for AXONFLOW_TELEMETRY etc). No orphan imports —go buildconfirms.TestSendTelemetryPing_Success+TestBuildPayloaddeployment_mode + stream subtests still run.Hunk 3 —
telemetry.gopayload literalProfile: profileremoval (1 line).go build ./...passes.go test ./...passes 7.6s.grep -rn 'telemetryPayload{' --include='*.go'returns just this one (and tests that decode into the struct).Hunk 4 —
telemetry_test.goremoval ofreceived.Profileassertion inTestSendTelemetryPing_Success(3 lines).TestSendTelemetryPing_Successretains assertions on TelemetryType, DeploymentMode, OS, Arch, RuntimeVersion, Features, InstanceID. Coverage of the heartbeat happy-path remains.t.Setenvsetup.Hunks 5-6 —
telemetry_test.goremoval oft.Run("profile from AXONFLOW_PROFILE; unknown when unset", ...)subtest (33 lines).TestBuildPayloadretains itsdeployment_mode classifies from endpoint hostandstream=sandbox tag emitted only for sandbox modesubtests; both run independently of the dropped subtest.go test -c ./...passes.t.Setenv(per-subtest scoped); no fixture cleanup needed.stream=sandbox) is indented correctly.Test results
All green. Wire-shape baseline (
testdata/wire_shape_baseline.json) had noprofilereference, so no baseline refresh needed.Migration notes
AXONFLOW_PROFILEfor governance enforcement on the agent (the original ADR-036 use case): no change. The env var is read by the agent for that purpose unchanged.AXONFLOW_PROFILEsolely to influence telemetry: no longer needed — the SDK no longer reads it for telemetry. Telemetry's topology dimension lives ondeployment_mode(auto-derived from endpoint host).DO NOT TAG / PUBLISH
This is part of a coordinated train (9 client PRs + server PR per the session-2033 brief). Tagging is operator-gated and happens only after the full train merges. Do not tag
v8.0.1from this PR.Test plan
go build ./...go vet ./...go test ./...— all greengrep -rn 'AXONFLOW_PROFILE\|Profile\b' --include='*.go' .— zero hitsstaging-checkpoint.getaxonflow.com(cross-train step, not gated by this PR alone)Skip-runtime-e2e justification
This PR is part of the #2033 coordinated train across 1 server + 9 client repos. Per the session-2033 brief, runtime proof is deferred to the post-server-merge staging-checkpoint deploy:
axonflow-enterprise#2035(server) merges +gh workflow run deploy-checkpoint.yml -f environment=stagingdeploys the new code tostaging-checkpoint.getaxonflow.com.profile) and (b) the resulting DDB row has noprofileattribute.runtime-e2e/profile_field_removal/EVIDENCE/<utc-ts>/post-deploy.Adding a same-PR
runtime-e2e/test here would either:lint-no-mocks-in-runtime-e2e.sh), orThe post-deploy proof against staging-checkpoint is the only meaningful runtime test for this train.