Skip to main content
The Network Metrics rule enables network flow metrics and TCP stats metrics for matching workloads. These metrics are collected in odiglet and exported over OTLP alongside other workload telemetry. Learn more about the underlying collectors and metric families in the OBI instrumentation guide.

Considerations

Before enabling network metrics, please note the following:
  • Enable the cluster infrastructure in Helm by setting metricsSources.networkMetrics.enabled to true (it defaults to disabled).

Configuration Options

networkMetrics object : Enable network flow and TCP stats metrics for scoped workloads. Setting this field (even as an empty object {}) enables collection; omit it to leave metrics disabled.
Multiple rules merge with OR semantics: if any matching rule enables network metrics, they are enabled for that source/language.

Cluster infrastructure for network flow metrics

Network flow metrics require odiglet to run with hostNetwork, which makes the pod share the host’s network namespace instead of getting its own. Configure this once at the cluster level in Helm:
The InstrumentationRule alone is not enough for network flow metrics without that Helm setting.

Basic Example

Create InstrumentationRule resources in the Odigos installation namespace (typically odigos-system). Rules in other namespaces are not picked up by Odigos.
The following example enables network metrics cluster-wide for all workloads.
1

Enable network metrics infrastructure

Set metricsSources.networkMetrics.enabled to true in your Odigos Helm values and upgrade the release.
2

Create the InstrumentationRule

Create a YAML file with the following content:
network-metrics.yaml
3

Apply the rule

Network metrics collection will run on any new pod created after the rule is applied. Existing pods will not be affected and require a restart to initiate metrics collection.

Scoped Example

To limit the rule to a single workload, add scopes. Omit scopes (or leave it empty) to apply the rule cluster-wide.
network-metrics-scoped.yaml
Apply with:

Exported Metrics

When this rule is enabled, the following metrics are exported for matching workloads:
These metrics are collected using OBI. See the OBI instrumentation guide to learn more about the collectors, metric families, and available attributes.