Skip to content

PRW2 accepts empty metrics instead of rejecting them #7043

@roidelapluie

Description

@roidelapluie

Describe the bug
When using PRW2, it is possible to write a metric without labels, or at least, cortex does not return a 4xx error.

To Reproduce
Steps to reproduce the behavior:

  1. Start Cortex 0e9721f
  2. Send a metric without labels (part of Add remote write 2 receivers compliance tests prometheus/compliance#182)

Expected behavior

Prometheus returns 400
"invalid metric name or labels, got {}\n"

Cortex returns 200.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThese are great first issues. If you are looking for a place to start, start here!type/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions