Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returned by a data source time series is not filtered by time window #132

Open
vanchaxy opened this issue Oct 5, 2023 · 1 comment
Open

Comments

@vanchaxy
Copy link
Contributor

vanchaxy commented Oct 5, 2023

What happened?

If the data source returns time series outside of the specified window they are still used in the reduce function.

For example, on the screenshot, you can see that all data points in the last 5 minutes are 0 but reduced to max returns 1.

image

Currently, I have this issue with the forked sentry data source because Sentry ignores a specified time window but this could be with any other data source with a similar problem.

What did you expect to happen?

I expect Grafana to use only data points from the selected time window. This is especially confusing because when specifying an alert via provisioning relativeTimeRange is specified under in reduce query but it's completely ignored. E.g.

      - refId: B
        datasourceUid: "__expr__"
        model:
          refId: B
          type: reduce
          datasource:
            uid: "-100"
            type: __expr__
          expression: A
          reducer: max
          relativeTimeRange: # doesn't matter, all range from A is using
            from: 900
            to: 0

Did this work before?

No idea, I noticed it only now

How do we reproduce it?

  1. Use a data source that returns time series outside selected window
  2. Use any min/max reduce function

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: 10.1.2

Grafana platform?

Kubernetes

Datasource(s)?

No response

@armandgrillet
Copy link

This is expected behavior, the datasource (in this case Sentry's which seems owned by Grafana Labs) needs to fix it.

@bossinc bossinc transferred this issue from grafana/grafana Nov 14, 2023
@bossinc bossinc changed the title Alerting: returned by a data source time series is not filtered by time window Returned by a data source time series is not filtered by time window Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants