Grafana学习(6)——Introduction to exemplars及Glossary

发布时间 2023-11-22 13:02:19作者: 钱塘江畔
An exemplar is a specific trace representative of measurement taken in a given time interval. While metrics excel at giving you an aggregated view of your system, traces give you a fine grained view of a single request; exemplars are a way to link the two.

Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience.

To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.

示例是在给定时间间隔内进行测量的特定轨迹。虽然度量擅长为您提供系统的聚合视图,但跟踪可以为您提供单个请求的细粒度视图;范例是将两者联系起来的一种方式。
假设你的公司网站流量激增。虽然超过80%的用户能够在两秒内访问网站,但一些用户的响应时间比正常情况下要长,导致用户体验不佳。
要确定导致延迟的因素,必须将快速响应的跟踪与慢速响应的跟踪进行比较。考虑到在典型的生产环境中有大量的数据,这将是一项极其费力和耗时的工作。

se exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.

Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplar data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to configuring exemplars in the Prometheus data source.

Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique trace ID, which is a combination of a key value pair. To investigate further, click the blue button next to the traceID property.

使用示例可以通过精确定位在一个时间间隔内显示高延迟的查询跟踪来帮助隔离数据分布中的问题。一旦将延迟问题定位为几个示例跟踪,就可以将其与其他基于系统的信息或位置属性相结合,以更快地执行根本原因分析,从而快速解决性能问题。
对样例的支持仅适用于Prometheus数据源。启用该功能后,默认情况下样例数据可用。有关示例配置以及如何启用示例的更多信息,请参阅Prometheus数据源中的配置示例
Grafana在Explore视图和仪表板中显示了示例和度量。每个示例都显示为高亮显示的星形。您可以将光标悬停在示例上以查看唯一的跟踪ID,它是键值对的组合。要进一步调查,请单击traceID属性旁边的蓝色按钮。

Refer to View exemplar data for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost Intro to exemplars, which enable Grafana Tempo’s distributed tracing at massive scale.

有关如何从度量和日志中深入查看示例跟踪详细信息的说明,请参阅查看示例数据。要了解更多关于示例的信息,请参阅博客文章“示例简介”,它使Grafana Tempo能够大规模进行分布式跟踪

View exemplar data
When support for exemplar support is enabled for a Prometheus data source, you can view exemplar data either in the Explore view or from the Loki log details.
In Explore
Explore visualizes exemplar traces as highlighted stars alongside metrics data. For more information on how Explore visualizes trace data, refer to Tracing in Explore.

查看示例数据
当Prometheus数据源启用了对样例支持的支持时,您可以在Explore视图或Loki日志详细信息中查看样例数据。
在Explore
Explore将示例轨迹可视化为高亮显示的星星以及度量数据。有关Explore如何可视化跟踪数据的更多信息,请参阅Explore中的跟踪

Glossary-术语表