Skip to content

Wrong calculation for rate() function in instant queries #5372

@ruslan-mikhailov

Description

@ruslan-mikhailov

Describe the bug
rate() function does not calculate correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Run example/docker-compose/local
  2. Wait until some traces are consumed
  3. Pick a time window. Let it be 1 hour (3600 seconds)
  4. Run instant query {} | rate()
  5. Run instant query {} | count_over_time() with the same time range as in 4.

Expected behavior

Result from 4. is the same as from 5. divided by 3600

Actual results: x8-10 times bigger

Environment:

  • Reproducible with docker compose

Additional Context

Metadata

Metadata

Assignees

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