关于OpenTelementry一些思考

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,内容安全 1000次 1年
对象存储 OSS,恶意文件检测 1000次 1年
简介: 从KubeConf关于OpenTelemetry PPT中的一些思考

(未完待续)

image

image

image

image

image

image

image

Open Telemetry模块分解

  1. Collectors can communicate with various backends via exporters
  2. Configuration controls aggregation, batching, and processing
  3. In-proc exporters are easily replaceable to work with different backend
  4. SDK allows various extensions: sampling, filtering, enrichments
  5. OpenTelemetry SDK package can be completely replaced

image

最佳实践

Tracer:

  • Customer Attributes: Add custom properties for easier querying and differentiating telemetry.
  • Resource API: define resource attributes, which are distinct from regular attributes

    • Deployment name and location
    • App name and version
    • Hosting environment
    • Propagation:

      • use it as a metrics dimension or
      • attribute spans

OT视角的一种实现

jobsQueuedGauge := meter.NewFloat64Gauge("jobs_queued", metric.WithDescription("The number of jobs currently queued"))

err := tracer.WithSpan(ctx, "jobEnqueue", func(ctx context.Context) error { jobsTotal, err := jobQueue.Enqueue(job) if err != nil { return err } jobsQueuedGauge.Set(ctx, jobsTotal)

})

image

基于M3DB的一种实现

# HELP http_requests_total http_requests # TYPE http_requests_total counter http_requests_total{endpoint="/search",status_code="2xx"} 1725 # {trace_id="b096e71d..."} http_requests_total{endpoint="/search",status_code="4xx"} 4 # {trace_id=" 944a6d97..."} http_requests_total{endpoint="/search",status_code="5xx"} 27 # {trace_id="50785260..."} http_request_latency_bucket{endpoint="/search",le="0.1"} 7 # {trace_id=" 7f78deda..."}

image

支持采样机制

image

统一模型

Trace有Metric关系

image

数据表示上可以用Time + KeyValue方式融合

image

Metric与Trace、Log关联原理

  • 同一个时间段
  • 同一个实体Entity:例如通过Namespace,Location,Label等关联
  • (*)同一个TraceId

image

一种融合的观点

(待添加)

Reference

  • OpenTelemetry The First Release, What’s Next, and How to Get Involved - Morgan McLean, Google; Tristan Sloughter, Postmates; Sergey Kanzhelev, Microsoft; & Chris Kleinknecht, Google
  • Beyond Getting Started Using OpenTelemetry to Its Full Potential - Sergey Kanzhelev, Microsoft & Morgan McLean
目录
相关文章
|
SQL 存储 监控
深入可观测底层:OpenTelemetry 链路传递核心原理
本文会系统讲解链路传递一些基本概念,同时结合案例讲解链路传递的过程。
2740 0
深入可观测底层:OpenTelemetry 链路传递核心原理
|
4月前
|
缓存 Kubernetes API
K8S 性能优化 - K8S APIServer 调优
K8S 性能优化 - K8S APIServer 调优
|
Arthas 监控 Java
Arthas 概述 | 学习笔记
快速学习 Arthas 概述
Arthas 概述 | 学习笔记
|
Linux 数据安全/隐私保护 Windows
更换(Pypi)pip源到国内镜像
pip国内的一些镜像 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.
233832 2
|
4月前
|
Java
java的事件驱动如何实现
java的事件驱动如何实现
|
消息中间件 存储 缓存
Tracing 链路追踪 |学习笔记
快速学习 Tracing 链路追踪
421 0
Tracing 链路追踪 |学习笔记
|
4月前
|
网络协议 算法 数据中心
OSPF FRR+BFD联动,OSPF与BGP联动
使用IGP高级特性,完成网络中的快速收敛。
|
11月前
|
Kubernetes API Docker
【K8S系列】深入解析 k8s:入门指南(二)
【K8S系列】深入解析 k8s:入门指南(二)
114 0
|
11月前
|
Cloud Native Java API
JDK 21的新特性总结和分析
JDK 21的新特性总结和分析
282 0
|
XML 人工智能 JSON
SpringBoot实战(二):SpringMvc接收xml请求
SpringBoot实战(二):SpringMvc接收xml请求
408 0