Milestone 4 (Part 1): Implementing OTLP HTTP Core in Heka Insights Agent (M4-1, M4-2)
Heka Insights Agent already had a canonical metrics pipeline from Milestone 3.
In this part of Milestone 4, I implemented the OTLP HTTP core in two focused steps:
M4-1 : Canonical metrics -> OTLP payload mapping layer
M4-2 : OTLP HTTP request sender and exporter wiring
This post covers only these two items. Auth headers, resource attributes, retry/compression controls are intentionally deferred to later M4 tasks.
Why This Split Matters
By separating mapping from transport, we get:
stable internal metric model
explicit OTLP payload construction
transport logic that can evolve independently
clean foundation for New Relic/Datadog-style OTLP integrations later
What Was Implemented
M4-1: OTLP Payload Mapping Layer
I added a dedicated mapper that converts canonical metric records into OTLP HTTP JSON payloads.
Core behavior:
validates required canonical fields before send
supports explicit type mapping:
gauge ->…