beyla

GitHub

通过eBPF技术对HTTP/gRPC/DB流量进行零代码自动插桩,无需修改源码或重启应用。支持Docker及K8s DaemonSet部署,将OTLP追踪和Prometheus指标发送至Grafana Cloud或Tempo/Mimir,适用于遗留系统或闭源二进制文件的可观测性接入。

skills/grafana-core/beyla/SKILL.md grafana/skills

Trigger Scenarios

为无法重新编译的服务添加可观测性 对闭源二进制文件进行追踪 实现零代码APM 在集群范围内部署eBPF可观测性代理

Install

npx skills add grafana/skills --skill beyla -g -y
More Options

Non-standard path

npx skills add https://github.com/grafana/skills/tree/main/skills/grafana-core/beyla -g -y

Use without installing

npx skills use grafana/skills@beyla

指定 Agent (Claude Code)

npx skills add grafana/skills --skill beyla -a claude-code -g -y

安装 repo 全部 skill

npx skills add grafana/skills --all -g -y

预览 repo 内 skill

npx skills add grafana/skills --list

SKILL.md

Frontmatter
{
    "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

# 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="<app>"

2. Deploy as a cluster-wide DaemonSet

Full DaemonSet + RBAC YAML lives in references/kubernetes.md. After applying:

# 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

# beyla-config.yml
otel_traces_export:  { endpoint: http://alloy:4318 }
otel_metrics_export: { endpoint: http://alloy:4318 }
# 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.

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)
  • Pod restarts with CrashLoopBackOff → likely missing hostPID: true or privileged: true / required capabilities

Resources

Version History

  • b583762 Current 2026-07-06 00:35

Same Skill Collection

skills/grafana-app-sdk/admission-control/SKILL.md
skills/grafana-cloud/loki-label-analyzer/SKILL.md
skills/grafana-cloud/send-data/SKILL.md
skills/grafana-datasources/datasources-provisioning/SKILL.md
skills/grafana-lgtm/loki/SKILL.md
skills/grafana-lgtm/prometheus/SKILL.md
skills/grafana-plugins/audit-and-reduce-dependencies/SKILL.md
skills/grafana-plugins/check-npm/SKILL.md
template/SKILL.md
skills/grafana-app-sdk/app-sdk-concepts/SKILL.md
skills/grafana-app-sdk/cue-kind-definition/SKILL.md
skills/grafana-app-sdk/reconciler-logic/SKILL.md
skills/grafana-cloud/adaptive-metrics/SKILL.md
skills/grafana-cloud/admin/SKILL.md
skills/grafana-cloud/app-observability/SKILL.md
skills/grafana-cloud/assistant-mcp/SKILL.md
skills/grafana-cloud/cloud-integrations/SKILL.md
skills/grafana-cloud/cost-management/SKILL.md
skills/grafana-cloud/database-observability/SKILL.md
skills/grafana-cloud/dpm-finder/SKILL.md
skills/grafana-cloud/fleet-management/SKILL.md
skills/grafana-cloud/infrastructure/SKILL.md
skills/grafana-cloud/ml-ai/SKILL.md
skills/grafana-cloud/oncall-irm/SKILL.md
skills/grafana-cloud/private-connectivity/SKILL.md
skills/grafana-cloud/prometheus-cardinality-troubleshooter/SKILL.md
skills/grafana-cloud/prometheus-label-strategy/SKILL.md
skills/grafana-cloud/synthetic-monitoring-checks/SKILL.md
skills/grafana-cloud/testing/SKILL.md
skills/grafana-core/alerting-irm/SKILL.md
skills/grafana-core/alloy/SKILL.md
skills/grafana-core/dashboarding/SKILL.md
skills/grafana-core/grafana-oss/SKILL.md
skills/grafana-core/opentelemetry/SKILL.md
skills/grafana-core/promql/SKILL.md
skills/grafana-core/skill-authoring/SKILL.md
skills/grafana-k6/k6-cloud-investigate-test/SKILL.md
skills/grafana-k6/k6-docs/SKILL.md
skills/grafana-k6/k6-manage/SKILL.md
skills/grafana-k6/k6-perf-test-website/SKILL.md
skills/grafana-k6/k6-test-maintenance/SKILL.md
skills/grafana-k6/k6-trend-analysis/SKILL.md
skills/grafana-k6/k6/SKILL.md
skills/grafana-lgtm/mimir/SKILL.md
skills/grafana-lgtm/pyroscope/SKILL.md
skills/grafana-lgtm/tempo/SKILL.md
skills/grafana-plugins/grafana-scenes/SKILL.md
skills/grafana-plugins/plugin-bundle-size/SKILL.md
skills/grafana-plugins/react-19-plugin-migration/SKILL.md

Metadata

Files
0
Version
80bb293
Hash
7a8803e5
Indexed
2026-07-06 00:35

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 12:53
浙ICP备14020137号-1 $Гость$