{"record":{"id":"3d109bdcba03d839","repo":"BerriAI/litellm","slug":"gcs-bucket-does-not-support-health-check","errorCode":null,"errorMessage":"GCS Bucket does not support health check","messagePattern":"GCS Bucket does not support health check","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"warning","filePath":"litellm/integrations/gcs_bucket/gcs_bucket.py","lineNumber":375,"sourceCode":"\n    async def flush_queue(self):\n        \"\"\"\n        Override flush_queue to work with asyncio.Queue.\n        \"\"\"\n        await self.async_send_batch()\n        self.last_flush_time = time.time()\n\n    async def periodic_flush(self):\n        \"\"\"\n        Override periodic_flush to work with asyncio.Queue.\n        \"\"\"\n        while True:\n            await asyncio.sleep(self.flush_interval)\n            verbose_logger.debug(\"GCS Bucket periodic flush after %s seconds\", self.flush_interval)\n            await self.flush_queue()\n\n    async def async_health_check(self) -> IntegrationHealthCheckStatus:\n        raise NotImplementedError(\"GCS Bucket does not support health check\")\n","sourceCodeStart":357,"sourceCodeEnd":376,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/gcs_bucket/gcs_bucket.py#L357-L376","documentation":"GCSBucketLogger.async_health_check unconditionally raises NotImplementedError — GCS bucket logging intentionally does not implement the integration health-check interface. Any generic health-check loop that iterates all registered callbacks and calls async_health_check will hit this for the GCS logger.","triggerScenarios":"A health-check aggregator calling async_health_check() on every registered integration; ops dashboards probing callback health; code that assumes all logging integrations implement the health-check protocol.","commonSituations":"Adding a 'are my callbacks alive' endpoint that walks all callbacks; upgrading litellm where new integrations get auto-registered into the health-check sweep.","solutions":["Skip integrations whose async_health_check raises NotImplementedError (or check the method's behavior for this class explicitly).","Exclude gcs_bucket from the health-check iteration list.","Treat this as 'health check not supported', not as an outage — the logger itself may be healthy.","If you need real GCS health, verify bucket access directly (e.g. a HEAD request on the bucket) instead."],"exampleFix":"# before\nfor cb in callbacks:\n    status = await cb.async_health_check()  # GCS raises\n\n# after\nfor cb in callbacks:\n    try:\n        status = await cb.async_health_check()\n    except NotImplementedError:\n        continue  # health check not supported for this integration","handlingStrategy":"try-catch","validationCode":"results = {}\nfor name, cb in callbacks.items():\n    hc = getattr(cb, 'async_health_check', None)\n    if hc is None:\n        continue\n    try:\n        results[name] = await hc()\n    except NotImplementedError:\n        results[name] = 'not_supported'","typeGuard":"def supports_health_check(cb) -> bool:\n    return getattr(cb, 'async_health_check', None) is not None and cb.__class__.__name__ != 'GCSBucketLogger'","tryCatchPattern":"try:\n    status = await cb.async_health_check()\nexcept NotImplementedError:\n    status = 'health check not supported'  # not an outage","preventionTips":["Treat NotImplementedError from health checks as 'n/a', never as a failure alert.","Probe GCS health directly (bucket HEAD request) if you genuinely need it."],"tags":["gcs","health-check","not-implemented"],"backgroundTag":"unsupported-operation","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}