Skip to content

PromQL: Multiplication by 1 creates additional floating point errors (but should be a no-op) #14052

@gabrieljones

Description

@gabrieljones

What did you do?

grafana PromQL:

sum by (le) (increase(ingress_timer_millis_bucket[$__interval]) * on (job, instance) group_left target_info)

What did you expect to see?

The same PromQL response as

sum by (le) (increase(ingress_timer_millis_bucket[$__interval]))
image

What did you see instead? Under which circumstances?

with the group_left join in place tiny non zeros are sprinkled throughout the buckets at random differing with each repeated request of the same query
image
image

System information

No response

Prometheus version

prometheus_build_info{
  branch="HEAD", 
  goarch="amd64", 
  goos="linux", 
  goversion="go1.21.6", 
  instance="0.0.0.0:8080", 
  revision="43e14844a33b65e2a396e3944272af8b3a494071", 
  tags="netgo,builtinassets,stringlabels", 
  version="2.49.1"
}

Prometheus configuration file

No response

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions