Skip to content

Document which metric name (if any) is retained by comparison operators in different label matching scenarios #15471

@charleskorn

Description

@charleskorn

What did you do?

I ran a query like left_side > on(env) group_right(dc) right_side or left_side > ignoring(pod, region, dc) group_right(dc) right_side with data like the following (in the PromQL test scripting format):

  left_side{env="test", dc="1"}                2 _ _ 5 _
  left_side{env="test", dc="2"}                _ 3 _ _ 6
  right_side{env="test", pod="a", region="au"} 1 2 3 9 10

What did you expect to see?

I expected all returned series to have name left_side.

What did you see instead? Under which circumstances?

All returned series had name right_side.

System information

n/a

Prometheus version

Prometheus 3

Prometheus configuration file

n/a

Alertmanager version

n/a

Alertmanager configuration file

n/a

Logs

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions