无支撑的仪器/聚合器组合,类型valueRecorder和minmaxsumcountaggregator,忽略它
尝试调整以下示例:使用值recorder。
metrics.set_meter_provider(MeterProvider())
meter = metrics.get_meter(__name__)
metrics.get_meter_provider().start_pipeline(
meter, CloudMonitoringMetricsExporter(), 5
)
ratio_metric = meter.create_valuerecorder(
name="ratio_values",
description="Ratio for a given tool",
unit="ratio",
value_type=float,
)
ratio_values_a = {"symbol": "testA"}
ratio_values_b = {"symbol": "testB"}
ratio = 1.000
for i in range(20):
if i > 10:
ratio_metric.record(0.999, ratio_values_a)
ratio_metric.record(ratio, ratio_values_b)
ratio -= 0.1
else:
ratio_metric.record(0.999, ratio_values_a)
ratio_metric.record(ratio, ratio_values_b)
ratio += 0.2
time.sleep(10)
给出以下错误:
Unsupported instrument/aggregator combo, types ValueRecorder and MinMaxSumCountAggregator, ignoring it
Unsupported instrument/aggregator combo, types ValueRecorder and MinMaxSumCountAggregator, ignoring it
运行以下版本:
opentelemetry-api==1.10a0
opentelemetry-exporter-gcp-monitoring==1.2.0a0
opentelemetry-sdk==1.10a0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个非常旧的包裹的问题,不会解决。当这些软件包是根据规范编写的许多概念不再存在。正在进行中的新SDK实施,可以为实验使用,您可能需要检查 https://github.com/open-telemetry/opentelemetry-python/tree/main/main/main/docs/examples/metrics/metrics
This was an issue with very old packages and will not addressed. A lot of concepts when these packages were written based on specification no longer exists. There is a work in progress new SDK implementation which is ready for experimental use you may want to check https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/metrics