getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.63k stars 4.14k forks source link

[API] statsPeriod parameter not respected in list project's issues endpoint #75802

Open rodolfoBee opened 1 month ago

rodolfoBee commented 1 month ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. List all issues in a project using this endpoint: https://docs.sentry.io/api/events/list-a-projects-issues/

Expected Result

When omiting statsPeriod the response will show stats for the organisation's retention as detailed in the documentation:

An optional stat period (can be one of "24h", "14d", and ""). If not provided, the API will return the max time period for the project (90 days for paid accounts, 30 days for free).

GET https://sentry.io/api/0/projects/dev-curumas/notjava/issues/

"id": "5686141479",
....
"stats": {
   "90d": [
...
    ]
}

Actual Result

The endpoint returns 24h stats instead of 90d as described in the documentation. For example: GET https://sentry.io/api/0/projects/dev-curumas/notjava/issues/

"id": "5686141479",
....
"stats": {
   "24h": [
...
    ]
}

Setting it to 14d returns the expected information: GET https://sentry.io/api/0/projects/dev-curumas/notjava/issues/?statsPeriod=14d

"id": "5686141479",
....
"stats": {
   "14d": [
...
    ]
}

Product Area

APIs

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 1 month ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 month ago

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