OpenTelemetry eBPF Instrumentation (OBI) captures application network and protocol traffic at the kernel layer without modifying business code or injecting SDKs. This topic explains each configuration module for OBI deployed in Alibaba Cloud Container Service for Kubernetes (ACK) environments, covering field semantics, values, and tuning suggestions. OBI produces metrics and traces that comply with OpenTelemetry semantic conventions.
Prerequisites
This configuration runs by default in an ACK environment. It deploys OBI as a DaemonSet on each node and uses eBPF to collect traffic from all pods on the node at the kernel layer. Before you begin, confirm the following prerequisites.
Item | Requirement | Description |
Deployment mode | DaemonSet (node-level) | One OBI instance per node collects data from all workloads on that node. |
Configuration modules
This configuration consists of six top-level modules that control what metrics to collect, which instances to collect from, what labels to attach to data, how to consolidate routes, which protocols to parse at the kernel layer, and how to export traces.
Module | Responsibility | Key effect |
| Metric capability toggles | Enables application, network, and TCP RTT metrics |
| Collection target discovery and exclusion | Excludes the OBI namespace and Application Real-Time Monitoring Service (ARMS) component namespaces |
| Attribute decoration and filtering | Associates Kubernetes metadata; retains GenAI attributes in traces |
| HTTP route consolidation | Controls path cardinality to prevent metric dimension explosion |
| Kernel-layer payload extraction | Parses GenAI and JSON-RPC application-layer protocols |
Metrics capability
The metrics module uses the features list to specify the types of metrics that OBI collects. This example enables application, network, and TCP RTT metrics.
Configuration item | Description | Value | Notes and tuning recommendations |
| Application metrics | Enabled | Enables metric collection for the application dimension. |
| Network metrics | Enabled | Enables metric collection for the network dimension. |
| TCP RTT metrics | Enabled | Enables TCP RTT statistics collection. |
Namespace exclusion
discovery determines which processes or Pods OBI instruments. This example uses exclude_instrument to exclude namespaces, preventing OBI from collecting its own data and ARMS platform component data. This reduces unnecessary self-monitoring data and resource overhead.
Field | Purpose | Value | Notes |
| Excludes the namespace where OBI runs | Excluded | Prevents OBI from collecting its own data and avoids self-monitoring noise |
| Excludes the ARMS Application Monitoring operator components | Excluded | ack-onepilot is the ARMS agent management component and does not require business-level collection |
| Excludes ARMS Prometheus-related components | Excluded | Platform collection components; excluding them reduces self-collection overhead |
You can extend the exclusion list based on your environment. For example, add kube-system or other platform namespaces.
Use exclude_instrument (blocklist) when most namespaces need collection and only a few should be excluded. To collect only specific business namespaces, use a discovery.instrument allowlist instead.
Attribute configuration
attributes controls which attributes to attach to collected metrics and traces, and which attributes to retain in traces. This example enables Kubernetes metadata association and explicitly retains all GenAI semantic attributes in traces.
Field | Purpose | Value | Notes |
| Associates Kubernetes metadata (Pod, namespace, workload, node, and others) with data |
| (Recommended) Enable in ACK environments for Kubernetes dimension-based queries and drill-downs |
| Attribute allowlist for traces. | Retains all | Ensures that LLM call attributes such as provider, model, token, operation, and tool are fully included in traces |
gen_ai.* attributes follow OpenTelemetry GenAI semantic conventions and include attributes such as gen_ai.system (provider), gen_ai.request.model (model name), gen_ai.operation.name (operation type, such as chat or embeddings), and gen_ai.tool.name (tool calling name). Retaining these attributes is essential for LLM trace observability.
Route consolidation
routes consolidates HTTP request paths into route templates. This prevents unlimited growth of metric dimensions (cardinality) caused by variable segments such as IDs and UUIDs in paths. Uncontrolled cardinality significantly increases time-series database costs and slows down queries.
Field | Purpose | Value | Options | Notes |
| Processing strategy for paths that do not match any route template |
|
|
|
| Maximum number of distinct values allowed for a single path segment. Segments exceeding this threshold are collapsed into a wildcard. |
| Positive integer | Higher values retain more detail but increase cardinality. (Recommended) Use a lower threshold for high-variability segments such as IDs. |
Protocol parsing
ebpf.payload_extraction controls whether OBI extracts HTTP payloads at the kernel layer and parses application-layer protocol content. When enabled, OBI reconstructs semantic information such as LLM calls and MCP calls from plaintext HTTP messages. This is the foundation for non-intrusive GenAI observability.
Field | Purpose | Value | Options | Notes |
| Parses HTTP-based JSON-RPC 2.0 protocols |
|
| MCP and similar protocols are based on JSON-RPC. Enable to reconstruct method names and call semantics. |
| Parsing toggles for individual GenAI providers and call types | See the following table | Toggle per provider | Enable only the providers that you actually use to reduce unnecessary parsing overhead. |
| Kernel buffer size for HTTP payload extraction (bytes) |
| Positive integer (bytes) | LLM request and response bodies can be large. Allocate enough buffer to avoid payload truncation. Larger values increase memory usage. |
GenAI provider parsing toggles
The http.genai section provides individual toggles for payload parsing of different LLM providers and call types. The following items are enabled in this example. Enable only the providers that your workloads actually call.
Field | Parsing target | Value | Description |
| OpenAI-compatible interfaces |
| Covers vLLM, DashScope compatibility mode, local Ollama OpenAI-compatible endpoints, and similar services |
| OpenAI native API |
| Parses OpenAI official API calls |
| Anthropic Claude API |
| Parses Claude model calls |
| Retrieval calls (Retrieval / RAG) |
| Reconstructs vector retrieval and RAG retrieval stages |
| MCP (Model Context Protocol) calls |
| Based on JSON-RPC; use together with |
| Qwen DashScope native API |
| Parses Qwen model calls |
| Text embedding calls |
| Reconstructs text embedding stages |
| Google Gemini API |
| Parses Gemini model calls |
| Reranking calls |
| Reconstructs retrieval result reranking stages |
Custom gateways
If you route LLM calls through a self-hosted gateway (such as LiteLLM or vLLM), add a gateways list under openai_compatible to declare the hosts and ports of these gateways. OBI identifies traffic that matches the list and parses it as the corresponding gateway, producing correct GenAI semantic information even on non-official OpenAI-compatible endpoints.
genai:
openai_compatible:
enabled: true
gateways:
- host: litellm.example.com
provider: litellm
- host: localhost
port: 8080
provider: vllmhost is required. port and provider are optional.
Enabled instrumentation types
The instrumentations list under otel_traces_export determines which protocols and middleware OBI generates traces for. The following types are enabled in this example:
Instrumentation type | Target | Value |
| HTTP and HTTPS calls | Enabled |
| gRPC calls | Enabled |
| SQL database access | Enabled |
| Redis access | Enabled |
| Kafka messages | Enabled |
| MQTT messages | Enabled |
| MongoDB access | Enabled |
| Couchbase access | Enabled |
| Memcached access | Enabled |
| LLM (GenAI) calls | Enabled |
Complete configuration reference
The following is the complete OBI configuration described in this topic. You can copy and use it directly. Before you apply the configuration in production, adjust the exclusion list, GenAI toggles, and export parameters based on your namespaces, providers, and traffic volume.