-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for easier network metrics enablement #1013
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1013 +/- ##
==========================================
+ Coverage 80.18% 80.23% +0.04%
==========================================
Files 137 137
Lines 10932 10942 +10
==========================================
+ Hits 8766 8779 +13
+ Misses 1685 1683 -2
+ Partials 481 480 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion!
| -------- | ----------------------- | ------- | ------- | | ||
| `enable` | `BEYLA_NETWORK_METRICS` | boolean | `false` | | ||
|
||
Enables network metrics reporting in Beyla. | ||
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/options.md#otel-metrics-exporter" >}})) | ||
or [prometheus_export]({{< relref "../configure/options.md#prometheus-http-endpoint" >}})). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to keep this only for backwards-compatibility purposes, I'd even delete it from the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I should follow-up with a PR to remove the docs and also remove it from examples and the chart. Perhaps we do this work for 2.0?
Enabling network metrics could be confusing if the documentation isn't always properly read. Essentially we had an internal default of enabled metrics features "application,network", however to actually enable network metrics collection we had to explicitly turn on network monitoring. This duality created some friction. For example, we'd fail to enable properly network metrics with these configuration options:
If we read what the configuration says:
A properly working configuration would've been:
So kind of double enabling network metrics.
At the same time, the following configuration doesn't enable network metrics:
Since we are missing the flag to enable network metrics, even though we've specified in the features we want network metrics.
I think the correct way to enable any metric collection feature is to list it explicitly in the
features
section, e.g. "application,network" should enable both, no further option should be required.This PR resolves this, but to keep backwards compatibility I kept the explicit enablement of the network metrics via BEYLA_NETWORK_METRICS: "true", which is equivalent to adding the "network" keyword in the
features
section for both OTel and Prometheus export.