Skip to content

fix(java-core): maintain native Arconia error privacy in shared core - #334

Merged
nik13 merged 6 commits into
devfrom
fix/arconia-shared-java-error-privacy
Nov 4, 2026
Merged

nik13 merged 6 commits into
devfrom
fix/arconia-shared-java-error-privacy

Conversation

@nik13

@nik13 nik13 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep Arconia's native OpenTelemetry route; replace the copied error-redaction implementation with a maintained component in the existing traceai-java-core artifact. There is no new Arconia instrumentation package, provider, exporter or span processor.

  • Add ErrorDetailRedactingSpanExporter for framework-owned SDKs, and an explicitly imported ErrorDetailRedactionConfiguration for Spring-managed exporters.
  • Keep error details private inside the JVM by default: remove exception messages, stack traces and status descriptions, preserving ERROR status, exception type and span metadata. Also remove the same sensitive keys when they appear as span attributes.
  • Preserve FI_EXPORT_ERROR_DETAILS=true, existing TraceAI APIs and the example's old configuration entry point (now a deprecated forwarding import). Do not change FITracer's separate FI_HIDE_ERROR_DETAILS behavior.
  • Spring is a provided compile dependency, not a transitive runtime dependency for non-Spring core users. Existing applications are unchanged unless they import the new policy.
  • Add native Arconia 0.30.0/0.32.0 CI coverage, including a standalone library-import test with no copied helper or component scan.

Reproduction and validation

Baseline: dev 8600a66c1a692f44a9f937640bb4c3ecbd42c98d.

Removing the original copied helper makes the existing OTLP-wire privacy test fail on both Arconia 0.30.0 and 0.31.0: exception message is not exported ==> expected: <false> but was: <true>. Keeping the old helper passes. Deleting the privacy prerequisite without a replacement is therefore not safe.

All runtime tests below ran offline under the supplied macOS sandbox denying outbound network except loopback (Java IPv4 preference enabled for the loopback rule):

  • Full Java reactor mvn verify: passed (182 discovered, 73 passed, 109 credential-gated tests skipped).
  • Java core: 45 tests passed, including 8 new exporter/configuration tests at its OpenTelemetry 1.35.0 API floor.
  • Arconia 0.30.0: 13 tests passed.
  • Arconia 0.31.0: 13 tests passed.
  • Wire checks cover error-message/stack/status removal, raw opt-in, error/type preservation, authentication headers, trace-only routing, resource attributes, one native provider and no duplicate spans.
  • Core release-profile package with sources/Javadocs and signing skipped: passed. No publishing performed.
  • Held documentation Java/Maven snippets compile against the locally built artifact.

No vendor or model API was called. No versions or changelog version sections were manually changed.

Documentation and release sequencing

No docs PR yet. Maven Central currently publishes Java core 1.0.0 without this API. Keep the current privacy prerequisite live until the core change is released. The follow-up guide replaces the copied class with the dependency plus a single @Import, and must use the actual released version before publication. No claim of Spring AI model-tracing compatibility is added; this remains native HTTP tracing.

Scope checks

Open traceAI PRs #204 and #301 and docs PR #989 do not already implement this shared Arconia privacy replacement. Existing in-flight Spring AI work is untouched.

Current-dev follow-up (2026-11-02)

Merged origin/dev normally, preserving both the Arconia core-install and Quarkus native-adapter install steps. Added a CI regression test that failed against dev's one-sided workflow and passes with both. This resolves the review's CI conflict without dropping either prerequisite.

Maven Central now publishes Arconia 0.32.0 (new latest). It fixes the documented http-protobuf spelling that silently disabled export in 0.30.0/0.31.0; the old expectation failed first against 0.32.0, then the version-aware contract and README were corrected. Native Arconia tests passed at the declared floor 0.30.0 and latest 0.32.0 (13 each); merged Java core passed at its OTel 1.35.0 floor and 1.67.0 (56 tests each). Integration planner tests passed (17). All runtime tests used local loopback receivers and an outbound-denying sandbox; no live credentials. Original dev at 12c23513 still leaks error messages if the copied helper is removed: the existing wire test failed with exception message is not exported ==> expected: <false> but was: <true>.

The earlier reproduction and test counts above describe the historical first PR head, not this follow-up head. Public documentation still waits for the shared core API to be released; do not publish the held guide against Maven Central's older artifact.

🤖 Generated with Claude Code

nik13 and others added 2 commits October 31, 2026 05:07
Move the copied exporter filter into the existing Java core artifact with an explicit Spring import. Preserve native SDK ownership, pre-egress error privacy, raw opt-in, and the legacy example entry point. Cover floor/current Arconia OTLP output and core lifecycle contracts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Build the shared privacy dependency from the PR checkout before compiling the standalone Arconia example, rather than resolving an older registry release.

Co-Authored-By: Claude Code <noreply@anthropic.com>
nik13 and others added 4 commits November 2, 2026 17:29
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Add a job-scoped regression contract for both independently added Java CI jobs, covering their matrices, toolchains, test commands, and report uploads.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@nik13
nik13 merged commit d6f3875 into dev Nov 4, 2026
61 checks passed
@nik13
nik13 deleted the fix/arconia-shared-java-error-privacy branch November 4, 2026 20:00
@nik13 nik13 mentioned this pull request Nov 5, 2026
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