{"id":13508077,"url":"https://github.com/grafana/beyla","last_synced_at":"2026-04-16T23:05:30.174Z","repository":{"id":152281800,"uuid":"604178419","full_name":"grafana/beyla","owner":"grafana","description":"eBPF-based autoinstrumentation of web applications and network metrics","archived":false,"fork":false,"pushed_at":"2026-04-13T04:10:13.000Z","size":336494,"stargazers_count":1965,"open_issues_count":128,"forks_count":169,"subscribers_count":132,"default_branch":"main","last_synced_at":"2026-04-13T06:16:40.761Z","etag":null,"topics":["ebpf","metrics-gathering","observability","traces"],"latest_commit_sha":null,"homepage":"https://grafana.com/oss/beyla-ebpf/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-20T13:56:47.000Z","updated_at":"2026-04-10T22:09:05.000Z","dependencies_parsed_at":"2024-04-16T12:26:50.558Z","dependency_job_id":"836307d9-9ac0-4973-889e-ae6cca5d06aa","html_url":"https://github.com/grafana/beyla","commit_stats":{"total_commits":1157,"total_committers":48,"mean_commits":"24.104166666666668","dds":0.6819360414866034,"last_synced_commit":"fb456f19100ef2bd09ca839e749138aa317a3918"},"previous_names":["grafana/beyla","grafana/ebpf-autoinstrument"],"tags_count":213,"template":false,"template_full_name":null,"purl":"pkg:github/grafana/beyla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fbeyla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fbeyla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fbeyla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fbeyla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/beyla/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fbeyla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31907728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebpf","metrics-gathering","observability","traces"],"created_at":"2024-08-01T02:00:47.576Z","updated_at":"2026-04-16T23:05:30.129Z","avatar_url":"https://github.com/grafana.png","language":"Go","funding_links":[],"categories":["Go","C","observability","others","Observability"],"sub_categories":["Profiling \u0026 Continuous Performance Analysis"],"readme":"\u003cimg src=\"docs/sources/assets/logo.png\" height=226 alt=\"Grafana Beyla logo\"\u003e\n\n# Grafana Beyla\n\nOpen source zero-code automatic instrumentation with eBPF and OpenTelemetry.\n\n![status badge](https://github.com/grafana/beyla/actions/workflows/publish_dockerhub_release.yml/badge.svg)\n\n## Introduction\n\nBeyla is a vendor agnostic, eBPF-based, OpenTelemetry/Prometheus application auto-instrumentation tool, which lets you easily get started with Application Observability. \neBPF is used to automatically inspect application executables and the OS networking layer, allowing us to capture essential application observability events\nfor HTTP/S and gRPC services. From these captured eBPF events, we produce OpenTelemetry web transaction trace spans and Rate-Errors-Duration (RED) metrics. \nAs with most eBPF tools, all data capture and instrumentation occurs without any modifications to your application code or configuration.\n\n## Community\n\nTo engage with the Beyla community and to chat with us on our community Slack channel, \nplease invite yourself to the Grafana Slack, visit https://slack.grafana.com/ and join the #beyla channel.\n\nWe also run a monthly Beyla community call, on the second Wednesday of the month at **4pm UTC**. You can\nfind all of the details about our community call on the [Grafana Community Calendar](https://calendar.google.com/calendar/u/0/embed?src=grafana.com_n57lluqpn4h4edroeje6199o00@group.calendar.google.com).\n\n## Getting Started\n\nTo try out Beyla, you need to run a network service for Beyla to instrument.\nBeyla supports a wide range of programming languages (Go, Java, .NET, NodeJS, Python, Ruby, Rust, etc.),\nso if you already have an example service you can use it.\nIf you don't have an example, you can download and run `example-http-service.go` from the `examples/` directory:\n\n```\ncurl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/example-http-service/example-http-service.go\ngo run ./example-http-service.go\n```\n\nNext, generate some traffic. The following command will trigger a GET request to http://localhost:8080 every two seconds.\n\n```\nwatch curl -s http://localhost:8080\n```\n\nNow that we have an example running, we are ready to download and run Beyla.\n\nFirst, download and unpack the latest release from the [GitHub releases page](https://github.com/grafana/beyla/releases).\nThe release should contain the `./beyla` executable.\n\nBeyla supports multiple ways to find the service to be instrumented (by network port, executable name, process ID),\nand multiple exposition formats (Prometheus, OpenTelemetry metrics, Distributed Traces for Go, Single Span traces for \nother languages).\n\nFor getting started, we'll tell Beyla to instrument the service running on port 8080 (our example service) and expose metrics in Prometheus format on port 9400.\n\n```\nexport BEYLA_PROMETHEUS_PORT=9400\nexport BEYLA_OPEN_PORT=8080\nsudo -E ./beyla\n```\n\nNow, you should see metrics on [http://localhost:9400/metrics](http://localhost:9400/metrics).\n\nSee [Documentation](https://grafana.com/docs/beyla/) and the [tutorials](https://grafana.com/docs/beyla/latest/tutorial/) for more info.\n\n## Requirements\n\n- Linux with Kernel 5.8 or higher with [BTF](https://www.kernel.org/doc/html/latest/bpf/btf.html)\n  enabled, or Linux distributions running RedHat Enterprise Linux 4.18 kernels build 348 and above as they have the required kernel backports. These include CentOS, AlmaLinux, and Oracle Linux. BTF became enabled by default on most Linux distributions with kernel 5.14 or higher.\n  You can check if your kernel has BTF enabled by verifying if `/sys/kernel/btf/vmlinux` exists on your system.\n  If you need to recompile your kernel to enable BTF, the configuration option `CONFIG_DEBUG_INFO_BTF=y` must be\n  set.\n- eBPF enabled on the host.\n- For instrumenting Go programs, they must have been compiled with at least Go 1.17. We currently\n  support Go applications built with a major **Go version no earlier than 3 versions** behind the current\n  stable major release.\n- Some level of elevated permissions to execute the instrumenter:\n    - On host systems, running Beyla requires `sudo`.\n    - For Kubernetes we have detailed configuration example on how to run with minimum\n      required capabilities in the [examples/k8s/unprivileged.yaml](./examples/k8s/unprivileged.yaml) file.\n    - For docker compose, you need to setup Beyla as `privileged` container or grand the `SYS_ADMIN` capability.\n\n| Available Instrumentations                    | Supported  |\n|-----------------------------------------------|------------|\n| HTTP/HTTPS/HTTP2                              | ✅         |\n| gRPC                                          | ✅         |\n| SQL                                           | ✅         |\n| Redis                                         | ✅         |\n| Kafka                                         | ✅         |\n\nThe Go instrumentation is limited to certain specific libraries.\n\n| Available Go Instrumentations                       | Supported  |\n|-----------------------------------------------------|------------|\n| Standard Go `net/http`                              | ✅         |\n| [Gorilla Mux](https://github.com/gorilla/mux)       | ✅         |\n| [Gin](https://gin-gonic.com/)                       | ✅         |\n| [gRPC-Go](https://github.com/grpc/grpc-go)          | ✅         |\n| [Go x/net/http2](https://golang.org/x/net/http2)    | ✅         |\n| [Go-Redis v9](github.com/redis/go-redis)            | ✅         |\n| [Sarama Kafka](github.com/IBM/sarama)               | ✅         |\n| [kafka-Go](https://github.com/segmentio/kafka-go)   | ✅         |\n\nHTTPS instrumentation is limited to Go programs and libraries/languages using libssl3.\n\n## Kubernetes\n\nYou can just trigger the Kubernetes descriptors in the `deployments/` folder.\n\n1. Provide your Grafana credentials. Use the following [K8s Secret template](deployments/01-grafana-credentials.template.yml)\n   to introduce the endpoints, usernames and API keys for Mimir and Tempo:\n   ```\n   $ cp deployments/01-grafana-credentials.template.yml 01-grafana-credentials.yml\n   $ # EDIT the fields\n   $ vim 01-grafana-credentials.yml\n   $ kubectl apply -f 01-grafana-credentials.yml \n   ```\n2. Deploy the Grafana Agent:\n   ```\n   kubectl apply -f deployments/02-grafana-agent.yml\n   ```\n\n3. Deploy a demo app with the auto-instrumenter as a sidecar. You can use the blog example in the\n   [deployments/03-instrumented-app.yml](./deployments/03-instrumented-app.yml) file.\n   \n   ```\n   $ kubectl apply -f ./deployments/03-instrumented-app.yml\n   $ kubectl port-forward service/goblog 8443:8443\n   ```\n\nYou should be able to query traces and metrics in your Grafana board.\n\n## Building Beyla from scratch\n\n### Development environment requirements\n\n#### Minimum requirements\n- go 1.23\n- docker\n- GNU make\n#### Optional requirements\n- llvm \u003e= 19\n- clang \u003e= 19\n### Quickstart\n```\n$ git clone https://github.com/grafana/beyla.git\n$ cd beyla/\n$ make dev\n```\n\n#### Common `Makefile` targets\n\nBeyla's `Makefile` provides several specific-purpose build targets. The most common ones are:\n- `prereqs` - install the build pre-requisites\n- `docker-generate` - regenerates the eBPF binaries (_preferred method_)\n- `generate` - regenerates the eBPF binaries [^1]\n- `compile` - compiles the `beyla` binary (but does not automatically regenerates the eBPF binaries)\n- `dev` - equivalent to `make prereqs \u0026\u0026 make docker-generate \u0026\u0026 make compile`\n- `test` - runs unit tests\n- `integration-tests` - runs integration tests - may require `sudo`\n- `clang-format` - formats C (eBPF) source code[^1]\n\n[^1]: Requires llvm/clang\n####  Quickstart\n\n```\n$ git clone https://github.com/grafana/beyla.git\n$ cd beyla/\n$ make dev\n```\n\nAs described in the previous section, `make dev` takes care of setting up the build pre-requisites, including deploying a `clang-format` pre-commit hook.\n\nAfter a successful compilation, binaries can be found in the `bin/` subdirectory.\n\n#### Formatting and linting code\n\nBeyla uses linters to enforce our coding style and best practices:\n- `golangci-lint` for Go code\n- `clang-format` for formatting C code\n- `clang-tidy` for static analysis of the C code\n\nAll of them are enforced on pull requests as part of the Beyla github workflows. Additionally, you can invoke the linters manually:\n\n- `make lint` invokes `golangci-lint` on the Go code\n- `make clang-tidy` invokes `clang-tidy` on the C/eBPF code\n\n`clang-format` is invoked automatically as a `pre-commit` git hook, you can run it directly by using the `Makefile` `clang-format` target.\n\n#### Running VM tests\n\nIn addition to the `test` and `integration-test` `Makefile` targets, Beyla also runs select tests on QEMU virtual machines in order to be able to test different kernel versions. These tests are also part of our GitHub workflow, but it is also possible to run them manually using the following command:\n\n```\n$ sudo make -C test/vm KERNEL_VER=...\n```\n\nwhere `KERNEL_VER` is one of the supported kernel versions located in `test/vm/kernels`. For example, to run tests against kernel version 5.15.152, simply do:\n\n```\n$ sudo make -C test/vm KERNEL_VER=5.15.152\n```\n\n## Credits\n\nPart of the code is taken from: https://github.com/open-telemetry/opentelemetry-go-instrumentation\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fbeyla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fbeyla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fbeyla/lists"}