{"id":27788,"library":"gaarf-exporter","title":"gaarf-exporter","description":"A Prometheus exporter for Google Ads API metrics, providing real-time monitoring of advertising accounts. Current version 1.2.1, released on 2025-02-15. Active development with irregular releases.","status":"active","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/felipecamargo/gaarf-exporter","tags":["google-ads","prometheus","exporter","monitoring","ads"],"install":[{"cmd":"pip install gaarf-exporter","lang":"bash","label":"Standard install from PyPI"}],"dependencies":[{"reason":"Core dependency for Google Ads query building","package":"gaarf","optional":false},{"reason":"Google Ads API client library","package":"google-ads","optional":false},{"reason":"Prometheus metrics exposition","package":"prometheus-client","optional":false}],"imports":[{"note":"gaarf-exporter is a separate package; wrong import looks inside gaarf itself","wrong":"from gaarf.exporter import GaarfPrometheusExporter","symbol":"GaarfPrometheusExporter","correct":"from gaarf_exporter import GaarfPrometheusExporter"}],"quickstart":{"code":"import os\nfrom gaarf_exporter import GaarfPrometheusExporter\nfrom prometheus_client import start_http_server\n\n# Set credentials via environment variables or Google ADC\nexporter = GaarfPrometheusExporter(\n    credentials={\n        \"developer_token\": os.environ.get(\"DEVELOPER_TOKEN\", \"\"),\n        \"client_id\": os.environ.get(\"CLIENT_ID\", \"\"),\n        \"client_secret\": os.environ.get(\"CLIENT_SECRET\", \"\"),\n        \"refresh_token\": os.environ.get(\"REFRESH_TOKEN\", \"\")\n    },\n    customer_id=\"123-456-7890\"\n)\n\nstart_http_server(8000)\nexporter.run()\nprint(\"Serving metrics on :8000\")","lang":"python","description":"Start a Prometheus exporter that scrapes Google Ads metrics on a schedule."},"warnings":[{"fix":"Replace credential_file='path' with credentials={'developer_token': ..., ...}","message":"In version 1.2.0 the constructor signature changed: credential_file argument was removed; use credentials dict instead.","severity":"breaking","affected_versions":">=1.2.0"},{"fix":"Implement custom backoff or use gaarf's built-in quota handling. Not configured by default.","message":"The exporter does not handle Google Ads API quota limits; if you hit rate limits, the exporter may crash with gRPC errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Workaround: set a global timeout via Google Ads API client configuration before initializing exporter.","message":"Timeouts are not configurable in the current release; long-running queries may block the exporter HTTP server.","severity":"gotcha","affected_versions":"<=1.2.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install gaarf-exporter' and ensure you are in the correct virtual environment.","cause":"Package not installed or wrong Python environment.","error":"ModuleNotFoundError: No module named 'gaarf_exporter'"},{"fix":"Use credentials dictionary instead: credentials={'developer_token': ..., 'client_id': ..., ...}","cause":"Using old API with credential_file argument removed in v1.2.0.","error":"TypeError: __init__() got an unexpected keyword argument 'credential_file'"},{"fix":"Implement retry/backoff logic or contact Google to increase quota. Not built-in.","cause":"Hitting Google Ads API rate limits without backoff.","error":"google.ads.googleads.errors.GoogleAdsException: [quota_failure] Too many requests."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}