Skip to content

Protobuf-free OTLP/JSON metric exporter #111

Closed

Description

@ltowarek

Parent

Part of #102

What to build

An OTLP/JSON metric exporter that maps from the SDK metric data straight to tokens and never references protobuf, reusing the resource, scope and attribute mapping established for traces.

Target: opentelemetry-cpp fork, branch otlp-json-no-protobuf.

Metrics do not go through a recordable; they convert from the SDK metric data model directly. Sums, gauges, histograms and exponential histograms each need their JSON shape, and integer data points must be emitted as decimal strings.

Acceptance criteria

  • A metric exporter produces OTLP/JSON without referencing protobuf
  • Sum, gauge, histogram and exponential histogram point types are covered
  • Integer data points and nanosecond timestamps are emitted as decimal strings
  • An equivalence test asserts byte-identical JSON against the protobuf path
  • Resource, scope and attribute mapping is shared with traces, not duplicated
  • The exporter builds with the nlohmann backend excluded

Blocked by

Activity

  1. ltowarek commented on Sep 11, 2026

    @ltowarek
    OwnerAuthor

    Implemented in ltowarek/opentelemetry-cpp@dcae47269dc3cbd91fea366f550b4517edb550b6 ("Export traces, metrics and logs as OTLP/JSON without protobuf", branch otlp-json-no-protobuf), alongside #110 and #112. The metric exporter covers sum, gauge, histogram and exponential histogram point types, reusing the trace exporter's resource/scope/attribute mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions