Exhausted property tokens error on GA4 initial run

  • Is this your first time deploying Airbyte?: No
  • OS Version / Instance: amazon-linux-2
  • Memory / Disk: 8GB memory / 200GB disk
  • Deployment: docker
  • Airbyte Version: * 0.40.3
  • Source name/version: Google Analytics Data API
  • Destination name/version: Redshift
  • Step: Creating a new source
  • Step: New Source
  • Description: I recently created a new connection using the Google Analtyics Data API source to pull in our GA4 data. So far all my initial runs have failed and I am seeing an exhausted property token error. I’ve looked through old issues, and any documentation I can find, but can’t figure out the issue. Attached are the logs of my most recent failed run.
    logs-2483.txt (144.5 KB)

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

Hello, thanks for providing logs and a thorough description of the behaviour. Is this still affecting your runs?

It’s odd that this would happen on the initial run as it’s saying that the API token has hit its quota. Could you check whether you’re using the same API token for a different project that’s exhausting the quota?

You can also ask the API to return the current quota status by adding "returnPropertyQuota": true to the request body. There’s a blue “Try it!” button on the top left of this page where you can test this, if you input your request parameters in there including returnPropertyQuota could you let me know what it returns? https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport

@sh4sh After starting another airbyte run we ran this in the request body, we went to Google Analytics Data API (GA4)

In the Request Parameters for property we input (I am being very explicit just to help anyone else in the future trying to figure this out.) ,

properties/<NUMERIC PROPERTY ID>

Here is a working Request Body,

{
  "returnPropertyQuota": true,
  "dateRanges": [
    {
      "startDate": "2022-09-16",
      "endDate": "2022-09-16",
      "name": "blah"
    }
  ],
  "metrics": [
    {
      "name": "conversions",
      "expression": "eventCount",
      "invisible": false
    }
  ]
}

We started hitting the endpoints every few seconds and did see the tokens decrease. After seeing airbytes logs pasted below we still had remaining credits.

2022-09-16 22:03:34 INFO i.a.w.g.DefaultReplicationWorker(lambda$getReplicationRunnable$6):339 - Records read: 1000 (222 KB)
2022-09-16 22:03:45 INFO i.a.w.g.DefaultReplicationWorker(lambda$getReplicationRunnable$6):339 - Records read: 2000 (574 KB)
2022-09-16 22:04:15 INFO i.a.w.g.DefaultReplicationWorker(lambda$getReplicationRunnable$6):339 - Records read: 3000 (938 KB)
2022-09-16 22:04:22 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://analyticsdata.googleapis.com/v1beta/properties/297494425:runReport, Response Code: 429, Response Text: {
  "error": {
    "code": 429,
    "message": "Exhausted property tokens for a project per hour. These quota tokens will return in under an hour. To learn more, see https://developers.google.com/analytics/devguides/reporting/data/v1/quotas",
    "status": "RESOURCE_EXHAUSTED"
  }

This is the API endpoint results after seeing the above error code in the log.

{
  "metricHeaders": [
    {
      "name": "conversions",
      "type": "TYPE_INTEGER"
    }
  ],
  "rows": [
    {
      "metricValues": [
        {
          "value": "5327"
        }
      ]
    }
  ],
  "rowCount": 1,
  "metadata": {
    "currencyCode": "USD",
    "timeZone": "America/New_York"
  },
  "propertyQuota": {
    "tokensPerDay": {
      "consumed": 3,
      "remaining": 23697
    },
    "tokensPerHour": {
      "consumed": 3,
      "remaining": 3697
    },
    "concurrentRequests": {
      "remaining": 10
    },
    "serverErrorsPerProjectPerHour": {
      "remaining": 10
    },
    "potentiallyThresholdedRequestsPerHour": {
      "remaining": 120
    },
    "tokensPerProjectPerHour": {
      "consumed": 3,
      "remaining": 1247
    }
  },
  "kind": "analyticsData#runReport"
}

During the run about 1300ish credits were legitimately used, but there seems to be plenty remaining. We definitely are using the correct property id with airbyte and this quota request.

Hey, just found this: https://issuetracker.google.com/issues/245143800

Could you check in with their team and see if they can tell if you are affected by this issue?

Thank you I will look into it!