Skip to content

feat: correlation id and trace context on consumer failure warning - #2142

Merged
octonato merged 2 commits into
mainfrom
consumer-failure-correlation
Nov 16, 2026
Merged

octonato merged 2 commits into
mainfrom
consumer-failure-correlation

Conversation

@johanandren

@johanandren johanandren commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Refs lightbend/akka-runtime#5996. Based on #2138, merge that first. Needs the runtime change in lightbend/akka-runtime#5997.

When a consumer fails, the runtime reports AK-00433 ("Eventing in consumer [X] is failing, will be retried"), which the SDK logs. That log had no correlationID and no trace context, so it could not be linked to the SDK error log for the same failure.

Changes

  • ConsumerImpl passes the correlation ID that it logged the error with to the runtime, in SpiConsumer.Error.
  • SdkRunner.logReportedError logs errors reported by the runtime with the correlation ID in the MDC and the telemetry context current. The JSON log then has correlationID and the trace context fields, the same as the consumer's own error log.

Before merge

Bump AkkaRuntimeVersion to a runtime version that includes the runtime change.

@johanandren
johanandren added this pull request to stack #2143 October 27, 2026 12:34
@johanandren
johanandren force-pushed the consumer-failure-correlation branch from 9b642fc to c77848f Compare November 13, 2026 12:51
@johanandren
johanandren marked this pull request as ready for review November 13, 2026 12:51
@johanandren
johanandren force-pushed the consumer-failure-correlation branch 2 times, most recently from a823798 to 535e8c1 Compare November 13, 2026 14:43
@github-actions github-actions Bot added the documentation documentation related label Nov 13, 2026
@johanandren
johanandren force-pushed the consumer-failure-correlation branch 2 times, most recently from 32d7792 to 2aa539f Compare November 13, 2026 15:28
Base automatically changed from log-trace-context to main November 13, 2026 15:42
@johanandren
johanandren force-pushed the consumer-failure-correlation branch from 2aa539f to 8a75f8d Compare November 13, 2026 15:48
@octonato
octonato merged commit 4c8b44a into main Nov 16, 2026
34 checks passed
@octonato
octonato deleted the consumer-failure-correlation branch November 16, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants