本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/141639011
测试
1 |
|
输出
video_size_view definitions:
name: “my.org/views/video_size”
measure: name: “my.org/measure/video_size”; units: “By”; description: “size of processed videos”; type: int64
aggregation: Distribution with Buckets: 0,1.67772e+07,2.68435e+08
aggregation window: Cumulative
columns: my.org/keys/frontend
description: “processed video size over time”
expiry duration: 0Waiting 10.1s for exporters to run…
Name: my.org/ProcessVideo
TraceId-SpanId-Options: 8ad59ba5bb062620a8b1b82d330e4447-f815861ab2819a74-01
Parent SpanId: 0000000000000000 (remote: false)
Start time: 2024-08-28T06:18:33.2866047+00:00
End time: 2024-08-28T06:18:33.305601+00:00
Attributes: (0 dropped)
Annotations: (0 dropped)
2024-08-28T06:18:33.2866536+00:00: Start processing video.
2024-08-28T06:18:33.3055938+00:00: Finished processing video.
Message events: (0 dropped)
Links: (0 dropped)
Span ended: true
Status: OKNo data for view “ocquickstart.io/latency”.
No data for view “ocquickstart.io/line_lengths”.
No data for view “ocquickstart.io/lines_in”.
Data for view “my.org/views/video_size”:
Row data from 2024-08-28T06:18:38.2963482+00:00 to 2024-08-28T06:18:43.296423969+00:00:
my.org/keys/frontend=video size
count: 1 mean: 2.62144e+07 sum of squared deviation: 0 min: 2.62144e+07 max: 2.62144e+07
histogram counts: 0, 0, 1, 0View data:
video size : count: 1 mean: 2.62144e+07 sum of squared deviation: 0 min: 2.62144e+07 max: 2.62144e+07
histogram counts: 0, 0, 1, 0

参考
GitHub - census-instrumentation/opencensus-cpp: A stats collection and distributed tracing framework
https://github.com/prometheus/prometheus
https://github.com/jupp0r/prometheus-cpp
创作不易,小小的支持一下吧!

