Google Play Developer Reporting API를 사용하면 측정항목 세트에서 감지된 이상치를 가져올 수 있습니다. 이상치는 측정항목 값이 이전 28일 동안의 동일한 측정항목 값을 기반으로 한 측정항목의 예상 범위를 초과할 때마다 생성됩니다. 연속된 날짜의 이상치는 단일 이상치 결과로 병합됩니다.
측정항목 값이 비정상적으로 증가하는 현상이 충분히 오래 지속되면 감지 모델이 적응하여 후속 데이터 포인트가 더 이상 비정상으로 간주되지 않을 때까지 예상 값을 넓힙니다.
이상치 가져오기
anomalies.list 메서드를 사용하여 이상치를 나열할 수 있습니다.
간단한 요청:
이 HTTP GET
요청은 애플리케이션 이름 매개변수를 지정하고 애플리케이션에 대해 감지된 전체 비정상 목록을 반환합니다.
GET https://playdeveloperreporting.googleapis.com/v1beta1/apps/com.example.app/anomalies
이상치 응답:
대답에는 이상이 발생한 위치를 정확하게 쿼리할 수 있는 충분한 정보가 포함됩니다.
{ "anomalies": [ { "name": "apps/com.example.app/anomalies/12345" "metric_set": "apps/com.example.app/anrRateMetricSet" "timeline_spec": { "aggregation_period": "DAILY" "start_time": { "year": 2022 "month": 1 "day": 23 "time_zone": { "id": "America/Los_Angeles" } } "end_time": { "year": 2022 "month": 1 "day": 23 "time_zone": { "id": "America/Los_Angeles" } } } "metric": { "metric": "anrRate", "decimal_value": { "value": "3.1415926535" } } }, { "name": "apps/com.example.app/anomalies/12345" "metric_set": "apps/com.example.app/crashRateMetricSet" "timeline_spec": { "aggregation_period": "DAILY" "start_time": { "year": 2021 "month": 12 "day": 10 "time_zone": { "id": "America/Los_Angeles" } } "end_time": { "year": 2021 "month": 12 "day": 10 "time_zone": { "id": "America/Los_Angeles" } } } "metric": { "metric": "crashRate", "decimal_value": { "value": "2.7182818284" } } }, ] }
필터링된 요청:
특정 기간에 활성화된 이상치만 반환하도록 필터를 적용할 수 있습니다. 이렇게 하려면 요청의 필터 필드에 activeBetween(start, end)
함수를 지정합니다. 특수 키워드 UNBOUNDED
를 사용하여 범위의 양쪽 끝에 무한 한도를 지정할 수 있습니다. 시작 또는 종료 경계를 지정하는 경우 RFC 3339 형식(예: 2022-02-22T04:00Z
)을 따라야 합니다.
GET https://playdeveloperreporting.googleapis.com/v1beta1/apps/com.example.app/anomalies?filter=activeBetween("2022-01-01T00:00:00Z", UNBOUNDED)
필터링된 응답:
응답에는 지정된 기간에 활성 상태였던 비정상치만 포함됩니다.
{ "anomalies": [ { "name": "apps/com.example.app/anomalies/12345" "metric_set": "apps/com.example.app/anrRateMetricSet" "timeline_spec": { "aggregation_period": "DAILY" "start_time": { "year": 2022 "month": 1 "day": 23 "time_zone": { "id": "America/Los_Angeles" } } "end_time": { "year": 2022 "month": 1 "day": 23 "time_zone": { "id": "America/Los_Angeles" } } } "metric": { "metric": "anrRate", "decimal_value": { "value": "3.1415926535" } } }, ] }
사용 가능한 측정항목
현재 일부 측정항목 및 측정항목 세트에서는 이상치 감지가 지원되지 않습니다. 현재 지원되는 측정항목 목록은 다음과 같습니다.
측정항목 세트 | 지원되는 측정항목 |
---|---|
vitals.anrrate |
anrRate |
vitals.crashrate |
crashRate |
vitals.excessivewakeuprate |
excessiveWakeupRate |
vitals.stuckbackgroundwakelockrate |
stuckBgWakelockRate |