Skip to content

feat(telemetry): emit v1 schema fields [skip-runtime-e2e]#188

Merged
saurabhjain1592 merged 4 commits intomainfrom
feat/v1-telemetry-fields
May 8, 2026
Merged

feat(telemetry): emit v1 schema fields [skip-runtime-e2e]#188
saurabhjain1592 merged 4 commits intomainfrom
feat/v1-telemetry-fields

Conversation

@saurabhjain1592
Copy link
Copy Markdown
Member

@saurabhjain1592 saurabhjain1592 commented May 8, 2026

Summary

Closes the #2007 contract (axonflow-enterprise) on top of v8.0. v8.0 shipped telemetry_enabled removal + stream classifier; this patch adds the three remaining v1 schema fields. Additive on the v8.0 line — no version bump.

Wire shape

Field Behavior
telemetry_type hardcoded "sdk"
profile from AXONFLOW_PROFILE env, "unknown" when unset
deployment_mode self_hosted | community_saas | unknown via _classify_deployment_mode (host + AXONFLOW_TRY=1 override)
_classify_endpoint drops "community-saas" — topology lives on deployment_mode in v1

Definition of Done

1. Tested

  • pytest tests/test_telemetry.py tests/test_telemetry_endpoint_type.py38 passed.
  • New cases in TestBuildPayload cover deployment_mode propagation + AXONFLOW_PROFILE permutations. test_payload_posted_correctly + test_sandbox_mode_fires_with_stream_tag updated to assert deployment_mode=self_hosted (endpoint-derived) and telemetry_type=sdk.

2. Deep self-reviewed

Hunk-by-hunk per the 5-question protocol: classifier docs updated, payload struct gains 3 fields, call site passes the new deployment_mode arg, _classify_endpoint doc points at the v8 removal of "community-saas". CHANGELOG addition kept to 2 bullets / 5 lines at end of v8.0 entry.

3. Runtime-proven

The existing tests/heartbeat-real-stack/ cross-platform CI workflow drives AxonFlow() against a Python fake checkpoint server, captures the actual ping payload, and runs Ubuntu / macOS / Windows. The new fields ship in that same payload and will be observable in the wire capture.

Linked

  • axonflow-enterprise#2007 — SDK telemetry consolidation umbrella
  • axonflow-sdk-go#161 — sibling Go SDK PR (same patch shape)

Skip-runtime-e2e justification

The v1 schema fields (telemetry_type, profile, deployment_mode) are additive payload extensions that flow through the existing telemetry code path. The pre-existing runtime-e2e/sandbox_telemetry_stream_tag/ test already exercises that code path end-to-end against the deployed checkpoint Lambda, so the new fields will be observable on the wire when that test runs against a v8.0+ Lambda. Adding a near-duplicate runtime-e2e/ wrapper would not increase coverage.

Cross-SDK runtime parity is also validated via the heartbeat-real-stack pattern that the SDK ships in tests/heartbeat-real-stack/ and that CI runs on every PR.

…oyment_mode)

Closes the #2007 contract (axonflow-enterprise) on top of v8.0. v8.0
shipped TelemetryEnabled removal + the stream classifier; this patch
adds the three remaining v1 schema fields. Additive on the v8.0 line —
no version bump.

- telemetry_type: "sdk" discriminator field on every payload.
- profile: from AXONFLOW_PROFILE env var, "unknown" when unset.
- deployment_mode: aligned to v1 allowlist self_hosted | community_saas
  | unknown via the new _classify_deployment_mode (endpoint host +
  AXONFLOW_TRY=1 override). The prior config.Mode-based dimension is
  removed — deployment_mode now reflects topology only.
- _classify_endpoint: drops the legacy "community-saas" return; topology
  lives on deployment_mode in v1.

Tests: TestBuildPayload + TestSendTelemetryPing cases updated for the
endpoint-derived deployment_mode + profile env. 38 tests green.

Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
Three deployment_mode propagation assertions exceeded the 100-char line limit; refactored to bind locals first then assert.

Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
@saurabhjain1592 saurabhjain1592 changed the title feat(telemetry): emit v1 schema fields (#2007 contract) feat(telemetry): emit v1 schema fields [skip-runtime-e2e] May 8, 2026
Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
…[skip-runtime-e2e]

Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
@saurabhjain1592 saurabhjain1592 merged commit 993f913 into main May 8, 2026
21 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.

1 participant