Skip to content

Metrics are not grouped by type #8407

Closed

Description

@marksilcox

Describe the bug
When calling the metrics endpoint I would expect them to be grouped by type. However, some metrics are grouped under the incorrect type header

To Reproduce
Steps to reproduce the behavior:

  1. Run Pulsar v2.6.0
  2. Fire some messages to topics
  3. Access metrics endpoint
  4. See error

Expected behavior
All metrics are grouped appropriately.

Screenshots
image

Desktop (please complete the following information):

  • OS: Docker on MacOS, Amazon Linux on AWS

Activity

  1. added
    type/bug
    on Oct 29, 2020
  2. codelipenghui commented on Nov 2, 2020

    @codelipenghui
    Contributor

    @marksilcox The broker just expose the Prometheus formatted metrics, if you want to do some aggregate calculations, it's better to achieve at the Prometheus.

  3. marksilcox commented on Nov 2, 2020

    @marksilcox
    ContributorAuthor

    @codelipenghui I am not wanting to aggregate. As you can see from the screenshot, some metrics are not being grouped under their # TYPE header. See # TYPE pulsar_msg_backlog gauge header, under that I can see 9 other metrics not related to that header. This happens in a few other places and metrics are scattered across the output.

    Prometheus docs states "All lines for a given metric must be provided as one single group" - https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#grouping-and-sorting

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

    lifecycle/staletype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions