当前位置:网站首页>Jaeger introduces native support for opentelemetry
Jaeger introduces native support for opentelemetry
2022-06-10 15:04:00 【CNCF】
author :Yuri Shkuro
Abreast of the times Jaeger v1.35 edition [1] Introduced through OpenTelemetry agreement (OTLP)[2] receive OpenTelemetry The ability to track data , all OpenTelemetry SDK Need to support this protocol . This is before Declare elimination Jaeger“ classic ” Client library [3] Subsequent to .
With this new feature , Will no longer be needed Jaeger Exporter and OpenTelemetry SDK Use it together , It's no longer necessary to be in Jaeger Back end running OpenTelemetry The collector . Use OTLP Exporter ,SDK Can be configured to send data directly to Jaeger Back end .OTLP Receiver pass gRPC or HTTP The endpoint accepts data .
Primer
Let's take a look at how this function works . First , according to Introduction to the document [4] The instructions in start Jaeger Integrated machine :
docker run --name jaeger \
-e COLLECTOR_OTLP_ENABLED=true \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
jaegertracing/all-in-one:1.35
Please note that , Compared to previous versions :
- Two ports have also been added to the export list ,4317 and 4318,OTLP The receiver uses them to listen gRPC and HTTP Connect .
- OTLP The receiver must pass through COLLECTOR_OTLP_ENABLED=true Can make .
- We removed other ports that are not related to this example .
When Jaeger On backend startup , You should see these two lines of logs :
{... "msg":"Starting GRPC server on endpoint 0.0.0.0:4317"}
{... "msg":"Starting HTTP server on endpoint 0.0.0.0:4318"}
As usual ,Jaeger UI Can be in http://localhost:16686/ visit .
Now let's use a simple Python Program , It USES OTLPSpanExporter To configure OpenTelemetry SDK And generate a single span trace .
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(OTLPSpanExporter())
)
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("foo"):
print("Hello world!")
basic_trace.py
opentelemetry-api
opentelemetry-sdk
opentelemetry-exporter-otlp-proto-http
requirements.txt
Run the program as follows :
pip install -r requirements.txt
OTEL_SERVICE_NAME=primer python3 basic_trace.py
If we refresh now Jaeger UI Search screen in , The services drop-down list should contain services primer( Please note that , We pass this service name to... Through the environment variable SDK), The trace from this service should look like this :
adopt OTLP Tracking of submitted samples .
OTLP The receiver can be accessed by --collector.otlp.* The multiple symbols at the beginning are further customized , These flags can be passed through the collector and all-in-one In the binary file help Command to get . These flags allow you to change two OTLP Port number of the server , To configure TLS, And change some other parameters , Such as maximum message size and keep alive .
Limit
The existing implementation has some considerations :
- If your app uses OTLP Export tracking and metrics , Then you still need to run OpenTelemetry The collector , because Jaeger The collector can only accept OTLP The tracking part of the data . perhaps , You can use two that point to different back ends OTLP Exporter to configure SDK.
- Jaeger The backend does not support OpenTelemetry Collector OTLP All options supported by the receiver .
- Only Jaeger The collector supports new OTLP Receiver .Jaeger The agent only supports “ classic ”Jaeger Format . If your deployment requires a local agent , We recommend running OpenTelemetry The collector .
Reference material
[1]
Jaeger v1.35 edition : https://github.com/jaegertracing/jaeger/releases/tag/v1.35.0
[2]
OpenTelemetry agreement (OTLP): https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md
[3]
Declare elimination Jaeger“ classic ” Client library : https://twitter.com/YuriShkuro/status/1455170693197402119
[4]
Introduction to the document : https://www.jaegertracing.io/docs/latest/getting-started/
[5]
The chat room : https://www.jaegertracing.io/get-in-touch/
CNCF (Cloud Native Computing Foundation) Founded on 2015 year 12 month , Affiliated to the Linux Foundation, It's a non-profit organization .
CNCF( Cloud native Computing Foundation ) Committed to fostering and maintaining a vendor neutral open source ecosystem , To promote cloud native technology . By democratizing the most cutting-edge model , Let these innovations be used by the public .
边栏推荐
- LeetCode_ 20 (brackets match)
- Does Fortran have a standard library
- Sanzi chess (implemented in C language)
- 详解OpenCV的函数filter2D(),并提醒大家它做的运算并不是卷积运算而是相关运算
- Golang Beep包 播放mp3 无法获取总长度 streamer.Len()为0 其他格式却可以
- The power of insight
- Euclidean algorithm for finding the greatest common factor
- 100003 words, take you to decrypt the system architecture under the double 11 and 618 e-commerce promotion scenarios
- 消息中间件的消费模式
- WordPress的管理员用户名是如何泄露的
猜你喜欢

一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue

洞見科技入選「愛分析· 隱私計算廠商全景報告」,獲評金融解决方案代錶廠商

In what scenario can we not use the arrow function?

【LogoDetection 数据集处理】(4)提取每张图片的logo区域

2022 the 14th Nanjing International artificial intelligence product exhibition

Explain the opencv function filter2d() in detail and remind you that the operation it does is not convolution but correlation operation

3、再遇HandyControl之窗体

Hutool使用总结(VIP典藏版)

This article introduces you to j.u.c's futuretask, fork/join framework and BlockingQueue

Golang Beep包 播放mp3 无法获取总长度 streamer.Len()为0 其他格式却可以
随机推荐
几种方式可以实现 JMeter 参数化?
js获取数组中最大值
CRM对企业以及销售员有哪些帮助?
LeetCode_ 21 (merge two ordered linked lists)
The power of insight
How to solve the problem that SVN cannot open the URL address
Redis basic usage 1
rk3399_9.0去掉设置的一级菜单network & internet
Euclidean algorithm for finding the greatest common factor
Get to know RPC
Collision detection unity experiment code
Golang []byte 转 File
[logodetection data set processing] (2) draw the label box of the training set picture
STM8S103f单片机的开发(1)LED灯的点亮
At the early stage of product development, do you choose to develop apps or applets?
Wechat applet returns to the previous page and transfers parameters
Information theory and coding 2 final review BCH code
Jaeger引入了对OpenTelemetry的原生支持
CG collision testing
洞察的力量