Skip to content

chore: Test that writing an event keeps its trace context. - #414

Merged
goloroden merged 1 commit into
mainfrom
test-trace-context
Oct 7, 2026
Merged

goloroden merged 1 commit into
mainfrom
test-trace-context

Conversation

@goloroden

Copy link
Copy Markdown
Member

The client already sends the trace context of an event as traceparent and tracestate, the names the server expects. So far, though, no test wrote an event with a trace context. The Go client sent traceParent and traceState, which the server rejects, and nothing noticed it (fixed in thenativeweb/eventsourcingdb-client-golang#191).

What changes:

  • A new test, "writes the trace context of an event", writes an event with traceparent and tracestate, and checks both on the written event and on the event read back.
  • The client itself does not change.

Tests: With the keys sent as traceParent and traceState, the new test fails, since the server answers with 400. With the client as it is, npm run qa (75 tests) and the build are green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz

The client already sends the trace context of an event as traceparent
and tracestate, the names the server expects. No test wrote an event
with a trace context, though, so sending other names, as the Go client
did, would have gone unnoticed. The new test writes an event with a
trace context, and checks it on the written event and on the event
read back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz
@goloroden
goloroden requested a review from a team as a code owner October 7, 2026 14:12
@goloroden goloroden self-assigned this Oct 7, 2026
@goloroden
goloroden merged commit 8a47277 into main Oct 7, 2026
2 checks passed
@goloroden
goloroden deleted the test-trace-context branch October 7, 2026 15:31
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