Skip to content

Commit

Permalink
Document new beyla_network_inter_zone_bytes metric
Browse files Browse the repository at this point in the history
  • Loading branch information
mariomac committed Feb 4, 2025
1 parent 6c4ea88 commit dad8c55
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/sources/configure/export-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The Beyla metrics exporter can export the following metrics data groups for proc
In Kubernetes environments, the OpenTelemetry service name set by the service name discovery is the best choice for service graph metrics.
- `application_process`: Metrics about the processes that runs the instrumented application
- `network`: Network-level metrics, refer to the [network metrics](/docs/beyla/latest/network/) configuration documentation to learn more
- `network_inter_zone`: Network inter-zone metrics. Refer to the [network metrics](/docs/beyla/latest/network/) configuration documentation to learn more

### Metrics instrumentation

Expand Down
16 changes: 11 additions & 5 deletions docs/sources/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The following table describes the exported metrics in both OpenTelemetry and Pro
| Application process | `process.disk.io` | `process_disk_io_bytes_total` | Counter | bytes | Disk bytes transferred |
| Application process | `process.network.io` | `process_network_io_bytes_total` | Counter | bytes | Network bytes transferred |
| Network | `beyla.network.flow.bytes` | `beyla_network_flow_bytes` | Counter | bytes | Bytes submitted from a source network endpoint to a destination network endpoint |
| Network | `beyla.network.inter.zone.bytes`| `beyla_network_inter_zone_bytes` | Counter | bytes | Bytes flowing between cloud availability zones in your cluster (Experimental, currently only available in Kubernetes) |

Beyla can also export [Span metrics](/docs/tempo/latest/metrics-generator/span_metrics/) and
[Service graph metrics](/docs/tempo/latest/metrics-generator/service-graph-view/), which you can enable via the
Expand Down Expand Up @@ -95,18 +96,18 @@ In order to configure which attributes to show or which attributes to hide, chec
| `beyla.network.flow.bytes` | `dst.port` | hidden |
| `beyla.network.flow.bytes` | `dst.zone` (only Kubernetes) | hidden |
| `beyla.network.flow.bytes` | `iface` | hidden |
| `beyla.network.flow.bytes` | `k8s.cluster.name` | shown if network metrics are enabled |
| `beyla.network.flow.bytes` | `k8s.cluster.name` | shown if Kubernetes is enabled |
| `beyla.network.flow.bytes` | `k8s.dst.name` | hidden |
| `beyla.network.flow.bytes` | `k8s.dst.namespace` | shown if network metrics are enabled |
| `beyla.network.flow.bytes` | `k8s.dst.namespace` | shown if Kubernetes is enabled |
| `beyla.network.flow.bytes` | `k8s.dst.node.ip` | hidden |
| `beyla.network.flow.bytes` | `k8s.dst.node.name` | hidden |
| `beyla.network.flow.bytes` | `k8s.dst.owner.type` | hidden |
| `beyla.network.flow.bytes` | `k8s.dst.type` | hidden |
| `beyla.network.flow.bytes` | `k8s.dst.owner.name` | shown if network metrics are enabled |
| `beyla.network.flow.bytes` | `k8s.dst.owner.name` | shown if Kubernetes is enabled |
| `beyla.network.flow.bytes` | `k8s.src.name` | hidden |
| `beyla.network.flow.bytes` | `k8s.src.namespace` | shown if network metrics are enabled |
| `beyla.network.flow.bytes` | `k8s.src.namespace` | shown if Kubernetes is enabled |
| `beyla.network.flow.bytes` | `k8s.src.node.ip` | hidden |
| `beyla.network.flow.bytes` | `k8s.src.owner.name` | shown if network metrics are enabled |
| `beyla.network.flow.bytes` | `k8s.src.owner.name` | shown if Kubernetes is enabled |
| `beyla.network.flow.bytes` | `k8s.src.owner.type` | hidden |
| `beyla.network.flow.bytes` | `k8s.src.type` | hidden |
| `beyla.network.flow.bytes` | `server.port` | hidden |
Expand All @@ -118,6 +119,11 @@ In order to configure which attributes to show or which attributes to hide, chec
| `beyla.network.flow.bytes` | `transport` | hidden |
| Traces (SQL, Redis) | `db.query.text` | hidden |

{{% admonition type="note" %}}

Check warning on line 122 in docs/sources/metrics.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Grafana.Shortcodes] Prefer `{{<` and `>}}` instead of `{{%!`(string={{% admonition type="note" %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. For more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition. If the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E). If you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules). Raw Output: {"message":"[Grafana.Shortcodes] Prefer `{{\u003c` and `\u003e}}` instead of `{{%!`(string={{% admonition type=\"note\" %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. \n\nFor more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition.\n\nIf the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E).\n\nIf you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules).","location":{"path":"docs/sources/metrics.md","range":{"start":{"line":122,"column":1}}},"severity":"WARNING"}
The `beyla.network.inter.zone.bytes` metric supports the same set of attributes as `beyla.network.flow.bytes`,
but all of them are hidden by default, except `k8s.cluster.name`, `src.zone` and `dst.zone`.
{{% /admonition %}}

Check warning on line 125 in docs/sources/metrics.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Grafana.Shortcodes] Prefer `{{<` and `>}}` instead of `{{%!`(string={{% /admonition %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. For more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition. If the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E). If you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules). Raw Output: {"message":"[Grafana.Shortcodes] Prefer `{{\u003c` and `\u003e}}` instead of `{{%!`(string={{% /admonition %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. \n\nFor more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition.\n\nIf the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E).\n\nIf you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules).","location":{"path":"docs/sources/metrics.md","range":{"start":{"line":125,"column":1}}},"severity":"WARNING"}

## Internal metrics

Beyla can be [configured to report internal metrics]({{< relref "./configure/internal-metrics-reporter.md" >}}) in Prometheus Format.
Expand Down
19 changes: 13 additions & 6 deletions docs/sources/network/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,20 @@ network metrics (in the previous example, `otel_metrics_export`, but it also acc

## Network metrics configuration properties

| YAML | Environment variable | Type | Default |
| -------- | ----------------------- | ------- | ------- |
| `enable` | `BEYLA_NETWORK_METRICS` | boolean | `false` |
To enable network metrics, you need to add one of the following `features` to either
the [otel_metrics_export]({{< relref "../configure/export-data.md" >}}))
or [prometheus_export]({{< relref "../configure/export-data.md#prometheus-http-endpoint" >}}))
configuration properties:

* `network` enables the `beyla_network_flow_bytes` metric: the number of bytes between two endpoints of your cluster.
* `network_inter_zone` enables `beyla_network_inter_zone_bytes` metric: the number of bytes between different
availability zones in your Cloud cluster.

{{% admonition type="caution" %}}

Check warning on line 56 in docs/sources/network/config.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Grafana.Shortcodes] Prefer `{{<` and `>}}` instead of `{{%!`(string={{% admonition type="caution" %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. For more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition. If the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E). If you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules). Raw Output: {"message":"[Grafana.Shortcodes] Prefer `{{\u003c` and `\u003e}}` instead of `{{%!`(string={{% admonition type=\"caution\" %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. \n\nFor more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition.\n\nIf the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E).\n\nIf you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules).","location":{"path":"docs/sources/network/config.md","range":{"start":{"line":56,"column":1}}},"severity":"WARNING"}
The `beyla_network_inter_zone_bytes` specification is currently in experimental and only available for Kubernetes cluster.
You might expect some breaking changes in future versions of Beyla.
{{% /admonition %}}

Check warning on line 59 in docs/sources/network/config.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Grafana.Shortcodes] Prefer `{{<` and `>}}` instead of `{{%!`(string={{% /admonition %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. For more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition. If the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E). If you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules). Raw Output: {"message":"[Grafana.Shortcodes] Prefer `{{\u003c` and `\u003e}}` instead of `{{%!`(string={{% /admonition %}}) and `%!}(string=)}` It has the most consistent semantics. The percent syntax is used for special behavior that isn't required with this shortcode. \n\nFor more information, refer to https://grafana.com/docs/writers-toolkit/write/shortcodes/#admonition.\n\nIf the rule is incorrect or needs improving, [report an issue](https://github.com/grafana/writers-toolkit/issues/new?title=Grafana.Shortcodes%20%3A%20%3CISSUE%3E).\n\nIf you have reason to diverge from the style guidance, to skip a rule, refer to [Skip rules](https://grafana.com/docs/writers-toolkit/review/lint-prose/#skip-rules).","location":{"path":"docs/sources/network/config.md","range":{"start":{"line":59,"column":1}}},"severity":"WARNING"}

Explicitly enables network metrics reporting in Beyla. You can also enable network metrics reporting
by adding `network` to the list of `features` for [otel_metrics_export]({{< relref "../configure/export-data.md" >}}))
or [prometheus_export]({{< relref "../configure/export-data.md#prometheus-http-endpoint" >}})).

| YAML | Environment variable | Type | Default |
| -------------------- | ---------------------------------- | -------- | ------------------- |
Expand Down
2 changes: 1 addition & 1 deletion pkg/beyla/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (c *Config) Validate() error {
return ConfigError(fmt.Sprintf("error in exclude_services YAML property: %s", err.Error()))
}
if !c.Enabled(FeatureNetO11y) && !c.Enabled(FeatureAppO11y) {
return ConfigError("missing at least one of BEYLA_NETWORK_METRICS, BEYLA_EXECUTABLE_NAME or BEYLA_OPEN_PORT property")
return ConfigError("missing to enable application discovery or network metrics. Check documentation")
}
if (c.Port.Len() > 0 || c.Exec.IsSet() || len(c.Discovery.Services) > 0) && c.Discovery.SystemWide {
return ConfigError("you can't use BEYLA_SYSTEM_WIDE if any of BEYLA_EXECUTABLE_NAME, BEYLA_OPEN_PORT or services (YAML) are set")
Expand Down

0 comments on commit dad8c55

Please sign in to comment.