跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 beyla

Beyla

自动装置 一个应用程序的HTTP / gRPC / DB 流量与 Grafana Beyla eBPF ——没有代码更改,没有SDK,没有重启. 覆盖要求(Linux 5.8+与 BTF, CAP_SYS_ADMIN, 主机 PID),语言矩阵 (去/Java / Python / Ruby / Node /.NET / Rust / C++ / PHP),多克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克 在将可观察性添加到服务中时使用,无法再编译,将闭源二进制仪器,在不触碰应用程序的情况下将RED 度量衡+跨入Tempo/Mimir,或者将Beyla滚动为集成的DaemonSet——即使用户说"零码APM","仪器遗留应用","追踪这个二进制","eBPF可观察",或者"没有SDK"而不给Beyla取名.

5163 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

自动装置 一个应用程序的HTTP / gRPC / DB 流量与 Grafana Beyla eBPF ——没有代码更改,没有SDK,没有重启. 覆盖要求(Linux 5.8+与 BTF, CAP_SYS_ADMIN, 主机 PID),语言矩阵 (去/Java / Python / Ruby / Node /.NET / Rust / C++ / PHP),多克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克

何时用

在无法重新编译的服务中加入可观察性,将闭源二进制仪器,在不触摸应用程序的情况下将RED rims + 跨入Tempo/Mimir,或者将 Beyla 滚动作为整个集群的DaemonSet——即使用户表示"零码APM","仪器遗留应用","tr

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Grafana Beyla、Prerequisites、Common Workflows、1. Instrument a single binary with Docker、1. Run Beyla against the app's port (the app must already be running, listening on 8080)、2. Generate some traffic。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/kubernetes.md、references/config.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Auto-instrument an application's HTTP / gRPC / DB traffic with Grafana Beyla eBPF — no code changes, no SDK, no restart. Covers requirements (Linux 5.8+ with BTF, CAP_SYS_ADMIN, host PID), language matrix (Go / Java / Python / Ruby / Node / .NET / Rust / C++ / PHP), Docker + Helm + DaemonSet install, port- / process- / Kubernetes-metadata discovery, OTLP traces + Prometheus metrics export, routes decorator (cardinality control), trace sampling, and Grafana Cloud via Alloy. Use when adding observability to a service you can't recompile, instrumenting a closed-source binary, getting RED metrics + spans onto Tempo/Mimir without touching the app, or rolling Beyla as a cluster-wide DaemonSet — even when the user says "zero-code APM", "instrument legacy app", "trace this binary", "eBPF observability", or "no SDK" without naming Beyla.

Grafana BeylaPrerequisitesCommon Workflows1. Instrument a single binary with Docker1. Run Beyla against the app's port (the app must already be running, listening on 8080)2. Generate some traffic3. Verify Beyla emitted metrics — should list http_server_request_duration_seconds + counters4. Verify traces — in Grafana Explore on Tempo, search by service.name (default = process name)Or: query Tempo's search API for spans with service.name="<app>"2. Deploy as a cluster-wide DaemonSet1. Verify DaemonSet rollout2. Verify pods are Running, one per node

· 许可:Apache-2.0

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
beyla
description
Auto-instrument an application's HTTP / gRPC / DB traffic with Grafana Beyla eBPF — no code changes, no SDK, no restart. Covers requirements (Linux 5.8+ with BTF, CAP_SYS_ADMIN, host PID), language matrix (Go / Java / Python / Ruby / Node / .NET / Rust / C++ / PHP), Docker + Helm + DaemonSet install, port- / process- / Kubernetes-metadata discovery, OTLP traces + Prometheus metrics export, routes decorator (cardinality control), trace sampling, and Grafana Cloud via Alloy. Use when adding observability to a service you can't recompile, instrumenting a closed-source binary, getting RED metrics + spans onto Tempo/Mimir without touching the app, or rolling Beyla as a cluster-wide DaemonSet — even when the user says "zero-code APM", "instrument legacy app", "trace this binary", "eBPF observability", or "no SDK" without naming Beyla.
许可
Apache-2.0
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 2
  • references/kubernetes.md
  • references/config.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「beyla」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-72cc23d151019f8b-Beyla.html
请存为 .cursor/skills/beyla/SKILL.md 或 .claude/skills/beyla/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/grafana/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/grafana/skills' --list

