Skip to content

Trace ingest through outbox, Kafka, and worker - #29

Merged
o-mid merged 5 commits into
developfrom
feat/otel-credit-path
Sep 19, 2026
Merged

o-mid merged 5 commits into
developfrom
feat/otel-credit-path

Conversation

@o-mid

@o-mid o-mid commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Problem

HMAC ingest, outbox, Kafka, and the worker tx were separate logs. A hiring manager could not follow one event with a trace id.

Solution

OpenTelemetry spans on ingest, outbox publish, Kafka consume, and worker handle. The same trace id is stored on the event, sent as a Kafka header, and returned as X-Trace-Id. Span attributes are event_id and tenant_id only. Spans go to stdout only when OTEL_TRACES=stdout.

How to test

go test ./internal/tracing ./internal/api/httpapi -count=1 -run 'TestSetup|TestContextWith|TestIngestReturnsTraceID'
Ingest a signed event and read X-Trace-Id.

@vercel

vercel Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
engagepulse Ready Ready Preview Sep 19, 2026 6:14am UTC

@o-mid
o-mid merged commit adbd257 into develop Sep 19, 2026
4 checks passed
@o-mid
o-mid deleted the feat/otel-credit-path branch September 19, 2026 06:16

This branch was successfully deployed

1 active deployment
Preview — 38a61e6b Deployed Sep 19, 2026 by vercel[bot]
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