Skip to content

Commit 2bab5fb

Browse files
fix(telemetry): drop profile field [skip-runtime-e2e] (#170)
* fix(telemetry): drop profile field — collides with governance env var The v1 telemetry schema added a `profile` payload field sourced from `AXONFLOW_PROFILE`. That env var was already in use for governance enforcement (allowlist `dev|default|strict|compliance`, ADR-036), and the v1 telemetry validator only accepted `dev|prod|unknown` — so any customer setting `AXONFLOW_PROFILE=strict` or `=compliance` for governance had their telemetry pings rejected with HTTP 400. Drop the field entirely. The `deployment_mode` dimension already carries the topology signal `profile` was meant to add, and `AXONFLOW_PROFILE` reverts to its single governance-only purpose. - Remove env-var read + payload field + doc comment in TelemetryReporter. - Tests: assert `profile` is ABSENT on the wire (stronger than the previous `equals("unknown")` assertions; actively guards against the field re-appearing). - Bump pom.xml + the two example poms to 8.0.1. - CHANGELOG entry under [8.0.1]. Refs: #2033 Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com> * chore: retrigger CI after [skip-runtime-e2e] title update Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com> --------- Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
1 parent f27c26b commit 2bab5fb

6 files changed

Lines changed: 18 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to the AxonFlow Java SDK will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [8.0.1] - 2026-05-08 — Drop telemetry `profile` field
9+
10+
### Removed
11+
12+
- **Telemetry `profile` field** — collided with existing governance
13+
`AXONFLOW_PROFILE` env var (allowlist `dev|default|strict|compliance`).
14+
The v1 telemetry validator only accepted `dev|prod|unknown`, so any
15+
customer setting `AXONFLOW_PROFILE=strict` or `=compliance` for
16+
governance enforcement would have had their telemetry pings rejected
17+
with HTTP 400. Removing the field reverts `AXONFLOW_PROFILE` to its
18+
single governance purpose. The `deployment_mode` dimension already
19+
carries the topology signal `profile` was meant to add.
20+
821
## [8.0.0] - 2026-05-08 — Decision history API + telemetry simplification
922

1023
**Major release.** The headline feature is the new decision-history client

examples/explain-decision/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.getaxonflow</groupId>
2727
<artifactId>axonflow-sdk</artifactId>
28-
<version>8.0.0</version>
28+
<version>8.0.1</version>
2929
</dependency>
3030
</dependencies>
3131

examples/list-decisions/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<dependency>
2525
<groupId>com.getaxonflow</groupId>
2626
<artifactId>axonflow-sdk</artifactId>
27-
<version>8.0.0</version>
27+
<version>8.0.1</version>
2828
</dependency>
2929
</dependencies>
3030

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.getaxonflow</groupId>
88
<artifactId>axonflow-sdk</artifactId>
9-
<version>8.0.0</version>
9+
<version>8.0.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>AxonFlow Java SDK</name>

src/main/java/com/getaxonflow/sdk/telemetry/TelemetryReporter.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,6 @@ static String buildPayload(
235235

236236
root.put("instance_id", UUID.randomUUID().toString());
237237

238-
// v1 schema profile dimension. Free-form deployment classifier sourced from
239-
// AXONFLOW_PROFILE; "unknown" when unset. Analytics dimension only.
240-
String profileEnv = System.getenv("AXONFLOW_PROFILE");
241-
String profile =
242-
(profileEnv == null || profileEnv.trim().isEmpty()) ? "unknown" : profileEnv.trim();
243-
root.put("profile", profile);
244-
245238
// Stream classifier: sandbox-mode clients self-tag so analytics can distinguish dev/test
246239
// pings from production. Production-mode (and other modes) omit the field entirely so the
247240
// server defaults to "heartbeat" — preserving byte-identical wire shape relative to v7.x

src/test/java/com/getaxonflow/sdk/telemetry/TelemetryReporterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void testPayloadFormat() throws Exception {
7777
assertThat(root.get("runtime_version").asText()).isEqualTo(System.getProperty("java.version"));
7878
// v1 schema: 2-arg buildPayload defaults deployment_mode to "unknown".
7979
assertThat(root.get("deployment_mode").asText()).isEqualTo("unknown");
80-
assertThat(root.get("profile").asText()).isEqualTo("unknown");
80+
assertThat(root.has("profile")).isFalse();
8181
assertThat(root.get("features").isArray()).isTrue();
8282
assertThat(root.get("features").size()).isEqualTo(0);
8383
assertThat(root.get("instance_id").asText()).isNotEmpty();
@@ -164,7 +164,7 @@ void testCustomEndpoint(WireMockRuntimeInfo wmRuntimeInfo) throws Exception {
164164
// v1 schema: deployment_mode classifies from sdk endpoint host; localhost
165165
// resolves to self_hosted (the v1 allowlist removes the production label).
166166
assertThat(body.get("deployment_mode").asText()).isEqualTo("self_hosted");
167-
assertThat(body.get("profile").asText()).isEqualTo("unknown");
167+
assertThat(body.has("profile")).isFalse();
168168
assertThat(body.get("instance_id").asText()).isNotEmpty();
169169
// production-mode payloads still omit stream on the wire.
170170
assertThat(body.has("stream")).isFalse();

0 commit comments

Comments
 (0)