Skip to content

fix: OTLP writer stub silently returns success without sending data #602

Description

@kcenon

What

When LOGGER_HAS_OTLP is not defined (default), otlp_writer.cpp export_with_http() builds a complete OTLP JSON payload but returns true without sending it. No warning is logged.

  • LOGGER_ENABLE_OTLP is OFF by default (CMakeLists.txt:59)
  • Callers believe telemetry data is being exported when it is silently discarded

Why

Silent data loss in observability pipelines. Users who configure OTLP export get no indication their logs are not reaching the collector.

How

Technical Approach

Change the stub to return false and emit a one-time stderr warning explaining that OTLP transport is unavailable.

Acceptance Criteria

  • Stub mode returns false instead of true
  • One-time warning printed to stderr on first call
  • Warning message includes build instructions (LOGGER_ENABLE_OTLP=ON)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions