Skip to content

fix: telemetry fixes, auditToolCall method#111

Merged
saurabhjain1592 merged 13 commits into
mainfrom
fix/telemetry-version-detection
Mar 14, 2026
Merged

fix: telemetry fixes, auditToolCall method#111
saurabhjain1592 merged 13 commits into
mainfrom
fix/telemetry-version-detection

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Summary

  • Telemetry fixes: Replace hardcoded "4.0.0" fallback with "unknown", guard compareSemver against unknown version, add amd64 to x64 arch normalization, use try-with-resources for InputStream
  • auditToolCall (#1260): Add auditToolCall() and auditToolCallAsync() methods with AuditToolCallRequest/AuditToolCallResponse types

Test plan

  • mvn test passes (1030 tests)
  • New types accessible: AuditToolCallRequest.builder().toolName("x").build()
  • CI green

…on in telemetry

- Read SDK_VERSION from Maven pom.properties at runtime instead of
  hardcoded constant to prevent version drift between pom.xml and
  telemetry payload
- Detect platform version by calling /health endpoint before sending
  telemetry ping (2s timeout, silent failure)
Map 'Mac OS X' -> 'darwin', 'aarch64' -> 'arm64' for consistency
across SDKs.
Avoids manual drift risk when the version bumps but the fallback
string is forgotten. pom.properties and manifest should always
resolve in packaged JARs.
…e try-with-resources

- Skip version compatibility warning when SDK_VERSION is "unknown"
  (prevents spurious warnings when running from source/IDE)
- Add amd64 -> x64 mapping in normalizeArch for Linux consistency
- Use try-with-resources for InputStream in detectSdkVersion
When the SDK endpoint is localhost, 127.0.0.1, or [::1], telemetry
pings are now suppressed unless telemetryEnabled is explicitly set
to true. Prevents telemetry leaks during local development.

Updated 4 tests to pass telemetryEnabled=true for WireMock
localhost endpoints.
@saurabhjain1592 saurabhjain1592 merged commit debd0e3 into main Mar 14, 2026
9 checks passed
@saurabhjain1592 saurabhjain1592 deleted the fix/telemetry-version-detection branch April 7, 2026 10:36
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