JITSU-138: fix Datadog reserved-status collision; synthesize otlp message lines - #1475
Conversation
…age lines for otlp records Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed the OTLP body-presentation changes in otlp.go and the new coverage in otlp_test.go. I left inline comments for a few correctness/regression risks worth clarifying: unconditional status remapping on generic OTLP payloads, message: null bypassing synthesis, and potential overwrite when record_status already exists.
…nation stays payload-agnostic Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed the producer-side adaptation changes in and , plus their new tests. I focused on correctness, regressions, and user-visible behavior (status remapping/message synthesis scope and eventId/billing implications). I didn’t find actionable bugs or security issues in this diff.
There was a problem hiding this comment.
Reviewed producer-side adaptation changes in bulker/eventslog/kafka_events_log.go and services/rotor/src/lib/kafka-events-store.ts, plus the added tests. I focused on correctness, regressions, and user-visible behavior (status remapping/message synthesis scope and eventId/billing implications). I did not find actionable bugs or security issues in this diff.
There was a problem hiding this comment.
Reviewed the changes in bulker/eventslog and services/rotor for correctness, regressions, and security impact.
I focused on the producer-side body adaptation (status→record_status, synthesized message) and dead-letter message synthesis/truncation behavior. I did not find actionable bugs or user-visible regressions in this patch.
Sanity check: go test ./eventslog passes in bulker/.
Follow-up to
JITSU-138, from end-to-end testing against Datadog's agentless OTLP intake (which merges the structured body's top-level keys into root log attributes).Architecture (reworked per review): the otlp destination stays fully payload-agnostic —
otlp.gois untouched relative tonewjitsu. Body adaptation happens where envelopes are produced to the Kafka topic, and only for bodies the pipeline constructs itself:eventslog/kafka_events_log.go), forbulker_batch/bulker_streamrecords (bulker-builtbulker.State/ stream-status shapes):status→record_status:COMPLETED/FAILEDvalues collide with Datadog's reserved status attribute and made every record render ascriticalregardless of severity (reproduced in isolation with controlled probe payloads)messagewhen absent/empty/null:bulker_batch COMPLETED: 2 rows → events39, with a rune-safe-truncated error preview on failureskafka-events-store.ts): dead-letter bodies (rotor-built{payload, error}) get theirmessageline at construction.Function-log bodies are user data and are never touched — no key renames, no synthesized fields.
Body stays structured (kvlist) — no stringification. Covered by
TestKafkaEventsLogAdaptsOwnedBodies(rename, synthesis, truncation, function-body-untouched) and rotordeadLetterMessagetests (incl. surrogate-pair safety).Docs note: jitsucom/websites#60.
🤖 Generated with Claude Code