Skip to content

Make OtlpMetricsSender.Request#toString human-readable #7264

Description

@jonatan-ivanov

The toString output of OtlpMetricsSender.Request is not very useful right now if someone is interested in the "body" of the request:


��
l
%
�telemetry.sdk.name��
io.micrometer
 
�telemetry.sdk.language��
�java
!
service.name��
�unknown_service�3�1
test.counter:!
����q��F����d͑�F��!�������?����"

It should be human readable, something like this instead:

resource_metrics {
  resource {
    attributes {
      key: "telemetry.sdk.name"
      value {
        string_value: "io.micrometer"
      }
    }
    attributes {
      key: "telemetry.sdk.language"
      value {
        string_value: "java"
      }
    }
    attributes {
      key: "service.name"
      value {
        string_value: "unknown_service"
      }
    }
  }
  scope_metrics {
    metrics {
      name: "test.counter"
      sum {
        data_points {
          start_time_unix_nano: 1773087915274000000
          time_unix_nano: 1773087915280000000
          as_double: 1.0
        }
        aggregation_temporality: AGGREGATION_TEMPORALITY_CUMULATIVE
        is_monotonic: true
      }
    }
  }
}

Activity

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

    enhancementA general enhancementregistry: otlpOpenTelemetry Protocol (OTLP) registry-related

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions