Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
grafsean committed Jan 15, 2024
1 parent c787f57 commit b732707
Show file tree
Hide file tree
Showing 14 changed files with 155 additions and 149 deletions.
6 changes: 3 additions & 3 deletions docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Beyla offers the following features:

## Get started

* Follow the [language quickstart guides]({{< relref "./quickstart" >}}) for quick instructions
- Follow the [language quickstart guides]({{< relref "./quickstart" >}}) for quick instructions
about how to set up Beyla to instrument applications written in a particular language.

* Follow the [setup]({{< relref "./setup/_index.md" >}}) documentation to get started with Beyla either as a standalone
- Follow the [setup]({{< relref "./setup/_index.md" >}}) documentation to get started with Beyla either as a standalone
service, with Docker or with Kubernetes.

* Follow the [tutorials]({{< relref "./tutorial/_index.md" >}}) to get a complete guide to instrument an application with Beyla and data to Grafana Cloud.
- Follow the [tutorials]({{< relref "./tutorial/_index.md" >}}) to get a complete guide to instrument an application with Beyla and data to Grafana Cloud.

## Learn more about Grafana Beyla

Expand Down
1 change: 0 additions & 1 deletion docs/sources/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ For information on the metrics Beyla exports, see the [exported metrics]({{< rel
**Note**: If you will be using Beyla to generate traces, please make sure you've read our documentation section on configuring
the [Routes Decorator]({{< relref "../configure/options#routes-decorator" >}}). Since Beyla is auto-instrumenting your application without any
special language level support, configuring the low cardinality routes decorator is very important for optimal results.

129 changes: 67 additions & 62 deletions docs/sources/configure/options.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/sources/quickstart/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Copy the **Environment Variables** and keep it for the next step.

To run Beyla, first set the following environment variables:

* The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` variables copied from the previous step.
* `BEYLA_OPEN_PORT`: the port the instrumented service is using (for example, `80` or `443`). If using the example service in the first section of this guide, set this variable to `8080`.
- The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` variables copied from the previous step.
- `BEYLA_OPEN_PORT`: the port the instrumented service is using (for example, `80` or `443`). If using the example service in the first section of this guide, set this variable to `8080`.

To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.
To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.

Notice: Beyla requires administrative (sudo) privileges, or at least it needs to be granted the `CAP_SYS_ADMIN` capability.

Expand Down Expand Up @@ -98,7 +98,7 @@ After a few minutes traces will appear in Grafana Cloud. For example, in the tra
The exposed span name in Grafana Cloud is a generic `GET /**`, where it should say something like `GET /foo` (the path of the
test request URL).

Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.
Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.

Configure routing to tell Beyla about expected routes.

Expand Down
22 changes: 11 additions & 11 deletions docs/sources/quickstart/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Copy the **Environment Variables** and keep it for the next step.

To run Beyla, first set the following environment variables:

* The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
- The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
variables copied from the previous step.
* `BEYLA_OPEN_PORT`: the port the instrumented service is using
- `BEYLA_OPEN_PORT`: the port the instrumented service is using
(for example, `80` or `443`). If using the example service in the
first section of this guide, set this variable to `8080`.
first section of this guide, set this variable to `8080`.

To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.

Expand Down Expand Up @@ -89,16 +89,16 @@ size:0B svc=[{quickstart go lima-ubuntu-lts-8222}] traceparent=[00-0f82735dab57

The above trace shows:

* `2024-01-08 14:06:14.182614`: time of the trace
* `(432.191µs[80.421µs])`: total response time for the request, with the actual internal execution
- `2024-01-08 14:06:14.182614`: time of the trace
- `(432.191µs[80.421µs])`: total response time for the request, with the actual internal execution
time of the request (not counting the request enqueuing time)
* `200 GET /foo`: response code, HTTP method, and URL path
* `[127.0.0.1]->[localhost:8080]` source and destination host:port
* `size:0B`: size of the HTTP request body (0 bytes, as it was a `GET` request).
- `200 GET /foo`: response code, HTTP method, and URL path
- `[127.0.0.1]->[localhost:8080]` source and destination host:port
- `size:0B`: size of the HTTP request body (0 bytes, as it was a `GET` request).
For non-go programs, this size would also include the size of the request headers
* `svc=[{quickstart go lima-ubuntu-lts-8222}]`: `quickstart` service, written
- `svc=[{quickstart go lima-ubuntu-lts-8222}]`: `quickstart` service, written
in Go, with an automatically created service instance name `lima-ubuntu-lts-8222`
* `traceparent` as received by the parent request, or a new random one if the parent request didn't specify it
- `traceparent` as received by the parent request, or a new random one if the parent request didn't specify it

After a few minutes traces will appear in Grafana Cloud. For example, in the traces explorer:

Expand All @@ -109,7 +109,7 @@ After a few minutes traces will appear in Grafana Cloud. For example, in the tra
The exposed span name in Grafana Cloud is a generic `GET /**`, where it should say something like `GET /foo` (the path of the
test request URL).

Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.
Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.

Configure routing to tell Beyla about expected routes.

Expand Down
22 changes: 11 additions & 11 deletions docs/sources/quickstart/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Copy the **Environment Variables** and keep it for the next step.

To run Beyla, first set the following environment variables:

* The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
- The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
variables copied from the previous step.
* `BEYLA_OPEN_PORT`: the port the instrumented service is using
- `BEYLA_OPEN_PORT`: the port the instrumented service is using
(for example, `80` or `443`). If using the example service in the
first section of this guide, set this variable to `8080`.
first section of this guide, set this variable to `8080`.

To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.

Expand Down Expand Up @@ -88,15 +88,15 @@ size:80B svc=[{quickstart nodejs lima-ubuntu-lts-5074}] traceparent=[00-46214bd2

The above trace shows:

* `2024-01-09 10:31:33.19103133`: time of the trace
* `(3.254486ms[3.254486ms])`: total response time for the request
* `200 GET /foo`: response code, HTTP method, and URL path
* `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
* `size:80B`: size of the HTTP request (sum of the headers and the body)
* `svc=[{quickstart nodejs lima-ubuntu-lts-5074}]`: `quickstart` service, running in
- `2024-01-09 10:31:33.19103133`: time of the trace
- `(3.254486ms[3.254486ms])`: total response time for the request
- `200 GET /foo`: response code, HTTP method, and URL path
- `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
- `size:80B`: size of the HTTP request (sum of the headers and the body)
- `svc=[{quickstart nodejs lima-ubuntu-lts-5074}]`: `quickstart` service, running in
Node.js, with an automatically created service instance name
`lima-ubuntu-lts-5074`
* `traceparent` as received by the parent request, or a new random one if the parent request
- `traceparent` as received by the parent request, or a new random one if the parent request
didn't specify it

After a few minutes traces will appear in Grafana Cloud. For example, in the traces explorer:
Expand All @@ -108,7 +108,7 @@ After a few minutes traces will appear in Grafana Cloud. For example, in the tra
The exposed span name in Grafana Cloud is a generic `GET /**`, where it should say something like `GET /foo` (the path of the
test request URL).

Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.
Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.

Configure routing to tell Beyla about expected routes.

Expand Down
22 changes: 11 additions & 11 deletions docs/sources/quickstart/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Copy the **Environment Variables** and keep it for the next step.

To run Beyla, first set the following environment variables:

* The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
- The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
variables copied from the previous step.
* `BEYLA_OPEN_PORT`: the port the instrumented service is using
- `BEYLA_OPEN_PORT`: the port the instrumented service is using
(for example, `80` or `443`). If using the example service in the
first section of this guide, set this variable to `8080`.
first section of this guide, set this variable to `8080`.

To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.

Expand Down Expand Up @@ -86,15 +86,15 @@ size:80B svc=[{quickstart python lima-ubuntu-lts-5074}] traceparent=[00-46214bd2

The above trace shows:

* `2024-01-09 10:31:33.19103133`: time of the trace
* `(3.254486ms[3.254486ms])`: total response time for the request
* `200 GET /foo`: response code, HTTP method, and URL path
* `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
* `size:80B`: size of the HTTP request (sum of the headers and the body)
* `svc=[{quickstart python lima-ubuntu-lts-5074}]`: `quickstart` service, running in
- `2024-01-09 10:31:33.19103133`: time of the trace
- `(3.254486ms[3.254486ms])`: total response time for the request
- `200 GET /foo`: response code, HTTP method, and URL path
- `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
- `size:80B`: size of the HTTP request (sum of the headers and the body)
- `svc=[{quickstart python lima-ubuntu-lts-5074}]`: `quickstart` service, running in
Python, with an automatically created service instance name
`lima-ubuntu-lts-5074`
* `traceparent` as received by the parent request, or a new random one if the parent request
- `traceparent` as received by the parent request, or a new random one if the parent request
didn't specify it

After a few minutes traces will appear in Grafana Cloud. For example, in the traces explorer:
Expand All @@ -106,7 +106,7 @@ After a few minutes traces will appear in Grafana Cloud. For example, in the tra
The exposed span name in Grafana Cloud is a generic `GET /**`, where it should say something like `GET /foo` (the path of the
test request URL).

Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.
Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.

Configure routing to tell Beyla about expected routes.

Expand Down
22 changes: 11 additions & 11 deletions docs/sources/quickstart/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Copy the **Environment Variables** and keep it for the next step.

To run Beyla, first set the following environment variables:

* The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
- The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS`
variables copied from the previous step.
* `BEYLA_OPEN_PORT`: the port the instrumented service is using
- `BEYLA_OPEN_PORT`: the port the instrumented service is using
(for example, `80` or `443`). If using the example service in the
first section of this guide, set this variable to `8080`.
first section of this guide, set this variable to `8080`.

To facilitate local testing, set the `BEYLA_PRINT_TRACES=true` environment variable. This will cause Beyla to print traces to standard output.

Expand Down Expand Up @@ -86,15 +86,15 @@ size:80B svc=[{quickstart ruby lima-ubuntu-lts-5074}] traceparent=[00-46214bd237

The above trace shows:

* `2024-01-09 10:31:33.19103133`: time of the trace
* `(3.254486ms[3.254486ms])`: total response time for the request
* `200 GET /foo`: response code, HTTP method, and URL path
* `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
* `size:80B`: size of the HTTP request (sum of the headers and the body)
* `svc=[{quickstart ruby lima-ubuntu-lts-5074}]`: `quickstart` service, running in
- `2024-01-09 10:31:33.19103133`: time of the trace
- `(3.254486ms[3.254486ms])`: total response time for the request
- `200 GET /foo`: response code, HTTP method, and URL path
- `[127.0.0.1]->[127.0.0.1:8080]` source and destination host:port
- `size:80B`: size of the HTTP request (sum of the headers and the body)
- `svc=[{quickstart ruby lima-ubuntu-lts-5074}]`: `quickstart` service, running in
Ruby, with an automatically created service instance name
`lima-ubuntu-lts-5074`
* `traceparent` as received by the parent request, or a new random one if the parent request
- `traceparent` as received by the parent request, or a new random one if the parent request
didn't specify it

After a few minutes traces will appear in Grafana Cloud. For example, in the traces explorer:
Expand All @@ -106,7 +106,7 @@ After a few minutes traces will appear in Grafana Cloud. For example, in the tra
The exposed span name in Grafana Cloud is a generic `GET /**`, where it should say something like `GET /foo` (the path of the
test request URL).

Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.
Beyla groups any unknown URL path as `/**` to avoid unexpected cardinality explosions.

Configure routing to tell Beyla about expected routes.

Expand Down
25 changes: 13 additions & 12 deletions docs/sources/setup/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ follow the [Beyla and Kubernetes walkthrough tutorial]({{< relref "../tutorial/k
Contents:

<!-- TOC -->
* [Deploy Beyla in Kubernetes](#deploy-beyla-in-kubernetes)
* [Configuring Kubernetes metadata decoration](#configuring-kubernetes-metadata-decoration)
* [Deploying Beyla](#deploying-beyla)
* [Deploy Beyla as a sidecar container](#deploy-beyla-as-a-sidecar-container)
* [Deploy Beyla as a Daemonset](#deploy-beyla-as-a-daemonset)
* [Providing an external configuration file](#providing-an-external-configuration-file)
* [Providing secret configuration](#providing-secret-configuration)
<!-- TOC -->

- [Deploy Beyla in Kubernetes](#deploy-beyla-in-kubernetes)
- [Configuring Kubernetes metadata decoration](#configuring-kubernetes-metadata-decoration)
- [Deploying Beyla](#deploying-beyla)
- [Deploy Beyla as a sidecar container](#deploy-beyla-as-a-sidecar-container)
- [Deploy Beyla as a Daemonset](#deploy-beyla-as-a-daemonset)
- [Providing an external configuration file](#providing-an-external-configuration-file)
- [Providing secret configuration](#providing-secret-configuration)
<!-- TOC -->

## Configuring Kubernetes metadata decoration

Expand All @@ -40,6 +41,7 @@ Beyla can decorate your traces with the following Kubernetes labels:
- `k8s.pod.start_time`

To enable metadata decoration, you need to:

- Create a ServiceAccount and bind a ClusterRole granting list and watch permissions
for both Pods and ReplicaSets. You can do it by deploying this example file:

Expand Down Expand Up @@ -79,7 +81,7 @@ roleRef:
in another namespace).

2. Configure Beyla with the `BEYLA_KUBE_METADATA_ENABLE=true` environment variable,
or the `attributes.kubernetes.enable: true` YAML configuration.
or the `attributes.kubernetes.enable: true` YAML configuration.

3. Don't forget to specify the `serviceAccountName: beyla` property in your Beyla
Pod (as shown in the later deployment examples).
Expand All @@ -105,7 +107,6 @@ per each service instance.

{{< youtube id="d7clTdz0bA4" >}}


Deploying Beyla as a sidecar container has the following configuration
requirements:

Expand Down Expand Up @@ -184,6 +185,7 @@ For more information about the different configuration options, please check the
### Deploy Beyla as a Daemonset

You can also deploy Beyla as a Daemonset. This is the preferred way if:

- You want to instrument a Daemonset
- You want to instrument multiple processes from a single Beyla instance, or even
all the instrumentable processes in your cluster.
Expand Down Expand Up @@ -285,7 +287,7 @@ spec:
instrumentation: beyla
spec:
serviceAccountName: beyla
hostPID: true #important!
hostPID: true #important!
volumes:
- name: beyla-config
configMap:
Expand Down Expand Up @@ -343,4 +345,3 @@ env:
key: grafana-api-key
name: grafana-secret
```

8 changes: 4 additions & 4 deletions docs/sources/setup/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ go install github.com/grafana/beyla/cmd/beyla@latest

## Installing as a service

Once you have Beyla installed on your system, you can use the [systemd service script](https://github.com/grafana/beyla/tree/main/contrib/[email protected]) to get the daemon up and running. Installing the script is as simple as creating a file at `/etc/systemd/system/[email protected]` (the `@` is important!) and running `systemctl daemon-reload`.
Once you have Beyla installed on your system, you can use the [systemd service script](https://github.com/grafana/beyla/tree/main/contrib/[email protected]) to get the daemon up and running. Installing the script is as simple as creating a file at `/etc/systemd/system/[email protected]` (the `@` is important!) and running `systemctl daemon-reload`.

The systemd service expects the following requirements to be met:

* The `beyla` binary is in `/usr/local/bin` and is executable
* A directory exists at `/etc/beyla` to hold the various configuration files
- The `beyla` binary is in `/usr/local/bin` and is executable
- A directory exists at `/etc/beyla` to hold the various configuration files

The service script works in such a way that it will pick up the files named after the service name that follows the `@` sign. As an example, if we wanted to use Beyla to monitor a moodle installation, we would create a configuration file at `/etc/beyla/moodle.yaml` and place our environment variables in `/etc/beyla/moodle.env`, then start the service with the command `systemctl start [email protected]` - the service will automatically pick up the `moodle` related files and start monitoring.
The service script works in such a way that it will pick up the files named after the service name that follows the `@` sign. As an example, if we wanted to use Beyla to monitor a moodle installation, we would create a configuration file at `/etc/beyla/moodle.yaml` and place our environment variables in `/etc/beyla/moodle.env`, then start the service with the command `systemctl start [email protected]` - the service will automatically pick up the `moodle` related files and start monitoring.

If you want to add a second Beyla install on the same system monitoring a Django installation, you would create `/etc/beyla/django.yaml` and `/etc/beyla/django.env`, then start the service as `systemctl start beyla@django` and it will run alongside the existing Moodle Beyla but with the Django configuration.

Expand Down
2 changes: 0 additions & 2 deletions docs/sources/stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ for Linux kernel, or eBPF features of the Linux kernel, versions released at the
(see "detection of new programming languages" below).
- The type of telemetry data we produce, e.g. metrics and traces.


## Things considered unstable for 1.x:

- Any features marked as experimental in the documentation are subject to
Expand All @@ -43,4 +42,3 @@ for Linux kernel, or eBPF features of the Linux kernel, versions released at the
- The detection of new programming languages. We may add support for detecting
new programming languages, so the reported telemetry SDK language field may
change between minors for previously undetected languages.

Loading

0 comments on commit b732707

Please sign in to comment.