Skip to content

[Feature] Correlate Java SDK HTTP requests with server request contextΒ #15900

Closed

Description

@KomachiSion

Is your feature request related to a problem? Please describe.

Java SDK gRPC requests carry a request ID, but SDK HTTP requests do not consistently carry one. The server consequently generates its own HTTP request-context ID, preventing callers and server-side request context from sharing a correlation ID.

Describe the solution you would like

Generate a fresh UUID in Nacos-Request-Id for every SDK HTTP request execution, covering the shared, Config, and Naming HTTP clients and AI requests that reuse them. Keep caller-owned headers, client identity, module metadata, and the legacy RequestId header unchanged.

The server should copy a non-blank Nacos-Request-Id into RequestContext.requestId, retain its generated UUID for missing or blank headers, and clear the context after both successful and failed requests. Existing gRPC behavior and compatibility with older clients and servers should remain intact.

Describe alternatives you have considered

Adding IDs independently in each domain proxy duplicates transport behavior and can miss retry or polling paths. Injecting the header in the SDK HTTP client factories provides common coverage.

Additional context

The ID is correlation metadata, not an authentication credential or an idempotency key. No response echo or new diagnostic endpoint is required. The client transport and server request-context specifications should document the behavior together.

Activity

  1. self-assigned this
    on Oct 10, 2026
  2. added a commit that references this issue on Oct 11, 2026
  3. added this to the 3.3.0 milestone on Oct 12, 2026
  4. added a commit that references this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions