googleapis / googleapis/google-cloud-python

tests/unit: test_metrics_emission_with_failure_attempt fails due to lack of "intercept"

未关闭
#15,897 1 条评论 0 个 reaction 已指派 2 人 已指派给 @lszinv 在 GitHub 查看
api: spanner
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

This is the failure output

```shell
_________________________________________________ test_metrics_emission_with_failure_attempt _________________________________________________

patched_client =

def test_metrics_emission_with_failure_attempt(patched_client):
instance = patched_client.instance("test-instance")
database = instance.database("example-db")
factory = SpannerMetricsTracerFactory()

assert factory.enabled

transport = database.spanner_api._transport
metrics_interceptor = transport._metrics_interceptor
> original_intercept = metrics_interceptor.intercept
E AttributeError: 'NoneType' object has no attribute 'intercept'

tests/unit/test_metrics.py:58: AttributeError
------------------------------------------------------------- Captured log setup -------------------------------------------------------------
WARNING opentelemetry.metrics._internal:__init__.py:864 Overriding of current MeterProvider is not allowed
----------------------------------------------------------- Captured log teardown ------------------------------------------------------------
WARNING opentelemetry.metrics._internal:__init__.py:864 Overriding of current MeterProvider is not allowed
============================================================== warnings summary ==============================================================
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。