{"id":496290,"date":"2026-09-28T06:09:30","date_gmt":"2026-09-28T06:09:30","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=496290"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2026-09-28T06:09:30","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=496290","title":{"rendered":"Coroot: eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043b\u043e\u0433\u0438, \u0442\u0440\u0435\u0439\u0441\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0432 kubernetes"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab<em>\u0447\u0442\u043e<\/em>\u00a0\u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c\u00bb: \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0440\u043e\u0441\u0442 CPU, \u043b\u043e\u0433\u0438 \u2014 \u0441\u0442\u0435\u043a \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u0440\u0435\u0439\u0441\u044b \u2014 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u00ab<em>\u043f\u043e\u0447\u0435\u043c\u0443<\/em>\u00a0\u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c\u00bb, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0430\u0441\u0443\u044e\u0442. \u0412\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 2 \u044f\u0434\u0440\u0430 CPU, \u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442.<\/p>\n<p><a href=\"https:\/\/github.com\/coroot\/coroot\" rel=\"noopener nofollow\">Coroot<\/a>\u00a0\u2014 open-source observability-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0438\u043d\u0438\u0442\u044c. \u0415\u0451 \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014\u00a0<strong>\u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430<\/strong>: eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u043d\u043e\u0434\u0435, \u0430 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 (Go, Java) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430, \u0430 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u0448\u043d\u0438\u0435 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<p>Coroot \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u043c Coroot \u0447\u0435\u0440\u0435\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 coroot-operator (Community Edition), \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u00ab\u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0445\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043d\u0430 Nuxt (Node.js), Python, Go \u0438 Java \u2014 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<h3>Coroot vs Pyroscope vs Parca vs Pixie vs Perforator<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">Coroot (Community Edition)<\/p>\n<\/th>\n<th>\n<p align=\"left\">Grafana Pyroscope<\/p>\n<\/th>\n<th>\n<p align=\"left\">Parca<\/p>\n<\/th>\n<th>\n<p align=\"left\">Pixie<\/p>\n<\/th>\n<th>\n<p align=\"left\">Perforator (Yandex)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">eBPF CPU + Go (heap\/pprof) + Java (async-profiler)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 SDK, Grafana Alloy, OTLP; eBPF \u0447\u0435\u0440\u0435\u0437 Alloy\/OTel<\/p>\n<\/td>\n<td>\n<p align=\"left\">eBPF + pprof<\/p>\n<\/td>\n<td>\n<p align=\"left\">eBPF-\u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f k8s, CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">eBPF kernel + userspace, CPU, sPGO\/AutoFDO<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041d\u0443\u0436\u043d\u044b \u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442 (eBPF CPU + Go heap), \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f blocking\/mutex\/goroutine \u2014 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e pprof<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430 \u2014 SDK\/\u0430\u0433\u0435\u043d\u0442 (eBPF \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 Alloy\/OTel)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442 (eBPF)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442 (eBPF)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442 (eBPF)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041c\u0435\u0442\u0440\u0438\u043a\u0438 + \u043b\u043e\u0433\u0438 + \u0442\u0440\u0435\u0439\u0441\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0432 \u043e\u0434\u043d\u043e\u043c UI<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (eBPF-\u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0442\u0440\u0435\u0439\u0441\u044b)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0410\u0432\u0442\u043e\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 (\u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, 80%+ \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (\u0433\u043e\u0442\u043e\u0432\u044b\u0435 PxL-\u0441\u043a\u0440\u0438\u043f\u0442\u044b)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">SLO-\u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Service Map<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (\u043f\u043e eBPF-\u0442\u0440\u0430\u0444\u0438\u043a\u0443)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439<\/p>\n<\/td>\n<td>\n<p align=\"left\">ClickHouse<\/p>\n<\/td>\n<td>\n<p align=\"left\">S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">object storage<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0435)<\/p>\n<\/td>\n<td>\n<p align=\"left\">ClickHouse (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439) + PostgreSQL (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u043d\u0430\u0440\u0435\u0439) + S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 (\u0441\u044b\u0440\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Self-hosted<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u0432\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0441 eBPF-\u0441\u0431\u043e\u0440\u043e\u043c:\u00a0<a href=\"https:\/\/github.com\/pixie-io\/pixie\" rel=\"noopener nofollow\">Pixie<\/a>\u00a0\u2014 open-source eBPF-\u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f Kubernetes (\u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043f\u043e\u0434\u0430\u0445);\u00a0<a href=\"https:\/\/github.com\/yandex\/perforator\" rel=\"noopener nofollow\">Perforator<\/a>\u00a0\u043e\u0442 Yandex \u2014 production-ready continuous profiling \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u043e\u0432 (\u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u043d\u043e\u0434), \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 Google-Wide Profiling, \u0441 \u0440\u0430\u0437\u043c\u043e\u0442\u043a\u043e\u0439 \u0441\u0442\u0435\u043a\u0430 \u0431\u0435\u0437 frame pointers \u0438 sPGO-\u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u0434\u043b\u044f PGO-\u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<h4>\u0414\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: eBPF \u0438 user-space<\/h4>\n<p>Coroot \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0434\u0432\u0443\u043c\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:\u00a0<strong>eBPF<\/strong>\u00a0\u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 CPU \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u043d\u043e\u0434\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435, \u0430\u00a0<strong>\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438<\/strong>\u00a0\u0434\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u0432. \u041e\u0431\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0436\u0438\u0432\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 Coroot \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a \u0447\u0443\u0436\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0441\u043d\u0430\u0440\u0443\u0436\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Go heap<\/strong>\u00a0\u2014\u00a0<code>coroot-node-agent<\/code>\u00a0\u0447\u0438\u0442\u0430\u0435\u0442\u00a0<code>runtime.MemProfile<\/code>\u00a0\u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (<code>\/proc\/&lt;pid&gt;\/mem<\/code>), \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p><strong>Go pprof<\/strong>\u00a0\u2014\u00a0<code>coroot-cluster-agent<\/code>\u00a0\u0441\u043a\u0440\u0435\u0439\u043f\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439\u00a0<code>\/debug\/pprof<\/code>\u00a0(CPU\/blocking\/mutex), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438<\/p>\n<\/li>\n<li>\n<p><strong>Java<\/strong>\u00a0\u2014\u00a0<code>coroot-node-agent<\/code>\u00a0\u043d\u0430\u0445\u043e\u0434\u0438\u0442 HotSpot JVM \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u00a0<a href=\"http:\/\/libasync-profiler.so\" rel=\"noopener nofollow\"><code>libasync-profiler.so<\/code><\/a>\u00a0\u0447\u0435\u0440\u0435\u0437 JVM Attach API (CPU\/alloc\/lock)<\/p>\n<\/li>\n<li>\n<p><strong>Python<\/strong>\u00a0\u2014 eBPF-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442 Python-\u0444\u0440\u0435\u0439\u043c\u044b \u0447\u0435\u0440\u0435\u0437 Pyroscope eBPF-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440, \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u0432\u00a0<code>coroot-node-agent<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0435\u043c\u043e-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/tools\/\" rel=\"noopener nofollow\">kubectl<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/helm.sh\/\" rel=\"noopener nofollow\">Helm<\/a>\u00a0&gt;= 3;<\/p>\n<\/li>\n<\/ul>\n<h3>\u0427\u0430\u0441\u0442\u044c 1. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Coroot \u0432 Kubernetes<\/h3>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h4>\n<p>Coroot \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u00a0<strong>coroot-operator<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>coroot<\/strong>\u00a0\u2014 \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440: UI, API, \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>coroot-node-agent<\/strong>\u00a0\u2014 DaemonSet \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435: eBPF CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a (\u043f\u043b\u044e\u0441 Go heap-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440, Python-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 Java \u0447\u0435\u0440\u0435\u0437 async-profiler), \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438, \u0442\u0440\u0435\u0439\u0441\u044b<\/p>\n<\/li>\n<li>\n<p><strong>coroot-cluster-agent<\/strong>\u00a0\u2014 Deployment: \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0430\u044f \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u044f + pprof-\u0441\u043a\u0440\u0435\u0439\u043f Go-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p><strong>Prometheus<\/strong>\u00a0\u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0440\u0438\u043a<\/p>\n<\/li>\n<li>\n<p><strong>ClickHouse<\/strong>\u00a0\u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043b\u043e\u0433\u043e\u0432, \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 (+ clickhouse-keeper \u0434\u043b\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<\/ul>\n<h4>\u0428\u0430\u0433 1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Coroot \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h4>\n<p>Coroot \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 Helm. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c namespace \u0438 Secret \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code>kubectl create namespace corootkubectl -n coroot create secret generic coroot-admin-secret \\  --from-literal=admin-password=&lt;\u043f\u0430\u0440\u043e\u043b\u044c-\u0430\u0434\u043c\u0438\u043d\u0430&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c\u00a0<code>coroot-values.yaml<\/code>.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>coroot-values.yaml<\/code>:<\/p>\n<pre><code>metricsRefreshInterval: \"30s\"# Retention: \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 Coroot \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0435 \u0434\u043e\u043b\u044c\u0448\u0435 1 \u0447\u0430\u0441\u0430cacheTTL: \"1h\"      # TTL \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u044d\u0448\u0430 CoroottracesTTL: \"1h\"     # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0432 ClickHouselogsTTL: \"1h\"       # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u043b\u043e\u0433\u043e\u0432 \u0432 ClickHouseprofilesTTL: \"1h\"   # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432 ClickHouseauthBootstrapAdminPasswordSecret:  name: coroot-admin-secret  key: admin-passwordingress:  className: traefik  host: coroot_url  path: \/clickhouse:  shards: 1  replicas: 1  keeper:    replicas: 1  storage:    size: \"20Gi\"prometheus:  retention: \"1h\"  storage:    size: \"10Gi\"storage:  size: \"10Gi\"# Java-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: node-agent \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 async-profiler \u0432 HotSpot JVMnodeAgent:  env:    - name: ENABLE_JAVA_ASYNC_PROFILER      value: \"true\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c Coroot:<\/p>\n<pre><code># \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Coroot (\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 Coroot CR, node-agent, cluster-agent, Prometheus, ClickHouse)helm install coroot-operator oci:\/\/ghcr.io\/coroot\/charts\/coroot-operator \\  --version 0.9.10 -n coroot# Coroot CE: \u0447\u0430\u0440\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 Coroot CR (spec \u2014 \u0438\u0437 coroot-values.yaml)helm install coroot oci:\/\/ghcr.io\/coroot\/charts\/coroot-ce \\  --version 0.3.3 -n coroot -f coroot-values.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u0428\u0430\u0433 2. Coroot CR \u0438 retention 1 \u0447\u0430\u0441<\/h4>\n<p>Helm-\u0447\u0430\u0440\u0442\u00a0<code>coroot-ce<\/code>\u00a0\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 Custom Resource\u00a0<code>Coroot<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><strong>Retention \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 1 \u0447\u0430\u0441\u043e\u043c<\/strong>\u00a0\u0432 \u0442\u0440\u0451\u0445 \u043c\u0435\u0441\u0442\u0430\u0445: TTL \u0442\u0430\u0431\u043b\u0438\u0446 ClickHouse (<code>logsTTL<\/code>\/<code>tracesTTL<\/code>\/<code>profilesTTL<\/code>), \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u044d\u0448 (<code>cacheTTL<\/code>) \u0438 retention \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Prometheus (<code>prometheus.retention: \"1h\"<\/code>).<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u044e\u0430\u043d\u0441 \u043f\u043e Prometheus<\/strong>: \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0432\u0443\u0445\u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u00a0<code>prometheus.retention: \"1h\"<\/code>\u00a0\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442 \u043c\u0435\u0442\u0440\u0438\u043a \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 ~2\u20134 \u0447\u0430\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0428\u0430\u0433 3. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c<\/h4>\n<p>\u0412 UI \u0432\u0445\u043e\u0434\u0438\u043c \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c\u00a0<code>admin<\/code>\u00a0\u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u0428\u0430\u0433\u0435 1 (<code>admin-password<\/code>). \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u0436\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043b Prometheus \u0438 ClickHouse \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u00a0<code>default<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c7\/ad3\/476\/7c7ad3476a1e8fd73ce7331c3bc0cd82.jpeg\" alt=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Applications\" width=\"1884\" height=\"780\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7c7\/ad3\/476\/7c7ad3476a1e8fd73ce7331c3bc0cd82.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c7\/ad3\/476\/7c7ad3476a1e8fd73ce7331c3bc0cd82.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Applications<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u00a0<code>Applications<\/code>\u00a0\u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0430, \u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u043f\u0430\u0440\u0443 \u043d\u044e\u0430\u043d\u0441\u043e\u0432.<\/p>\n<p><code><strong>shortage<\/strong><\/code><strong>\u00a0\u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 CPU<\/strong>\u00a0(\u043f\u043e\u0434\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u043c) \u2014 \u043d\u0435 \u00ab\u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438\u00bb, \u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438: \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0436\u0434\u0430\u043b\u0438 CPU, \u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0435\u0433\u043e. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u2014 \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433 \u043f\u043e \u043b\u0438\u043c\u0438\u0442\u0443 CPU \u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0446\u0438\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u043d\u043e\u0434\u0435.<\/p>\n<p><strong>Latency \u043f\u0440\u043e\u0442\u0438\u0432 Net<\/strong>\u00a0\u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0449\u0438.\u00a0<strong>Latency<\/strong>\u00a0\u2014 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b).\u00a0<strong>Net<\/strong>\u00a0\u2014 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 round-trip time \u043d\u0430 TCP-\u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442: \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442, \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443\u00a0<code>demo-golang<\/code>\u00a0\u0438\u043c\u0435\u0435\u0442 Latency 5ms, \u043d\u043e Net &lt;0.1ms \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0435, \u0441\u0435\u0442\u044c \u043d\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442.<\/p>\n<h4>Incidents<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/494\/32b\/4a3\/49432b4a346a49c34916660493318b54.jpeg\" alt=\"Incidents\" width=\"1871\" height=\"855\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/494\/32b\/4a3\/49432b4a346a49c34916660493318b54.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/494\/32b\/4a3\/49432b4a346a49c34916660493318b54.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Incidents<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 Coroot \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u043c\u0438 (Incidents) \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 SLO-based alerting (\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0446\u0435\u043b\u0435\u0439 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f). \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0442\u0435\u043d \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 Coroot \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u00ab\u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442\u00bb \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>Alerts<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fe0\/046\/b2c\/fe0046b2c6c699057124b7dd7b2d85eb.jpeg\" alt=\"Alerts\" width=\"1871\" height=\"855\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fe0\/046\/b2c\/fe0046b2c6c699057124b7dd7b2d85eb.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fe0\/046\/b2c\/fe0046b2c6c699057124b7dd7b2d85eb.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Alerts<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 Kubernetes \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0441\u0431\u043e\u0435\u0432.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430\u0440\u0443\u0436\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438\u00a0<strong>Project Settings \u2192 Integrations<\/strong>: Slack, Microsoft Teams, PagerDuty, Opsgenie, webhook. \u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u00a0<a href=\"https:\/\/docs.coroot.com\/configuration\/application-categories#notification-routing\" rel=\"noopener nofollow\">\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a>\u00a0\u0438 \u0442\u0438\u043f\u0430\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439:\u00a0<strong>Incidents<\/strong>,\u00a0<strong>Deployments<\/strong>,\u00a0<strong>Alerts<\/strong>. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0430\u043b\u0435\u0440\u0442\u043e\u0432: \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438, \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0432 \u043b\u043e\u0433\u0430\u0445, Kubernetes-\u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 PromQL.<\/p>\n<h4>Service Map<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc8\/57d\/0b5\/cc857d0b5b075afa8e5b64d554d943a2.jpeg\" alt=\"Service Map\" width=\"1871\" height=\"855\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cc8\/57d\/0b5\/cc857d0b5b075afa8e5b64d554d943a2.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc8\/57d\/0b5\/cc857d0b5b075afa8e5b64d554d943a2.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Service Map<\/figcaption><\/div>\n<\/figure>\n<p>Service Map \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0428\u0430\u0433 4. OpenTelemetry Collector<\/h4>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u00a0<strong>OpenTelemetry Collector<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u2014 \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b \u043e\u0442 \u0432\u0441\u0435\u0445 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e OTLP\/HTTP (\u043f\u043e\u0440\u0442\u00a0<code>4318<\/code>), \u0431\u0430\u0442\u0447\u0438\u0442 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0432 Coroot. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u2014 \u0432\u00a0<a href=\"https:\/\/github.com\/patsevanton\/coroot-kubernetes-observability\/blob\/main\/otel-collector-values.yaml\" rel=\"noopener nofollow\">otel-collector-values.yaml<\/a>\u00a0\u0432 \u043a\u043e\u0440\u043d\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0<code>config<\/code>\u00a0\u0447\u0430\u0440\u0442\u0430\u00a0<code>open-telemetry\/opentelemetry-collector<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c: \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u044b jaeger\/zipkin\/prometheus \u0438 pipelines logs\/metrics \u044f\u0432\u043d\u043e \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437\u00a0<code>null<\/code>, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e HTTP-\u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u0442\u0440\u0435\u0439\u0441\u043e\u0432).<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>otel-collector-values.yaml<\/code>:<\/p>\n<pre><code>mode: deployment# \u041a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (\u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 &lt;release&gt;-opentelemetry-collector).fullnameOverride: otel-collectorimage:  repository: otel\/opentelemetry-collector-contribconfig:  receivers:    otlp:      protocols:        http:          endpoint: 0.0.0.0:4318  exporters:    otlp_http\/coroot:      endpoint: \"http:\/\/coroot-coroot.coroot:8080\"  service:    pipelines:      # \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 pipelines logs\/metrics \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u2014 \u0433\u043b\u0443\u0448\u0438\u043c.      logs: null      metrics: null      # traces \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043e\u043a receivers \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c      # \u0446\u0435\u043b\u0438\u043a\u043e\u043c (\u0431\u0435\u0437 jaeger\/zipkin) \u0438 \u043c\u0435\u043d\u044f\u0435\u043c exporters \u043d\u0430 coroot.      traces:        receivers: [otlp]        processors: [batch]        exporters: [otlp_http\/coroot]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440:<\/p>\n<pre><code>helm repo add open-telemetry https:\/\/open-telemetry.github.io\/opentelemetry-helm-chartshelm install otel-collector open-telemetry\/opentelemetry-collector \\  --version 0.173.1 -n otel --create-namespace -f otel-collector-values.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 OTLP\/HTTP \u043d\u0430\u00a0<code>4318<\/code>\u00a0\u0432 namespace\u00a0<code>otel<\/code>. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0<a href=\"http:\/\/otel-collector.otel:4318\/v1\/traces\" rel=\"noopener nofollow\"><code>http:\/\/otel-collector.otel:4318\/v1\/traces<\/code><\/a>, \u0430 \u0441\u0430\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0431\u0430\u0442\u0447\u0438 \u0432 Coroot \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u00a0<code>coroot-coroot.coroot:8080<\/code>.<\/p>\n<p>\u041e\u0431\u0437\u043e\u0440 Tracing \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 4 demo \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a \u043f\u044f\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043e\u043a:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f0\/85d\/f19\/1f085df19713c0f5eb21a6983c70b728.jpeg\" alt=\"OVERVIEW\" width=\"1871\" height=\"1025\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1f0\/85d\/f19\/1f085df19713c0f5eb21a6983c70b728.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f0\/85d\/f19\/1f085df19713c0f5eb21a6983c70b728.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>OVERVIEW<\/figcaption><\/div>\n<\/figure>\n<p><strong>OVERVIEW<\/strong>\u00a0\u2014\u00a0<strong>HeatMap<\/strong>\u00a0\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u044b \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438; \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u043d\u0435\u0451 \u0442\u0440\u0435\u0439\u0441\u044b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbb\/04d\/b31\/cbb04db31ceb8855a759fe3ec4ec3f62.jpeg\" alt=\"TRACES\" width=\"1871\" height=\"1025\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cbb\/04d\/b31\/cbb04db31ceb8855a759fe3ec4ec3f62.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cbb\/04d\/b31\/cbb04db31ceb8855a759fe3ec4ec3f62.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>TRACES<\/figcaption><\/div>\n<\/figure>\n<p><strong>TRACES<\/strong>\u00a0\u2014 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u043f\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438: \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u0441\u043f\u0430\u043d\u044b \u0438 \u0438\u0445 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>ERROR CAUSES<\/strong>\u00a0\u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u00a0<strong>\u0432\u0441\u0435<\/strong>\u00a0\u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043f\u0430\u043d\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u2014 \u043e\u0434\u043d\u043e\u0433\u043e \u043b\u0438 \u0442\u0438\u043f\u0430 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0431\u043e\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f75\/141\/272\/f75141272ebf2c630f3e66ee5213e6b7.jpeg\" alt=\"LATENCY EXPLORER\" width=\"1871\" height=\"1025\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f75\/141\/272\/f75141272ebf2c630f3e66ee5213e6b7.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f75\/141\/272\/f75141272ebf2c630f3e66ee5213e6b7.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>LATENCY EXPLORER<\/figcaption><\/div>\n<\/figure>\n<p><strong>LATENCY EXPLORER<\/strong>\u00a0\u2014 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438; \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a latency-\u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444, \u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u043c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7b7\/c67\/2c7\/7b7c672c70a0f3ac5eda2a331f409e8e.jpeg\" alt=\"COMPARE ATTRIBUTES\" width=\"1871\" height=\"1025\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7b7\/c67\/2c7\/7b7c672c70a0f3ac5eda2a331f409e8e.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7b7\/c67\/2c7\/7b7c672c70a0f3ac5eda2a331f409e8e.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>COMPARE ATTRIBUTES<\/figcaption><\/div>\n<\/figure>\n<p><strong>COMPARE ATTRIBUTES<\/strong>\u00a0\u2014 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0442\u0440\u0430\u0441\u0441 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u043e\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 feature flag.<\/p>\n<h3>\u0427\u0430\u0441\u0442\u044c 2. \u0427\u0435\u0442\u044b\u0440\u0435 \u00ab\u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0445\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0441\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u2014 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435\u00a0<a href=\"https:\/\/github.com\/patsevanton\/coroot-kubernetes-observability\/blob\/main\/apps\" rel=\"noopener nofollow\">apps<\/a>, \u0434\u0435\u043f\u043b\u043e\u0439 \u2014 Helm-\u0447\u0430\u0440\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/patsevanton\/coroot-kubernetes-observability\/blob\/main\/chart\" rel=\"noopener nofollow\">chart<\/a>. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0447\u0430\u0440\u0442 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u00a0<strong>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/strong>\u00a0\u2014 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 Kubernetes Job \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041e\u0431\u0437\u043e\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 SLO<\/h4>\n<p>\u041f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Coroot \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u00a0<strong>SLO<\/strong>\u00a0(Service Level Objectives) \u2014 \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 SLO:\u00a0<strong>Availability<\/strong>\u00a0(99% \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u044b \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a) \u0438\u00a0<strong>Latency<\/strong>\u00a0(99% \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 500 \u043c\u0441). Coroot \u0441\u0447\u0438\u0442\u0430\u0435\u0442 SLI \u043f\u043e eBPF-\u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u0430, latency \u0432 \u0432\u0438\u0434\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u043a\u0435\u0442\u0430\u043c\u0438 (5 \u043c\u0441 \u2014 10 \u0441) \u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a error budget.<\/p>\n<h4>\u0428\u0430\u0433 1. Nuxt (Node.js)<\/h4>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Nuxt 3 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c API-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u043c\u00a0<code>\/api\/cpu<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0430\u0438\u0432\u043d\u044b\u0439 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 (<code>fib(35)<\/code>\u00a0\u2014 ~30 \u043c\u043b\u043d \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432). \u042d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0432\u0438\u0434\u043d\u0430 \u0432 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0435.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014\u00a0<strong>\u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0437\u0430\u0446\u0438\u044f JS-\u0444\u0440\u0435\u0439\u043c\u043e\u0432<\/strong>. eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441\u044b, \u043d\u043e \u0431\u0435\u0437 perf-map \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f JS-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0435 \u0440\u0435\u0437\u043e\u043b\u0432\u044f\u0442\u0441\u044f. Node.js \u0443\u043c\u0435\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c perf-map \u0441\u0430\u043c, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>nuxt:  env:    NODE_OPTIONS: \"--perf-basic-prof-only-functions --interpreted-frames-native-stack\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/nuxt\/Dockerfile<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>ENV NODE_OPTIONS=\"--perf-basic-prof-only-functions --interpreted-frames-native-stack\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0432\u043e \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439\u00a0<code>fib<\/code>\/<code>fib<\/code>, \u0430 \u043d\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430.<\/p>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u2014\u00a0<strong>18.19+ \/ 20.10+ \/ 21.1+<\/strong>.<\/p>\n<p><strong>\u0422\u0440\u0435\u0439\u0441\u044b<\/strong>\u00a0\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 OpenTelemetry: Nitro-\u043f\u043b\u0430\u0433\u0438\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u00a0<code>NodeSDK<\/code>\u00a0\u0441\u00a0<code>HttpInstrumentation<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 server-span, \u0430 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 span\u00a0<code>fib<\/code>.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/nuxt\/server\/plugins\/otel.ts<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>export default defineNitroPlugin(() =&gt; {  const sdk = new NodeSDK({    instrumentations: [new HttpInstrumentation()],  })  sdk.start()})<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u2014 \u0432 OpenTelemetry Collector \u0447\u0435\u0440\u0435\u0437 OTLP.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>nuxt:  env:    OTEL_SERVICE_NAME: \"demo-nuxt\"    OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: \"http:\/\/otel-collector.otel:4318\/v1\/traces\"    OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: \"http\/protobuf\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432 Coroot<\/h3>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a3b\/bb0\/501\/a3bbb05016493dedb140a5b600626de9.jpeg\" alt=\"\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-nuxt\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a3b\/bb0\/501\/a3bbb05016493dedb140a5b600626de9.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a3b\/bb0\/501\/a3bbb05016493dedb140a5b600626de9.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-nuxt<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 overview-slo \u0432\u0438\u0434\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 SLO (Availability \u0438 Latency), \u043e\u0441\u0442\u0430\u0442\u043e\u043a error budget \u0438 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 latency \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u043a\u0435\u0442\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9c8\/f6a\/fbe\/9c8f6afbe3ca15e6e7a940c1a173967b.jpeg\" alt=\"CPU shortage \u0443 demo-nuxt\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9c8\/f6a\/fbe\/9c8f6afbe3ca15e6e7a940c1a173967b.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9c8\/f6a\/fbe\/9c8f6afbe3ca15e6e7a940c1a173967b.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>CPU shortage \u0443 demo-nuxt<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u044f CPU \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:\u00a0<strong>Node CPU utilization<\/strong>\u00a0\u2014\u00a0<code>ok<\/code>\u00a0(\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u043e\u0434\u044b \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 80%), \u0438\u00a0<strong>Container CPU utilization<\/strong>\u00a0\u2014\u00a0<code>high CPU utilization of 1 container<\/code>: \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u00a0<code>demo-nuxt<\/code>\u00a0\u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 80% \u0441\u0432\u043e\u0435\u0433\u043e CPU-\u043b\u0438\u043c\u0438\u0442\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/483\/794\/f9b\/483794f9bb6132e73872a1bcb64a9094.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU demo-nuxt\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/483\/794\/f9b\/483794f9bb6132e73872a1bcb64a9094.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/483\/794\/f9b\/483794f9bb6132e73872a1bcb64a9094.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU demo-nuxt<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 CPU-\u0432\u0440\u0435\u043c\u044f (~100%) \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 event loop Node.js: \u0441\u0442\u0435\u043a \u0438\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437\u00a0<code>uv__io_poll<\/code>\u00a0\u2192\u00a0<code>uv__read<\/code>\u00a0\u2192\u00a0<code>uv__stream_io<\/code>, \u0437\u0430\u0442\u0435\u043c \u0447\u0435\u0440\u0435\u0437 microtask-\u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 Nitro\/Nuxt. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0443\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 CPU: ~33% \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u00a0<code>\/api\/cpu<\/code>\u00a0(<code>api\/cpu.get.mjs<\/code>), \u0433\u0434\u0435 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0441\u044d\u043c\u043f\u043b\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439\u00a0<code>fib<\/code>\u00a0(<code>api\/cpu.get.mjs:924<\/code>\u00a0\u2014 \u043d\u0430\u0438\u0432\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438); \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u2014 \u043e\u0431\u0432\u044f\u0437\u043a\u0430 Nitro (<code>nitro.mjs:1645<\/code>) \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b V8\/libuv. \u0423\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u2014 CPU-bound \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f\u00a0<code>fib<\/code>, \u0430 \u043d\u0435 HTTP-\u0446\u0438\u043a\u043b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c27\/0d9\/038\/c270d9038cf0e90302c49b06c48d2acc.jpeg\" alt=\"Tracing demo-nuxt\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c27\/0d9\/038\/c270d9038cf0e90302c49b06c48d2acc.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c27\/0d9\/038\/c270d9038cf0e90302c49b06c48d2acc.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Tracing demo-nuxt<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Tracing<\/strong>\u00a0\u0443\u00a0<code>demo-nuxt<\/code>\u00a0\u2014 server-span \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 span \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435. \u0418\u0437 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444, \u0438\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0433\u043e span&#8217;\u0430 \u2014 \u043b\u043e\u0433\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<h4>\u0428\u0430\u0433 2. Python<\/h4>\n<p>Python-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u00a0<code>http.server<\/code>\u00a0\u0441 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u043c\u00a0<code>\/cpu<\/code>: \u043d\u0430\u0438\u0432\u043d\u044b\u0439\u00a0<code>fib(30)<\/code>\u00a0\u043f\u043b\u044e\u0441 busy-loop \u0441\u00a0<code>math.sqrt<\/code>. eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a Coroot \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u044c Python-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430, \u0430 Pyroscope eBPF-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440 \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442 Python-\u0444\u0440\u0435\u0439\u043c\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444\u0435 \u0432\u0438\u0434\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e\u00a0<code>naive_fib<\/code>.<\/p>\n<p><strong>\u0422\u0440\u0435\u0439\u0441\u044b<\/strong>\u00a0\u2014 \u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f OpenTelemetry: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437\u00a0<code>opentelemetry-instrument<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u00a0<code>http.server<\/code>\u00a0\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 server-span&#8217;\u044b \u0432 OpenTelemetry Collector \u0447\u0435\u0440\u0435\u0437 OTLP. \u0412\u00a0<a href=\"http:\/\/app.py\" rel=\"noopener nofollow\"><code>app.py<\/code><\/a>\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 span \u0447\u0435\u0440\u0435\u0437\u00a0<code>trace.get_tracer(...)<\/code>.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/python\/<\/code><a href=\"http:\/\/app.py\" rel=\"noopener nofollow\"><code>app.py<\/code><\/a>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>from opentelemetry import tracetracer = trace.get_tracer(\"demo-python\")class Handler(BaseHTTPRequestHandler):    def do_GET(self):        with tracer.start_as_current_span(self.path):            ...<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/python\/Dockerfile<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>CMD [\"opentelemetry-instrument\", \"--traces_exporter\", \"otlp_proto_http\", \"--metrics_exporter\", \"none\", \"--logs_exporter\", \"none\", \"python\", \"app.py\"]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0\u2014 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442, \u0447\u0442\u043e \u0434\u043b\u044f Nuxt, \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>OTEL_SERVICE_NAME: \"demo-python\"<\/code>.<\/p>\n<h3>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432 Coroot<\/h3>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d7\/e78\/450\/9d7e78450f61ef689ff60af97e36ad8d.jpeg\" alt=\"\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-python\" width=\"1884\" height=\"1060\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9d7\/e78\/450\/9d7e78450f61ef689ff60af97e36ad8d.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9d7\/e78\/450\/9d7e78450f61ef689ff60af97e36ad8d.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-python<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 overview-slo Availability SLO \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 OK (\u0434\u043e\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2265 99%), \u0430 Latency SLO \u043d\u0430\u0440\u0443\u0448\u0435\u043d: error budget burn rate 100.0x \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 1 \u0447\u0430\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 500 \u043c\u0441 \u043d\u0438\u0436\u0435 99% \u2014 \u0432\u044b\u0437\u043e\u0432\u00a0<code>\/cpu<\/code>\u00a0\u0441 \u043d\u0430\u0438\u0432\u043d\u044b\u043c\u00a0<code>fib(30)<\/code>\u00a0\u0438 busy-loop \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b \u0432 500 \u043c\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c03\/f45\/d95\/c03f45d9520e78b7548a2083d283fda6.jpeg\" alt=\"CPU shortage \u0443 demo-python\" width=\"1884\" height=\"1060\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c03\/f45\/d95\/c03f45d9520e78b7548a2083d283fda6.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c03\/f45\/d95\/c03f45d9520e78b7548a2083d283fda6.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>CPU shortage \u0443 demo-python<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438 CPU \u0442\u0435 \u0436\u0435 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:\u00a0<strong>Node CPU utilization<\/strong>\u00a0\u2014\u00a0<code>ok<\/code>\u00a0(\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u043e\u0434\u044b \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 80%), \u0438\u00a0<strong>Container CPU utilization<\/strong>\u00a0\u2014\u00a0<code>high CPU utilization of 1 container<\/code>: \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u00a0<code>demo-python<\/code>\u00a0\u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 80% \u0441\u0432\u043e\u0435\u0433\u043e CPU-\u043b\u0438\u043c\u0438\u0442\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/098\/eb7\/c40\/098eb7c40629ef3987b11f8fa269e328.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU demo-python\" width=\"1884\" height=\"1060\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/098\/eb7\/c40\/098eb7c40629ef3987b11f8fa269e328.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/098\/eb7\/c40\/098eb7c40629ef3987b11f8fa269e328.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU demo-python<\/figcaption><\/div>\n<\/figure>\n<p>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444\u00a0<strong>Profiling<\/strong>\u00a0\u0437\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u043e\u043a\u0430\u0436\u0435\u0442 CPU \u0432\u00a0<code>naive_fib<\/code>\u00a0\u0438 \u0432 busy-loop \u0441\u00a0<code>math.sqrt<\/code>; \u0440\u0435\u0436\u0438\u043c\u00a0<strong>Comparison<\/strong>\u00a0\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043b\u0438 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 CPU \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/752\/89b\/79d\/75289b79d46699e6baf00aa9ec13ad66.jpeg\" alt=\"Tracing demo-python\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/752\/89b\/79d\/75289b79d46699e6baf00aa9ec13ad66.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/752\/89b\/79d\/75289b79d46699e6baf00aa9ec13ad66.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Tracing demo-python<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Tracing<\/strong>\u00a0\u0443\u00a0<code>demo-python<\/code>\u00a0\u2014 server-span \u043e\u0442 \u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438\u00a0<code>http.server<\/code>\u00a0\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 span \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435. \u041f\u043e \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432\u043e \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444, \u043f\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u043c\u0443 span&#8217;\u0443 \u2014 \u0432 \u043b\u043e\u0433\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<h4>\u0428\u0430\u0433 3. Golang<\/h4>\n<p>Go-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0441\u0440\u0430\u0437\u0443:<\/p>\n<ul>\n<li>\n<p><strong>\u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/strong>\u00a0\u2014 \u0444\u043e\u043d\u043e\u0432\u044b\u0439 \u0446\u0438\u043a\u043b \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 1 MiB \u0432 \u0441\u043b\u0430\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f (\u043b\u0438\u043c\u0438\u0442 \u043f\u043e\u0434\u0430 2 GiB). \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0435\u0449\u0451 \u0434\u0435\u0440\u0433\u0430\u0435\u0442\u00a0<code>\/leak<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0442\u0443\u0442 \u0438 \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u044b \u2014 \u043f\u043e\u0434 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u0443\u0442\u0435\u0447\u043a\u0430 \u0433\u043e\u0440\u0443\u0442\u0438\u043d<\/strong>\u00a0\u2014 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u00a0<code>\/leak<\/code>\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0433\u043e\u0440\u0443\u0442\u0438\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430<\/p>\n<\/li>\n<li>\n<p><strong>CPU-\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/strong>\u00a0\u2014 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u00a0<code>\/cpu<\/code>\u00a0\u0441 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c \u043d\u0430 5 \u043c\u043b\u043d \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f Go Coroot \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u00a0<strong>\u043f\u043e \u0442\u0440\u0451\u043c \u043a\u0430\u043d\u0430\u043b\u0430\u043c<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f89\/bb0\/0e3\/f89bb00e3f04400f44e43159fb2a3adc.jpeg\" alt=\"\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Profiling \u0434\u043b\u044f demo-golang\" width=\"1864\" height=\"730\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f89\/bb0\/0e3\/f89bb00e3f04400f44e43159fb2a3adc.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f89\/bb0\/0e3\/f89bb00e3f04400f44e43159fb2a3adc.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Profiling \u0434\u043b\u044f demo-golang<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0422\u0438\u043f \u043f\u0440\u043e\u0444\u0438\u043b\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">eBPF (node-agent)<\/p>\n<\/th>\n<th>\n<p align=\"left\">Go heap-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440 (node-agent,\u00a0<code>\/proc\/&lt;pid&gt;\/mem<\/code>)<\/p>\n<\/th>\n<th>\n<p align=\"left\">pprof-\u0441\u043a\u0440\u0435\u0439\u043f (cluster-agent,\u00a0<code>\/debug\/pprof<\/code>)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CPU<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043b\u044e\u0431\u043e\u0439 \u044f\u0437\u044b\u043a<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>\/debug\/pprof\/profile<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">heap \/ Memory<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>Go Memory<\/code>\u00a0(alloc\/inuse \u00d7 space\/objects)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>Memory<\/code>\u00a0(\u0442\u0435 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u0443\u0431\u043b\u044c)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">blocking<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>\/debug\/pprof\/block<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">mutex<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>\/debug\/pprof\/mutex<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">goroutine<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c,\u00a0<code>\/debug\/pprof\/goroutine<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041d\u0443\u0436\u043d\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">heap \/ CPU<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0438\u0447\u0435\u0433\u043e:\u00a0<code>Go Memory<\/code>\u00a0\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 node-agent \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, CPU \u2014 eBPF<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435 \u043d\u0443\u0436\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">blocking \/ mutex \/ goroutine<\/p>\n<\/td>\n<td>\n<p align=\"left\">eBPF \u0438\u0445 \u043d\u0435 \u0434\u0430\u0451\u0442 \u2014 \u043d\u0443\u0436\u0435\u043d pprof-\u0441\u043a\u0440\u0435\u0439\u043f (<code>\/debug\/pprof<\/code>), \u0430\u00a0<code>--go-heap-profiler=disabled<\/code>\u00a0\u0443\u0431\u0435\u0440\u0451\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u00a0<code>Go Memory<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>import _ \"net\/http\/pprof\"<\/code>\u00a0+ \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0430<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f heap \u0438 CPU Go-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430, \u043d\u0438\u00a0<code>profile-scrape<\/code>\u00a0\u2014 \u043e\u0431\u0430 \u043a\u0430\u043d\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0437\u0432\u043d\u0435 (eBPF + \u0447\u0442\u0435\u043d\u0438\u0435\u00a0<code>\/proc\/&lt;pid&gt;\/mem<\/code>). pprof-\u0441\u043a\u0440\u0435\u0439\u043f \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 eBPF: blocking, mutex \u0438 goroutine.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>golang:  podAnnotations:    coroot.com\/profile-scrape: \"true\"    coroot.com\/profile-port: \"8080\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u0430\u043c \u043a\u043e\u0434 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u00a0<code>net\/http\/pprof<\/code>\u00a0\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n<pre><code>import _ \"net\/http\/pprof\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0422\u0440\u0435\u0439\u0441\u044b<\/strong>\u00a0\u2014 \u0440\u0443\u0447\u043d\u043e\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 OpenTelemetry (\u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Go \u0432 Coroot \u043d\u0435\u0442): \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u00a0<code>otelhttp.NewHandler<\/code>, \u0430 OTLP-\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 \u0447\u0438\u0442\u0430\u0435\u0442 endpoint \u0438\u0437 env \u0438 \u0448\u043b\u0451\u0442 \u0441\u043f\u0430\u043d\u044b \u0432 OpenTelemetry Collector. \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u00a0<code>\/cpu<\/code>\u00a0\u0438\u00a0<code>\/leak<\/code>\u00a0\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0435\u0439\u0441\u043e\u043c \u0432 Coroot.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/golang\/main.go<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>exporter, err := otlptrace.New(ctx, otlptracehttp.NewClient())\/\/ ...handler := otelhttp.NewHandler(http.DefaultServeMux, \"http-server\")<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e Go \u043a \u0432\u0435\u0440\u0441\u0438\u0438\u00a0<code>opentelemetry-go<\/code>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0412\u0435\u0440\u0441\u0438\u044f\u00a0<code>opentelemetry-go<\/code><\/p>\n<\/th>\n<th>\n<p align=\"left\">\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 Go<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">v1.38.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">Go 1.23<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">v1.42.0<\/p>\n<\/td>\n<td>\n<p align=\"left\">Go 1.24<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>v1.46.0<\/strong>\u00a0(\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435)<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Go 1.25<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">v1.47.0+<\/p>\n<\/td>\n<td>\n<p align=\"left\">Go 1.26<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/golang\/Dockerfile<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>FROM golang:1.25-alpine AS build<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>golang:  env:    OTEL_SERVICE_NAME: \"demo-golang\"    OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: \"http:\/\/otel-collector.otel:4318\/v1\/traces\"    OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: \"http\/protobuf\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>Memory-\u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0439 \u0440\u043e\u0441\u0442\u00a0<code>alloc_space<\/code>: \u043a\u0443\u0447\u0430 \u0440\u0430\u0441\u0442\u0451\u0442 \u043d\u0430 ~1 MiB\/\u0441\u0435\u043a \u0437\u0430 \u0441\u0447\u0451\u0442 \u0444\u043e\u043d\u043e\u0432\u043e\u0433\u043e\u00a0<code>growLeak<\/code>. \u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 memory-\u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u2014\u00a0<code>main.growLeak<\/code>, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u00a0<code>append<\/code>\u00a0\u0432\u00a0<code>leakBuf<\/code>.<\/p>\n<h3>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432 Coroot<\/h3>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/08d\/a86\/828\/08da868287f8a0863855c6a36772637e.jpeg\" alt=\"\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-golang\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/08d\/a86\/828\/08da868287f8a0863855c6a36772637e.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/08d\/a86\/828\/08da868287f8a0863855c6a36772637e.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-golang<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 overview-slo \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u0440\u043e\u0441\u0442 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0443\u0442\u0435\u0447\u043a\u0430 \u0433\u043e\u0440\u0443\u0442\u0438\u043d \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u044e\u0442 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 SLO (Availability \u0438 Latency); \u0432\u044b\u0437\u043e\u0432\u044b\u00a0<code>\/cpu<\/code>\u00a0\u0438\u00a0<code>\/leak<\/code>\u00a0\u0443\u0445\u043e\u0434\u044f\u0442 \u0437\u0430 objective 500 \u043c\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/114\/aae\/3b5\/114aae3b5f6f671934110d3d7738ded0.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 memory-\u043f\u0440\u043e\u0444\u0438\u043b\u044f demo-golang\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/114\/aae\/3b5\/114aae3b5f6f671934110d3d7738ded0.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/114\/aae\/3b5\/114aae3b5f6f671934110d3d7738ded0.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 memory-\u043f\u0440\u043e\u0444\u0438\u043b\u044f demo-golang<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u043e\u0440\u0443\u0442\u0438\u043d\u044b-\u0443\u0442\u0435\u0447\u043a\u0438 \u0432\u0438\u0434\u043d\u044b \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e: \u0447\u0438\u0441\u043b\u043e \u0433\u043e\u0440\u0443\u0442\u0438\u043d \u0440\u0430\u0441\u0442\u0451\u0442 (<code>\/healthz<\/code>\u00a0\u043e\u0442\u0434\u0430\u0451\u0442\u00a0<code>runtime.NumGoroutine()<\/code>), \u0430 Coroot \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0435\u0439 SLO.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5aa\/f1e\/200\/5aaf1e20057d7597e6bfd939c4ca6497.jpeg\" alt=\"Tracing demo-golang\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5aa\/f1e\/200\/5aaf1e20057d7597e6bfd939c4ca6497.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5aa\/f1e\/200\/5aaf1e20057d7597e6bfd939c4ca6497.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Tracing demo-golang<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Tracing<\/strong>\u00a0\u2014 server-span \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 (<code>otelhttp.NewHandler<\/code>). HeatMap \u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u2014 \u043a\u0430\u043a \u0432 \u0428\u0430\u0433\u0435 1. \u0418\u0437 CPU-\u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444, \u0438\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0433\u043e span&#8217;\u0430 \u2014 \u043b\u043e\u0433\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<h4>\u0428\u0430\u0433 4. Java<\/h4>\n<p><strong>Java-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>\u00a0\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433\u043e\u043c\u00a0<code>ENABLE_JAVA_ASYNC_PROFILER=true<\/code>\u00a0\u0432\u00a0<code>coroot-values.yaml<\/code>\u00a0(\u0441\u043c. \u0428\u0430\u0433 1). Java-\u0430\u0433\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u2014\u00a0<code>coroot-node-agent<\/code>\u00a0\u0441\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442 HotSpot JVM \u043f\u043e\u00a0<a href=\"http:\/\/libjvm.so\" rel=\"noopener nofollow\"><code>libjvm.so<\/code><\/a>\u00a0\u0432\u00a0<code>\/proc\/&lt;pid&gt;\/maps<\/code>\u00a0\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 async-profiler \u0447\u0435\u0440\u0435\u0437 JVM Attach API. (Java-\u0430\u0433\u0435\u043d\u0442 \u0432\u00a0<a href=\"https:\/\/github.com\/patsevanton\/coroot-kubernetes-observability\/blob\/main\/apps\/java\/Dockerfile\" rel=\"noopener nofollow\">apps\/java\/Dockerfile<\/a>\u00a0\u2014 \u044d\u0442\u043e OpenTelemetry-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0442\u0440\u0435\u0439\u0441\u043e\u0432, \u043a \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442.)<\/p>\n<p>Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c\u00a0<a href=\"http:\/\/com.sun.net\" rel=\"noopener nofollow\"><code>com.sun.net<\/code><\/a><code>.httpserver<\/code>\u00a0\u0441 \u0442\u0440\u0435\u043c\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p><code><strong>\/cpu<\/strong><\/code>\u00a0\u2014 \u043d\u0430\u0438\u0432\u043d\u044b\u0439\u00a0<code>fib(35)<\/code>\u00a0\u043f\u043b\u044e\u0441 \u0446\u0438\u043a\u043b \u043d\u0430 5 \u043c\u043b\u043d \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439<\/p>\n<\/li>\n<li>\n<p><code><strong>\/alloc<\/strong><\/code>\u00a0\u2014 \u0444\u043e\u043d\u043e\u0432\u0430\u044f \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 (\u0432\u0438\u0434\u043d\u0430 \u0432 Memory-\u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u043a\u0430\u043a\u00a0<code>alloc_space<\/code>\/<code>alloc_objects<\/code>)<\/p>\n<\/li>\n<li>\n<p><code><strong>\/lock<\/strong><\/code>\u00a0\u2014 \u0434\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u043e\u0434\u0438\u043d \u043c\u043e\u043d\u0438\u0442\u043e\u0440 (<code>synchronized<\/code>\u00a0+\u00a0<code>sleep<\/code>) \u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 Lock-\u043f\u0440\u043e\u0444\u0438\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u00a0<strong>\u0431\u0435\u0437 JVM-\u0444\u043b\u0430\u0433\u043e\u0432<\/strong>\u00a0\u2014 async-profiler \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 JVM\u00a0<strong>\u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438<\/strong>\u00a0(\u0447\u0435\u0440\u0435\u0437 JVM Attach API). \u041d\u043e \u0431\u0435\u0437 \u043d\u0438\u0445 \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u0443\u0435\u0442: dynamical attach \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0443 \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e JIT-\u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0438 frame pointer, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u0441\u044d\u043c\u043f\u043b\u044b \u043d\u0435 \u0440\u0435\u0437\u043e\u043b\u0432\u044f\u0442\u0441\u044f \u0432 \u0438\u043c\u0435\u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u00a0<code>[unknown]<\/code>\u00a0(\u0430\u00a0<code>naiveFib<\/code>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c, \u0431\u0443\u0434\u0443\u0447\u0438 \u0437\u0430\u0438\u043d\u043b\u0430\u0439\u043d\u0435\u043d\u043d\u044b\u043c \u0432\u00a0<code>cpuBurn<\/code>). \u0424\u043b\u0430\u0433\u0438 \u043d\u0438\u0436\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043f\u043e\u0442\u0435\u0440\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u00ab\u0434\u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430\u00bb:<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/java\/Dockerfile<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>ENTRYPOINT [\"java\", \\  \"-javaagent:\/app\/opentelemetry-javaagent.jar\", \\  \"-XX:+UnlockDiagnosticVMOptions\", \\  \"-XX:+DebugNonSafepoints\", \\  \"-XX:+PreserveFramePointer\", \\  \"-XX:TieredStopAtLevel=1\", \\  \"-XX:CompileCommand=dontinline,DemoJava.naiveFib\", \\  \"-cp\", \"\/app\", \"DemoJava\"]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<ul>\n<li>\n<p><code>-XX:+UnlockDiagnosticVMOptions<\/code>\u00a0\u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u2014 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e JVM \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442\u00a0<code>-XX:+DebugNonSafepoints<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>-XX:+DebugNonSafepoints<\/code>\u00a0\u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 JIT \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c debug-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0432 \u043d\u0435\u0441\u0435\u0439\u0444\u043f\u043e\u0438\u043d\u0442\u0430\u0445 \u2014 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u044c JIT-\u0444\u0440\u0435\u0439\u043c\u043e\u0432 \u043d\u0435 \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442\u0441\u044f \u0432\u00a0<code>[unknown]<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>-XX:+PreserveFramePointer<\/code>\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 RBP \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u0443\u0442\u043a\u0438 \u0441\u0442\u0435\u043a\u0430 \u2014 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e async-profiler (\u0438 eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a) \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0441\u0442\u0435\u043a\u0443, \u0438 \u0441\u044d\u043c\u043f\u043b\u044b \u0443\u0445\u043e\u0434\u044f\u0442 \u0432\u00a0<code>[unknown]<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>-XX:TieredStopAtLevel=1<\/code>\u00a0\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e C1-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e: \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0433\u0447\u0435 \u043c\u0430\u043f\u043f\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u044b, \u0447\u0435\u043c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 C2.<\/p>\n<\/li>\n<li>\n<p><code>-XX:CompileCommand=dontinline,DemoJava.naiveFib<\/code>\u00a0\u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0438\u043d\u043b\u0430\u0439\u043d\u0438\u0442\u044c\u00a0<code>naiveFib<\/code>\u00a0\u2014 \u0438\u043d\u0430\u0447\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f\u00a0<code>demo-java<\/code>\u00a0Coroot \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439: async-profiler \u043e\u0442\u0434\u0430\u0451\u0442 CPU, \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0430 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430 \u00abJava\u00bb \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u0438\u0445 \u043e\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u044f eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430. \u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Profiling<\/strong>\u00a0\u0432 \u043a\u0430\u043f\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0448\u0435\u0441\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u0439:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/344\/e64\/5e5\/344e645e5b3a2c3c5f7e55f172c4197c.jpeg\" alt=\"\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Profiling \u0434\u043b\u044f demo-java\" width=\"290\" height=\"313\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/344\/e64\/5e5\/344e645e5b3a2c3c5f7e55f172c4197c.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/344\/e64\/5e5\/344e645e5b3a2c3c5f7e55f172c4197c.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Profiling \u0434\u043b\u044f demo-java<\/figcaption><\/div>\n<\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0422\u0438\u043f \u043f\u0440\u043e\u0444\u0438\u043b\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">eBPF (node-agent)<\/p>\n<\/th>\n<th>\n<p align=\"left\">async-profiler (node-agent, JVM Attach API)<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CPU (eBPF)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043b\u044e\u0431\u043e\u0439 \u044f\u0437\u044b\u043a<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java CPU<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>cpu<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java Lock (contentions)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>lock<\/code>\u00a0(\u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0448\u0435\u043d\u043e\u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java Lock (delay)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>lock<\/code>\u00a0(\u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java Memory (alloc_objects)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>alloc<\/code>\u00a0(\u0447\u0438\u0441\u043b\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java Memory (alloc_space)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0435\u0441\u0442\u044c, \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>alloc<\/code>\u00a0(\u0431\u0430\u0439\u0442\u044b)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041d\u0443\u0436\u043d\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CPU (eBPF)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0438\u0447\u0435\u0433\u043e: eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435 \u043d\u0443\u0436\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Java CPU \/ Memory \/ Lock<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00a0<code>ENABLE_JAVA_ASYNC_PROFILER=true<\/code>\u00a0\u0432\u00a0<code>coroot-values.yaml<\/code>\u00a0\u2014 node-agent \u0441\u0430\u043c \u043d\u0430\u0439\u0434\u0451\u0442 JVM \u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442 async-profiler<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043d\u0435 \u043d\u0443\u0436\u043d\u044b; JVM-\u0444\u043b\u0430\u0433\u0438 (<code>PreserveFramePointer<\/code>\u00a0\u0438 \u0434\u0440.) \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0437\u0430\u0446\u0438\u044e<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 Java \u043f\u0440\u0430\u0432\u043a\u0430 \u043a\u043e\u0434\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430: CPU \u0441\u043d\u0438\u043c\u0430\u0435\u0442 eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a, \u0430 \u0432\u0441\u0451 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u00abJava\u00bb \u2014 async-profiler, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 node-agent \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432 HotSpot JVM. JVM-\u0444\u043b\u0430\u0433\u0438 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0430\u0431\u0437\u0430\u0446\u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u2014 \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u00a0<code>[unknown]<\/code>\u00a0\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u00ab\u0434\u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430\u00bb.<\/p>\n<p><strong>\u0422\u0440\u0435\u0439\u0441\u044b<\/strong>\u00a0\u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 OpenTelemetry Java-\u0430\u0433\u0435\u043d\u0442: jar \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433\u043e\u043c\u00a0<code>-javaagent<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u0441\u043f\u0430\u043d\u044b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u0443\u0445\u043e\u0434\u044f\u0442 \u0432 OpenTelemetry Collector \u0447\u0435\u0440\u0435\u0437 OTLP.<\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>apps\/java\/Dockerfile<\/code>\u00a0(\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442):<\/p>\n<pre><code>RUN wget -q -O \/opentelemetry-javaagent.jar \\      https:\/\/github.com\/open-telemetry\/opentelemetry-java-instrumentation\/releases\/latest\/download\/opentelemetry-javaagent.jar<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0424\u0430\u0439\u043b\u00a0<code>chart\/values.yaml<\/code>\u00a0\u2014 \u0442\u043e\u0442 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442, \u0447\u0442\u043e \u0434\u043b\u044f Nuxt, \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>OTEL_SERVICE_NAME: \"demo-java\"<\/code>.<\/p>\n<h3>\u0427\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432 Coroot<\/h3>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/90a\/125\/e2d\/90a125e2d619ccad409e1f5ca2dfb949.jpeg\" alt=\"\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-java\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/90a\/125\/e2d\/90a125e2d619ccad409e1f5ca2dfb949.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/90a\/125\/e2d\/90a125e2d619ccad409e1f5ca2dfb949.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0437\u043e\u0440 \u0438 SLO \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f demo-java<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 overview-slo Availability SLO \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 OK (\u0434\u043e\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2265 99%), \u0430 Latency SLO \u043d\u0430\u0440\u0443\u0448\u0435\u043d: error budget burn rate 65.9x \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 1 \u0447\u0430\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 500 \u043c\u0441 \u043d\u0438\u0436\u0435 99% \u2014 \u0432\u044b\u0437\u043e\u0432\u00a0<code>\/cpu<\/code>\u00a0\u0441 \u043d\u0430\u0438\u0432\u043d\u044b\u043c\u00a0<code>fib(35)<\/code>\u00a0\u0443\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 objective 500 \u043c\u0441, \u0430\u00a0<code>\/alloc<\/code>\u00a0\u0434\u0430\u0451\u0442 \u0440\u043e\u0441\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/607\/a9e\/61d\/607a9e61d9bf26e9552f67b7692f4a8e.jpeg\" alt=\"CPU shortage \u0443 demo-java\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/607\/a9e\/61d\/607a9e61d9bf26e9552f67b7692f4a8e.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/607\/a9e\/61d\/607a9e61d9bf26e9552f67b7692f4a8e.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>CPU shortage \u0443 demo-java<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u044f CPU \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435:\u00a0<strong>Node CPU utilization<\/strong>\u00a0\u2014\u00a0<code>ok<\/code>\u00a0(\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u043e\u0434\u044b \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 80%), \u0438\u00a0<strong>Container CPU utilization<\/strong>\u00a0\u2014\u00a0<code>high CPU utilization of 1 container<\/code>: \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u00a0<code>demo-java<\/code>\u00a0\u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 80% \u0441\u0432\u043e\u0435\u0433\u043e CPU-\u043b\u0438\u043c\u0438\u0442\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1a0\/dd9\/385\/1a0dd9385af34d5bcdb5b36f5dbfe63f.jpeg\" alt=\"JVM-\u043f\u0440\u043e\u0444\u0438\u043b\u044c demo-java\" width=\"1869\" height=\"1117\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1a0\/dd9\/385\/1a0dd9385af34d5bcdb5b36f5dbfe63f.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1a0\/dd9\/385\/1a0dd9385af34d5bcdb5b36f5dbfe63f.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>JVM-\u043f\u0440\u043e\u0444\u0438\u043b\u044c demo-java<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u044f JVM \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:\u00a0<strong>JVM availability<\/strong>\u00a0\u2014\u00a0<code>ok<\/code>\u00a0(\u0447\u0438\u0441\u043b\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 JVM \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 0), \u0438\u00a0<strong>JVM safepoints<\/strong>\u00a0\u2014\u00a0<code>ok<\/code>\u00a0(\u0432\u0440\u0435\u043c\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 safepoint-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 50 \u043c\u0441).<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a40\/48e\/57e\/a4048e57e76dcb772c9a534cf95c52ce.jpeg\" alt=\"Tracing demo-java\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a40\/48e\/57e\/a4048e57e76dcb772c9a534cf95c52ce.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a40\/48e\/57e\/a4048e57e76dcb772c9a534cf95c52ce.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Tracing demo-java<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Tracing<\/strong>\u00a0\u2014 server-span \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 (OTel Java-\u0430\u0433\u0435\u043d\u0442, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430). \u0410\u043d\u043e\u043c\u0430\u043b\u0438\u044f CPU \u0432\u0435\u0434\u0451\u0442 \u0432\u043e \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444, \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 span \u2014 \u0432 \u043b\u043e\u0433\u0438 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/207\/455\/df3\/207455df306980b26996253bf4ca676b.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU (eBPF) demo-java\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/207\/455\/df3\/207455df306980b26996253bf4ca676b.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/207\/455\/df3\/207455df306980b26996253bf4ca676b.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 CPU (eBPF) demo-java<\/figcaption><\/div>\n<\/figure>\n<p><strong>CPU (eBPF)<\/strong>\u00a0\u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0441 eBPF-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u043e\u0434\u044b: \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u00a0<code>naiveFib<\/code>\u00a0(\u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0441 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e), \u043a\u0430\u043a \u0438 \u0443 Python\/Node.js.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40d\/ef6\/840\/40def68404ef03c74502d9fc01256693.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 Java Lock (contentions) demo-java\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/40d\/ef6\/840\/40def68404ef03c74502d9fc01256693.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40d\/ef6\/840\/40def68404ef03c74502d9fc01256693.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 Java Lock (contentions) demo-java<\/figcaption><\/div>\n<\/figure>\n<p><strong>Java Lock (contentions)<\/strong>\u00a0\u2014 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0448\u0435\u043d\u043e\u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430: \u0434\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0437\u0430 \u043e\u0434\u0438\u043d\u00a0<code>synchronized<\/code>-\u0431\u043b\u043e\u043a \u043d\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0435\u00a0<code>\/lock<\/code>.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f44\/7e1\/41f\/f447e141f37ef8cafd3943c6b4d988aa.jpeg\" alt=\"\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 Java Memory (alloc_objects) demo-java\" width=\"1920\" height=\"1200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f44\/7e1\/41f\/f447e141f37ef8cafd3943c6b4d988aa.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f44\/7e1\/41f\/f447e141f37ef8cafd3943c6b4d988aa.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 Java Memory (alloc_objects) demo-java<\/figcaption><\/div>\n<\/figure>\n<p><strong>Java Memory (alloc_objects)<\/strong>\u00a0\u2014 \u0440\u043e\u0441\u0442 \u0447\u0438\u0441\u043b\u0430 \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u0441\u0442\u0435\u043a\u0443 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439 \u0432\u00a0<code>DemoJava.allocate<\/code>\u00a0(\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u00a0<code>\/alloc<\/code>). \u041f\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u00a0<code>Java Memory (alloc_space)<\/code>\u00a0\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0442\u0435\u043a \u0432 \u0431\u0430\u0439\u0442\u0430\u0445.<\/p>\n<p>\u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435\u00a0<strong>Profiling<\/strong>\u00a0async-profiler \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u0435 \u0436\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439:\u00a0<strong>CPU<\/strong>\u00a0(\u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0432\u00a0<code>naiveFib<\/code>),\u00a0<strong>Memory<\/strong>\u00a0(\u0440\u043e\u0441\u0442\u00a0<code>alloc_space<\/code>\/<code>alloc_objects<\/code>\u00a0\u043f\u043e \u0441\u0442\u0435\u043a\u0443 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439 \u0432\u00a0<code>DemoJava.allocate<\/code>) \u0438\u00a0<strong>Lock<\/strong>\u00a0(\u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430 \u0438 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0448\u0435\u043d\u043e\u0432 \u043d\u0430\u00a0<code>synchronized<\/code>-\u0431\u043b\u043e\u043a\u0435).<\/p>\n<h3>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<h4>\u0420\u0435\u043f\u043b\u0438\u043a\u0438 \u0438 ClickHouse<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u00a0<code>clickhouse.shards\/replicas: 2<\/code>\u00a0\u0438\u00a0<code>keeper.replicas: 3<\/code>\u00a0(\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043f\u043b\u0438\u043a Coroot (<code>replicas: 2<\/code>), \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 SQLite \u0432 PostgreSQL (<code>postgres.*<\/code>\u00a0\u0432 CR).<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>Coroot \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab<em>\u043f\u043e\u0447\u0435\u043c\u0443<\/em>\u00a0\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u00bb \u2014 \u043d\u0430 \u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442. \u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430, \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0430 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u0441\u0451 \u044d\u0442\u043e \u2014 \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438, \u043b\u043e\u0433\u0430\u043c\u0438 \u0438 \u0442\u0440\u0435\u0439\u0441\u0430\u043c\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c UI.<\/p>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0411\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>\u00a0\u2014 eBPF \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 \u0434\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430<\/strong>\u00a0\u2014 CPU \u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e \u043a\u043b\u0438\u043a\u0443, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438<\/strong>\u00a0\u2014 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 ~80% \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0441\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435<\/strong>\u00a0\u2014 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438, \u0442\u0440\u0435\u0439\u0441\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0434\u0438\u043d Helm-\u0447\u0430\u0440\u0442<\/strong>\u00a0\u2014 coroot-operator \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u043c \u0441\u0442\u0435\u043a\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>GitHub:\u00a0<a href=\"https:\/\/github.com\/coroot\/coroot\" rel=\"noopener nofollow\">github.com\/coroot\/coroot<\/a><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:\u00a0<a href=\"http:\/\/docs.coroot.com\" rel=\"noopener nofollow\">docs.coroot.com<\/a><\/p>\n<\/li>\n<li>\n<p>Helm-\u0447\u0430\u0440\u0442\u044b (OCI):\u00a0<a href=\"https:\/\/github.com\/coroot\/coroot-operator\/pkgs\/container\/charts%2Fcoroot-operator\" rel=\"noopener nofollow\">ghcr.io\/coroot\/charts<\/a><\/p>\n<\/li>\n<li>\n<p>Operator:\u00a0<a href=\"https:\/\/github.com\/coroot\/coroot-operator\" rel=\"noopener nofollow\">github.com\/coroot\/coroot-operator<\/a><\/p>\n<\/li>\n<li>\n<p>Live demo:\u00a0<a href=\"http:\/\/demo.coroot.com\" rel=\"noopener nofollow\">demo.coroot.com<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0422\u0413: <a href=\"https:\/\/t.me\/notes_devops_engineer\" rel=\"noopener nofollow\">https:\/\/t.me\/notes_devops_engineer<\/a> <\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1087316\/\">https:\/\/habr.com\/ru\/articles\/1087316\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0447\u0442\u043e\u00a0\u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c\u00bb: \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0440\u043e\u0441\u0442 CPU, \u043b\u043e\u0433\u0438 \u2014 \u0441\u0442\u0435\u043a \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u0440\u0435\u0439\u0441\u044b \u2014 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u00ab\u043f\u043e\u0447\u0435\u043c\u0443\u00a0\u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u0442\u0430\u043b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c\u00bb, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0430\u0441\u0443\u044e\u0442. \u0412\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 2 \u044f\u0434\u0440\u0430 CPU, \u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442.Coroot\u00a0\u2014 open-source observability-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0438\u043d\u0438\u0442\u044c. \u0415\u0451 \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014\u00a0\u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430: eBPF-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u043d\u0438\u043c\u0430\u0435\u0442 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u043d\u043e\u0434\u0435, \u0430 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 (Go, Java) \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0444\u043b\u0435\u0439\u043c\u0433\u0440\u0430\u0444 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043e \u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430, \u0430 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u0448\u043d\u0438\u0435 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438.Coroot \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u043c Coroot \u0447\u0435\u0440\u0435\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 coroot-operator (Community Edition), \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u00ab\u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0445\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043d\u0430 Nuxt (Node.js), Python, Go \u0438 Java \u2014 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.Coroot vs Pyroscope vs Parca vs Pixie vs Perforator\u041c\u0435\u0442\u0440\u0438\u043a\u0430Coroot (Community Edition)Grafana PyroscopeParcaPixiePerforator (Yandex)\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435eBPF CPU + Go (heap\/pprof) + Java (async-profiler)\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 SDK, Grafana Alloy, OTLP; eBPF \u0447\u0435\u0440\u0435\u0437 Alloy\/OTeleBPF + pprofeBPF-\u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f k8s, CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438eBPF kernel + userspace, CPU, sPGO\/AutoFDO\u041d\u0443\u0436\u043d\u044b \u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\u041d\u0435\u0442 (eBPF CPU + Go heap), \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f blocking\/mutex\/goroutine \u2014 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e pprof\u0414\u0430 \u2014 SDK\/\u0430\u0433\u0435\u043d\u0442 (eBPF \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 Alloy\/OTel)\u041d\u0435\u0442 (eBPF)\u041d\u0435\u0442 (eBPF)\u041d\u0435\u0442 (eBPF)\u041c\u0435\u0442\u0440\u0438\u043a\u0438 + \u043b\u043e\u0433\u0438 + \u0442\u0440\u0435\u0439\u0441\u044b\u0435\u0441\u0442\u044c, \u0432 \u043e\u0434\u043d\u043e\u043c UI\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (eBPF-\u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0442\u0440\u0435\u0439\u0441\u044b)\u043d\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438)\u0410\u0432\u0442\u043e\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 (\u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438)\u0435\u0441\u0442\u044c, 80%+ \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0435\u0442\u043d\u0435\u0442\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (\u0433\u043e\u0442\u043e\u0432\u044b\u0435 PxL-\u0441\u043a\u0440\u0438\u043f\u0442\u044b)\u043d\u0435\u0442SLO-\u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433\u0435\u0441\u0442\u044c\u043d\u0435\u0442\u043d\u0435\u0442\u043d\u0435\u0442\u043d\u0435\u0442Service Map\u0435\u0441\u0442\u044c\u043d\u0435\u0442\u043d\u0435\u0442\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e (\u043f\u043e eBPF-\u0442\u0440\u0430\u0444\u0438\u043a\u0443)\u043d\u0435\u0442\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439ClickHouseS3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435object storage\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0435)ClickHouse (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439) + PostgreSQL (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u043d\u0430\u0440\u0435\u0439) + S3-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 (\u0441\u044b\u0440\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438)Self-hosted\u0435\u0441\u0442\u044c\u0435\u0441\u0442\u044c\u0435\u0441\u0442\u044c\u0435\u0441\u0442\u044c\u0435\u0441\u0442\u044c\u0414\u0432\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0441 eBPF-\u0441\u0431\u043e\u0440\u043e\u043c:\u00a0Pixie\u00a0\u2014 open-source eBPF-\u0430\u0432\u0442\u043e\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f Kubernetes (\u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043f\u043e\u0434\u0430\u0445);\u00a0Perforator\u00a0\u043e\u0442 Yandex \u2014 production-ready continuous profiling \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u043e\u0432 (\u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u043d\u043e\u0434), \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 Google-Wide Profiling, \u0441 \u0440\u0430\u0437\u043c\u043e\u0442\u043a\u043e\u0439 \u0441\u0442\u0435\u043a\u0430 \u0431\u0435\u0437 frame pointers \u0438 sPGO-\u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u0434\u043b\u044f PGO-\u0441\u0431\u043e\u0440\u043a\u0438.\u0414\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: eBPF \u0438 user-spaceCoroot \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0434\u0432\u0443\u043c\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:\u00a0eBPF\u00a0\u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 CPU \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u043d\u043e\u0434\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435, \u0430\u00a0\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438\u00a0\u0434\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u0432. \u041e\u0431\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0436\u0438\u0432\u0443\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u0433\u0435\u043d\u0442\u043e\u0432 Coroot \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a \u0447\u0443\u0436\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0441\u043d\u0430\u0440\u0443\u0436\u0438:Go heap\u00a0\u2014\u00a0coroot-node-agent\u00a0\u0447\u0438\u0442\u0430\u0435\u0442\u00a0runtime.MemProfile\u00a0\u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (\/proc\/&lt;pid&gt;\/mem), \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044fGo pprof\u00a0\u2014\u00a0coroot-cluster-agent\u00a0\u0441\u043a\u0440\u0435\u0439\u043f\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439\u00a0\/debug\/pprof\u00a0(CPU\/blocking\/mutex), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438Java\u00a0\u2014\u00a0coroot-node-agent\u00a0\u043d\u0430\u0445\u043e\u0434\u0438\u0442 HotSpot JVM \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u00a0libasync-profiler.so\u00a0\u0447\u0435\u0440\u0435\u0437 JVM Attach API (CPU\/alloc\/lock)Python\u00a0\u2014 eBPF-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u043e\u043b\u0432\u0438\u0442 Python-\u0444\u0440\u0435\u0439\u043c\u044b \u0447\u0435\u0440\u0435\u0437 Pyroscope eBPF-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440, \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u0432\u00a0coroot-node-agent\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u0414\u043b\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0435\u043c\u043e-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f:\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440.kubectl\u00a0\u0438\u00a0Helm\u00a0&gt;= 3;\u0427\u0430\u0441\u0442\u044c 1. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Coroot \u0432 Kubernetes\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430Coroot \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u00a0coroot-operator:coroot\u00a0\u2014 \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440: UI, API, \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438coroot-node-agent\u00a0\u2014 DaemonSet \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435: eBPF CPU-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a (\u043f\u043b\u044e\u0441 Go heap-\u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440, Python-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 Java \u0447\u0435\u0440\u0435\u0437 async-profiler), \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438, \u0442\u0440\u0435\u0439\u0441\u044bcoroot-cluster-agent\u00a0\u2014 Deployment: \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0430\u044f \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u044f + pprof-\u0441\u043a\u0440\u0435\u0439\u043f Go-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439Prometheus\u00a0\u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0440\u0438\u043aClickHouse\u00a0\u2014 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043b\u043e\u0433\u043e\u0432, \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 (+ clickhouse-keeper \u0434\u043b\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0446\u0438\u0438)\u0428\u0430\u0433 1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Coroot \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440Coroot \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 Helm. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c namespace \u0438 Secret \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:kubectl create namespace corootkubectl -n coroot create secret generic coroot-admin-secret \\  &#8212;from-literal=admin-password=&lt;\u043f\u0430\u0440\u043e\u043b\u044c-\u0430\u0434\u043c\u0438\u043d\u0430&gt;\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c\u00a0coroot-values.yaml.\u0424\u0430\u0439\u043b\u00a0coroot-values.yaml:metricsRefreshInterval: &#171;30s&#187;# Retention: \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 Coroot \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0435 \u0434\u043e\u043b\u044c\u0448\u0435 1 \u0447\u0430\u0441\u0430cacheTTL: &#171;1h&#187;      # TTL \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u044d\u0448\u0430 CoroottracesTTL: &#171;1h&#187;     # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0432 ClickHouselogsTTL: &#171;1h&#187;       # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u043b\u043e\u0433\u043e\u0432 \u0432 ClickHouseprofilesTTL: &#171;1h&#187;   # TTL \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0432 ClickHouseauthBootstrapAdminPasswordSecret:  name: coroot-admin-secret  key: admin-passwordingress:  className: traefik  host: coroot_url  path: \/clickhouse:  shards: 1  replicas: 1  keeper:    replicas: 1  storage:    size: &#171;20Gi&#187;prometheus:  retention: &#171;1h&#187;  storage:    size: &#171;10Gi&#187;storage:  size: &#171;10Gi&#187;# Java-\u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: node-agent \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 async-profiler \u0432 HotSpot JVMnodeAgent:  env:    &#8212; name: ENABLE_JAVA_ASYNC_PROFILER      value: &#171;true&#187;\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438 \u0441\u0430\u043c Coroot:# \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Coroot (\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 Coroot CR, node-agent, cluster-agent, Prometheus, ClickHouse)helm install coroot-operator oci:\/\/ghcr.io\/coroot\/charts\/coroot-operator \\  &#8212;version 0.9.10 -n coroot# Coroot CE: \u0447\u0430\u0440\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 Coroot CR (spec \u2014 \u0438\u0437 coroot-values.yaml)helm install coroot oci:\/\/ghcr.io\/coroot\/charts\/coroot-ce \\  &#8212;version 0.3.3 -n coroot -f coroot-values.yaml\u0428\u0430\u0433 2. Coroot CR \u0438 retention 1 \u0447\u0430\u0441Helm-\u0447\u0430\u0440\u0442\u00a0coroot-ce\u00a0\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442 Custom Resource\u00a0Coroot, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e:Retention \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 1 \u0447\u0430\u0441\u043e\u043c\u00a0\u0432 \u0442\u0440\u0451\u0445 \u043c\u0435\u0441\u0442\u0430\u0445: TTL \u0442\u0430\u0431\u043b\u0438\u0446 ClickHouse (logsTTL\/tracesTTL\/profilesTTL), \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u044d\u0448 (cacheTTL) \u0438 retention \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Prometheus (prometheus.retention: &#171;1h&#187;).\u041d\u044e\u0430\u043d\u0441 \u043f\u043e Prometheus: \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0432\u0443\u0445\u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u00a0prometheus.retention: &#171;1h&#187;\u00a0\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442 \u043c\u0435\u0442\u0440\u0438\u043a \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 ~2\u20134 \u0447\u0430\u0441\u0430.\u0428\u0430\u0433 3. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u0412 UI \u0432\u0445\u043e\u0434\u0438\u043c \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c\u00a0admin\u00a0\u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u0428\u0430\u0433\u0435 1 (admin-password). \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0443\u0436\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043b Prometheus \u0438 ClickHouse \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u00a0default, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c.\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Applications\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u00a0Applications\u00a0\u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0430, \u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u043f\u0430\u0440\u0443 \u043d\u044e\u0430\u043d\u0441\u043e\u0432.shortage\u00a0\u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 CPU\u00a0(\u043f\u043e\u0434\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u043c) \u2014 \u043d\u0435 \u00ab\u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438\u00bb, \u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438: \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0436\u0434\u0430\u043b\u0438 CPU, \u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0435\u0433\u043e. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u2014 \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433 \u043f\u043e \u043b\u0438\u043c\u0438\u0442\u0443 CPU \u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0446\u0438\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u043d\u043e\u0434\u0435.Latency \u043f\u0440\u043e\u0442\u0438\u0432 Net\u00a0\u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0449\u0438.\u00a0Latency\u00a0\u2014 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b).\u00a0Net\u00a0\u2014 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 round-trip time \u043d\u0430 TCP-\u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442: \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442, \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443\u00a0demo-golang\u00a0\u0438\u043c\u0435\u0435\u0442 Latency 5ms, \u043d\u043e Net &lt;0.1ms \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0435, \u0441\u0435\u0442\u044c \u043d\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442.IncidentsIncidents\u0412 Coroot \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u043c\u0438 (Incidents) \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 SLO-based alerting (\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0446\u0435\u043b\u0435\u0439 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f). \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0442\u0435\u043d \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 Coroot \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u00ab\u0441\u0442\u0440\u0430\u0434\u0430\u0435\u0442\u00bb \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.AlertsAlerts\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 Kubernetes \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0441\u0431\u043e\u0435\u0432.\u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043d\u0430\u0440\u0443\u0436\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438\u00a0Project Settings \u2192 Integrations: Slack, Microsoft Teams, PagerDuty, Opsgenie, webhook. \u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u00a0\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\u00a0\u0438 \u0442\u0438\u043f\u0430\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439:\u00a0Incidents,\u00a0Deployments,\u00a0Alerts. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0430\u043b\u0435\u0440\u0442\u043e\u0432: \u0438\u043d\u0441\u043f\u0435\u043a\u0446\u0438\u0438, \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0432 \u043b\u043e\u0433\u0430\u0445, Kubernetes-\u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 PromQL.Service MapService MapService Map \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430.\u0428\u0430\u0433 4. OpenTelemetry Collector\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u00a0OpenTelemetry Collector, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u2014 \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b \u043e\u0442 \u0432\u0441\u0435\u0445 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e OTLP\/HTTP (\u043f\u043e\u0440\u0442\u00a04318), \u0431\u0430\u0442\u0447\u0438\u0442 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0432 Coroot. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u2014 \u0432\u00a0otel-collector-values.yaml\u00a0\u0432 \u043a\u043e\u0440\u043d\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0config\u00a0\u0447\u0430\u0440\u0442\u0430\u00a0open-telemetry\/opentelemetry-collector, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c: \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u044b jaeger\/zipkin\/prometheus \u0438 pipelines logs\/metrics \u044f\u0432\u043d\u043e \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437\u00a0null, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e HTTP-\u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u0442\u0440\u0435\u0439\u0441\u043e\u0432).\u0424\u0430\u0439\u043b\u00a0otel-collector-values.yaml:mode: deployment# \u041a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (\u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 &lt;release&gt;-opentelemetry-collector).fullnameOverride: otel-collectorimage:  repository: otel\/opentelemetry-collector-contribconfig:  receivers:    otlp:      protocols:        http:          endpoint: 0.0.0.0:4318  exporters:    otlp_http\/coroot:      endpoint: &#171;http:\/\/coroot-coroot.coroot:8080&#187;  service:    pipelines:      # \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 pipelines logs\/metrics \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u2014 \u0433\u043b\u0443\u0448\u0438\u043c.      logs: null      metrics: null      # traces \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043e\u043a receivers \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c      # \u0446\u0435\u043b\u0438\u043a\u043e\u043c (\u0431\u0435\u0437 jaeger\/zipkin) \u0438 \u043c\u0435\u043d\u044f\u0435\u043c exporters \u043d\u0430 coroot.      traces:        receivers: [otlp]        processors: [batch]        exporters: [otlp_http\/coroot]\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440:helm repo add open-telemetry https:\/\/open-telemetry.github.io\/opentelemetry-helm-chartshelm install otel-collector open-telemetry\/opentelemetry-collector \\  &#8212;version 0.173.1 -n otel &#8212;create-namespace -f otel-collector-values.yaml\u041a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 OTLP\/HTTP \u043d\u0430\u00a04318\u00a0\u0432 namespace\u00a0otel. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443\u00a0http:\/\/otel-collector.otel:4318\/v1\/traces, \u0430 \u0441\u0430\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0431\u0430\u0442\u0447\u0438 \u0432 Coroot \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u00a0coroot-coroot.coroot:8080.\u041e\u0431\u0437\u043e\u0440 Tracing \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 4 demo \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a \u043f\u044f\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043e\u043a:OVERVIEWOVERVIEW\u00a0\u2014\u00a0HeatMap\u00a0\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u044b \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438; \u0432\u044b\u0434\u0435\u043b\u0438\u0432&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-496290","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=496290"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496290\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=496290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=496290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=496290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}