Correlation id
A correlation ID is an identifier associated with related requests, operations, messages, or records so their activity can be linked across system components.
Grokking Software Architecture
An identifier shared across related operations, messages, or log records so their activity can be traced across components.
- How it is used
- Links asynchronous operations and distributed logs so a request can be followed across services.
- How deep it goes
- Explains ID generation and propagation, while deferring instrumentation mechanics such as baggage propagation and spans.
- Examples
- Uses an order-to-shipping failure and an asynchronous comment-processing exercise with matching producer and consumer IDs.
- What you can do after
- Diagnose distributed failures by following a shared ID through related logs and service handoffs.
Read how Grokking Software Architecture explains correlation id →
Spring Microservices in Action
An identifier that associates spans and events belonging to the same distributed trace.
- How it is used
- Links log entries and service calls to debug transactions across distributed microservices.
- How deep it goes
- Explains trace and span fields, manual propagation, Sleuth automation, log searches, and a messaging propagation limitation.
- Examples
- Follows a licensing-to-organization request and an organization deletion that publishes a Kafka message.
- What you can do after
- Diagnose distributed transactions by searching trace IDs in Papertrail and inspecting service flows in Zipkin.
Read how Spring Microservices in Action explains correlation id →
Secure APIs
A trace ID is an identifier shared by telemetry records belonging to the same request execution or distributed processing path.
- How it is used
- Correlates telemetry from one API request for observability, debugging, and cybersecurity investigation.
- How deep it goes
- Explains request and distributed-service correlation, then demonstrates shared context in OpenTelemetry span logs and custom spans.
- Examples
- Uses GET /books span logs, distributed quote processing, and a POST /carts custom span with user and cart attributes.
- What you can do after
- Diagnose and debug requests with OpenTelemetry by searching a trace ID and creating correlated custom spans.
Go by Example
A trace ID is an identifier that correlates processing and log records belonging to the same request or distributed operation.
- How it is used
- Correlates HTTP request logs by propagating one request-scoped identifier through Context.
- How deep it goes
- Explains generation, Context storage, middleware propagation, and slog.Handler record enrichment, while deferring robust UUID generation.
- Examples
- Demonstrates a traceid package, HTTP middleware, LogHandler wrapper, and /health request logs carrying trace_id.
- What you can do after
- Apply it via net/http middleware and log/slog handlers to emit correlated request logs automatically.
gRPC Microservices in Go
A trace ID is an identifier that correlates all operations belonging to one distributed request.
- How it is used
- Groups activity from one distributed request so operators can inspect cross-service logs and request latency.
- How deep it goes
- Shows how to inject trace and span IDs into Go logs; mentions event correlation without implementing event propagation.
- Examples
- Uses an order-creation log entry and payment-command events with a reply channel.
- What you can do after
- Apply it via logrus and OpenTelemetry context to tag logs with identifiers for filtering one operation.
Designing AI Systems
A correlation ID is an identifier carried across related records or service calls so they can be associated with the same request or operation.
- How it is used
- Correlates telemetry from multiple services so operators can reconstruct and investigate one request end to end.
- How deep it goes
- Defines shared trace IDs and shows their use in spans and logs, without specifying a propagation protocol.
- Examples
- Uses a multi-service patient request and provider-fallback log events to illustrate trace correlation.
- What you can do after
- Diagnose/debug with it by retrieving logs across services for a trace and locating problematic spans.
Kafka for Architects
A correlation ID is an identifier carried with related request and response messages so they can be matched.
- How it is used
- Matches requests with replies in request-response messaging across Kafka and RabbitMQ.
- How deep it goes
- Defines header-based matching and explains response-routing and lost-context problems, without detailing a complete recovery implementation.
- Examples
- Uses a CORRELATION_ID header in Kafka services and matching IDs on RabbitMQ request-reply queues.
- What you can do after
- Understand how a shared identifier pairs a reply with its request and why routing it to the originating service instance matters.
Cloud Observability in Action
A trace identifier is the identifier shared by spans belonging to one distributed request trace.
- How it is used
- Uses a shared request identifier to correlate spans, metrics, and logs during distributed-service investigation.
- How deep it goes
- Defines propagation and correlation, but defers detailed span-emission implementation.
- Examples
- Demonstrates metric exemplars linking to Jaeger traces during an error-rate investigation.
- What you can do after
- Diagnose distributed failures by navigating from a metric exemplar to traces and associated logs.
Read how Cloud Observability in Action explains correlation id →
Also covered in
- Troubleshooting Java, Second Edition
- Microservices Patterns, Second EditionIn early access (MEAP)
- Effective Platform Engineering
- Clean Applications with Hexagonal ArchitectureIn early access (MEAP)
- Quarkus in Action
- Latency
What to know first
- distributed systemA distributed system is a computing system whose components run across multiple networked processes or machines and coordinate through communication.
- microservice architectureMicroservice architecture is a software architectural style that structures an application as independently deployable services, typically organized around focused capabilities and communicating through defined interfaces.
- gRPCgRPC is an open-source remote procedure call framework for defining services and invoking them across process or network boundaries, commonly using Protocol Buffers and HTTP/2.
- observabilityObservability is the ability to infer a system’s internal state and behavior from its externally available outputs, such as logs, metrics, and traces.
Related concepts
- HTTP headeruses · An HTTP header is a named field in an HTTP message that carries metadata or control information about the message, its content, or its processing.
- Spring Cloud Sleuthused by · Spring Cloud Sleuth is a library that instruments Spring applications to generate distributed-tracing information.
- trajectoryused by · A trajectory is an ordered record of states, actions, events, or operations showing how an agent or system progresses through an execution or process.
- distributed tracing systemused by · A distributed tracing system is software that records and correlates an operation’s execution across distributed components, including its path and timing.
- log aggregationused by · Log aggregation is the collection and consolidation of log records from multiple sources into a common destination for storage, search, or analysis.
Questions about correlation id
What is correlation id?
A correlation ID is an identifier associated with related requests, operations, messages, or records so their activity can be linked across system components.
Which Manning books explain correlation id?
Grokking Software Architecture, Spring Microservices in Action, Secure APIs, Go by Example, gRPC Microservices in Go, Designing AI Systems, Kafka for Architects and Cloud Observability in Action.
What should I know before learning correlation id?
Manning books that teach correlation id usually introduce distributed system, microservice architecture, gRPC and observability first.
What is correlation id also called?
Correlation id is also called trace id, trace IDs or correlation IDs.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.







