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

Stats V2: inconsistent return for varying intervals: empty groups #83700

Open
constantinius opened this issue Jan 20, 2025 · 1 comment
Open

Comments

@constantinius
Copy link
Contributor

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

A search query for the outcomes dataset produces varying results depending on the granularity specified by the interval parameter. Here is a request with 1h granularity that has the expected groups property filled.

{
    "start": "2025-01-07T13:00:00Z",
    "end": "2025-01-07T15:00:00Z",
    "intervals": [
        "2025-01-07T13:00:00Z",
        "2025-01-07T14:00:00Z"
    ],
    "groups": [
        {
            "by": {
                "outcome": "accepted",
                "reason": "none"
            },
            "totals": {
                "sum(quantity)": 27231
            },
            "series": {
                "sum(quantity)": [
                    0,
                    27231
                ]
            }
        }
    ]
}

But with a granularity of 1m, the otherwise same request returns an empty groups property:

{
    "start": "2025-01-07T13:35:00Z",
    "end": "2025-01-07T14:01:00Z",
    "intervals": [
        "2025-01-07T13:35:00Z",
        "2025-01-07T13:36:00Z",
        "2025-01-07T13:37:00Z",
        "2025-01-07T13:38:00Z",
        "2025-01-07T13:39:00Z",
        ...
        "2025-01-07T14:00:00Z"
    ],
    "groups": []
}

Expected Result

Responses similar to this with groups:

{
    "start": "2025-01-07T13:00:00Z",
    "end": "2025-01-07T15:00:00Z",
    "intervals": [
        "2025-01-07T13:00:00Z",
        "2025-01-07T14:00:00Z"
    ],
    "groups": [
        {
            "by": {
                "outcome": "accepted",
                "reason": "none"
            },
            "totals": {
                "sum(quantity)": 27231
            },
            "series": {
                "sum(quantity)": [
                    0,
                    27231
                ]
            }
        }
    ]
}```

### Actual Result

Missing groups:

```json
{
    "start": "2025-01-07T13:35:00Z",
    "end": "2025-01-07T14:01:00Z",
    "intervals": [
        "2025-01-07T13:35:00Z",
        "2025-01-07T13:36:00Z",
        "2025-01-07T13:37:00Z",
        "2025-01-07T13:38:00Z",
        "2025-01-07T13:39:00Z",
        ...
        "2025-01-07T14:00:00Z"
    ],
    "groups": []
}

Product Area

Stats

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link
Contributor

getsantry bot commented Jan 20, 2025

Routing to @getsentry/product-owners-stats for triage ⏲️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants