Skip to content

v0.5.0 — decode Logs OTLP protobuf into JSON

Choose a tag to compare

@fr0ster fr0ster released this 26 May 11:31
· 3 commits to main since this release
8e7881f

The Cloud ALM Logs API always returns an OpenTelemetry application/x-protobuf body — the format query param and Accept header are both ignored, so there is no JSON mode on the wire. This release makes calm_logs_get usable.

Added

  • calm_logs_get decodes OTLP → canonical JSON under records ({ resourceLogs: [{ resource, scopeLogs: [{ scope, logRecords }] }] }), via an embedded minimal OTLP schema + protobufjs. Verified live on eu10-004: real ABAP Application Log records (service.name=E19.100, sap.exm.* attributes) decode correctly.
  • raw: true — returns the undecoded protobuf as a base64 string (encoding: "base64").

Changed

  • Connection returns a Buffer for binary responses. AbstractCalmConnection previously read every body via response.text(), mangling protobuf through UTF-8. It now returns raw bytes for non-textual Content-Types; JSON/text/XML parse exactly as before. Response shaping stays in the tool — the client remains transport-only.

Adds protobufjs runtime dependency. No calm-client change. 235 tests green.