npx skills add 'https://github.com/grafana/skills' --skill 'beyla'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: beyla license: Apache-2.0 description: Auto-instrument an application's HTTP / gRPC / DB traffic with Grafana Beyla eBPF — no code changes, no SDK, no restart. Covers requirements (Linux 5.8+ with BTF, CAP_SYS_ADMIN, host PID), language matrix (Go / Java / Python / Ruby / Node / .NET / Rust / C++ / PHP), Docker + Helm + DaemonSet install, port- / process- / Kubernetes-metadata discovery, OTLP traces + Prometheus metrics export, routes decorator (cardinality control), trace sampling, and Grafana Cloud via Alloy. Use when adding observability to a service you can't recompile, instrumenting a closed-source binary, getting RED metrics + spans onto Tempo/Mimir without touching the app, or rolling Beyla as a cluster-wide DaemonSet — even when the user says "zero-code APM", "instrument legacy app", "trace this binary", "eBPF observability", or "no SDK" without naming Beyla. --- # Grafana Beyla > **Docs**: https://grafana.com/docs/beyla/latest/ Zero-code HTTP / gRPC / DB instrumentation via eBPF. Emits OTLP traces + Prometheus metrics. ## Prerequisites - Linux kernel **5.8+** with BTF enabled (`ls /sys/kernel/btf/vmlinux` must exist) - Root or `CAP_SYS_ADMIN` (or `privileged: true` in Kubernetes + `hostPID: true`) - x86_64 or ARM64 - An OTLP receiver (Tempo, Alloy, OTel Collector) reachable from Beyla ## Common Workflows ### 1. Instrument a single binary with Docker ```bash # 1. Run Beyla against the app's port (the app must already be running, listening on 8080) docker run --privileged --pid=host \ -v /sys/kernel/debug:/sys/kernel/debug:ro \ -e BEYLA_OPEN_PORT=8080 \ -e BEYLA_PROMETHEUS_PORT=8999 \ -e OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 \ -p 8999:8999 \ grafana/beyla # 2. Generate some traffic curl http://localhost:8080/ ; curl http://localhost:8080/api/users/42 # 3. Verify Beyla emitted metrics — should list http_server_request_duration_seconds + counters curl -s http://localhost:8999/metrics | grep -E '^http_(server|client)_request_duration' # 4. Verify traces — in Grafana Explore on Tempo, search by service.name (default = process name) # Or: query Tempo's search API for spans with service.name="" ``` ### 2. Deploy as a cluster-wide DaemonSet Full DaemonSet + RBAC YAML lives in [`references/kubernetes.md`](references/kubernetes.md). After applying: ```bash # 1. Verify DaemonSet rollout kubectl -n monitoring rollout status ds/beyla # 2. Verify pods are Running, one per node kubectl -n monitoring get pods -l app=beyla -o wide # 3. Verify eBPF probes attached (no errors mentioning BTF or "permission denied") kubectl -n monitoring logs ds/beyla --tail=50 | grep -Ei 'error|fail|btf' || echo "clean" # 4. Verify telemetry is flowing — check the Tempo/Alloy receiver for spans from the cluster # Or scrape one pod directly: kubectl -n monitoring port-forward ds/beyla 8999:8999 & curl -s localhost:8999/metrics | head ``` ### 3. Send to Grafana Cloud via Alloy ```yaml # beyla-config.yml otel_traces_export: { endpoint: http://alloy:4318 } otel_metrics_export: { endpoint: http://alloy:4318 } ``` ```bash # Verify Alloy is forwarding — check Alloy UI (localhost:12345) for the # otelcol.receiver.otlp.beyla component showing received spans/metrics > 0. ``` Full Alloy + Beyla YAML: [`references/config.md`](references/config.md). ## Troubleshooting - `failed to load BPF object` → kernel < 5.8 or BTF missing; check `/sys/kernel/btf/vmlinux` - No spans in Tempo, but Prometheus metrics show → check `OTEL_EXPORTER_OTLP_ENDPOINT`, protocol (http vs grpc), and ports (4318 http / 4317 grpc) - HTTP route cardinality explosion → set `routes.unmatched: heuristic` and add patterns (see [`references/config.md`](references/config.md)) - Pod restarts with `CrashLoopBackOff` → likely missing `hostPID: true` or `privileged: true` / required capabilities ## Resources - [Beyla docs](https://grafana.com/docs/beyla/latest/) - [Beyla GitHub](https://github.com/grafana/beyla) - [`references/config.md`](references/config.md) — full config, env vars, samplers, routes decorator, generated metrics table, runtime matrix - [`references/kubernetes.md`](references/kubernetes.md) — DaemonSet + RBAC + discovery filters + Helm

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…