Commit 725dc9a
authored
feat: version discovery, User-Agent, trace_id, ToolContext, telemetry (#102)
* feat: version discovery, User-Agent fix, capability detection
- Add SDK_VERSION constant (3.8.0) in AxonFlowConfig
- Fix default User-Agent from axonflow-java-sdk/1.0.0 to axonflow-sdk-java/3.8.0
- Extend HealthStatus with capabilities and sdkCompatibility fields
- Add PlatformCapability and SDKCompatibility types
- Add hasCapability() method on HealthStatus
- Log warning when SDK version is below platform min_sdk_version
- Update tests for new HealthStatus constructor
* docs: add v3.8.0 changelog entry
* fix: use semantic version comparison for mismatch warning
* feat: add trace_id and ToolContext to workflow types
* fix: address code review findings
P1: Add backward-compatible constructor overloads for HealthStatus (4-arg)
and workflow types (CreateWorkflowRequest, CreateWorkflowResponse,
StepGateRequest, WorkflowStatusResponse, ListWorkflowsOptions) to avoid
breaking callers that don't use new traceId/toolContext parameters.
P1: Make capabilities list immutable and never-null in HealthStatus
constructor. Add null guard to hasCapability() to prevent NPE.
P2: Make PlatformCapability and SDKCompatibility final. Add
equals/hashCode/toString to both. Update HealthStatus
equals/hashCode/toString to include capabilities and sdkCompatibility.
P2: Strip pre-release suffixes in compareSemver before parsing to handle
versions like "3.8.0-beta.1" correctly.
Changelog: Add traceId, ToolContext, and toolContext entries to [3.8.0].
* feat: add anonymous runtime telemetry
Fire-and-forget checkpoint ping on client init with SDK version, OS,
arch, runtime version, deployment mode, and enabled features. Off by
default for community/sandbox, on for production. Opt out via
AXONFLOW_TELEMETRY=off or DO_NOT_TRACK=1.
* fix: telemetry defaults OFF for self-hosted (no credentials)
Production mode without credentials (community/self-hosted) now defaults
telemetry to OFF, matching Go/TypeScript SDKs and documented policy.
* test: align telemetry tests with canonical 24-test matrix
Add unique instance_id, config disable integration, timeout handling,
non-200 response, AXONFLOW_TELEMETRY integration, and enterprise mode
payload verification tests.
* fix(telemetry): fix docs URL to docs.getaxonflow.com
* feat(telemetry): default ON for all modes except sandbox
Remove credential-based default logic. Telemetry is now ON by default
for all modes except sandbox. Opt out via DO_NOT_TRACK=1,
AXONFLOW_TELEMETRY=off, or telemetry config flag.
* fix(telemetry): trim whitespace on env vars per TELEMETRY_CONTRACT
Align with cross-SDK contract: trim DO_NOT_TRACK and AXONFLOW_TELEMETRY
before comparison so "1 " and " off" are handled correctly.
* fix: set v3.8.0 release date, add telemetry first-run notice1 parent 641638d commit 725dc9a
13 files changed
Lines changed: 1144 additions & 37 deletions
File tree
- src
- main/java/com/getaxonflow/sdk
- telemetry
- types
- workflow
- test/java/com/getaxonflow/sdk
- telemetry
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
8 | 32 | | |
9 | 33 | | |
10 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
579 | 585 | | |
580 | 586 | | |
581 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| |||
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
152 | 198 | | |
153 | 199 | | |
154 | 200 | | |
| |||
206 | 252 | | |
207 | 253 | | |
208 | 254 | | |
209 | | - | |
| 255 | + | |
210 | 256 | | |
211 | 257 | | |
212 | 258 | | |
213 | 259 | | |
214 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
215 | 270 | | |
216 | 271 | | |
217 | 272 | | |
| |||
265 | 320 | | |
266 | 321 | | |
267 | 322 | | |
268 | | - | |
| 323 | + | |
269 | 324 | | |
270 | 325 | | |
271 | 326 | | |
| |||
4303 | 4358 | | |
4304 | 4359 | | |
4305 | 4360 | | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
4306 | 4364 | | |
4307 | 4365 | | |
4308 | 4366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | | - | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
211 | 228 | | |
212 | 229 | | |
213 | 230 | | |
| |||
254 | 271 | | |
255 | 272 | | |
256 | 273 | | |
| 274 | + | |
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| |||
386 | 404 | | |
387 | 405 | | |
388 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
389 | 424 | | |
390 | 425 | | |
391 | 426 | | |
| |||
0 commit comments