feat(obi): add OBI to otel-ecs-ec2 and otel-linux-standalone - #969
NimrodAvni78 wants to merge 6 commits into
Conversation
Adds opt-in OpenTelemetry eBPF Instrumentation (OBI, v0.10.0) to the two non-k8s shippers, coupled to each shipper's deploy mechanism (matching the existing k8s-helm subchart integration). otel-ecs-ec2: - OBI runs as a privileged sidecar in the existing collector task (already host-net/host-pid/privileged with all eBPF host mounts), exporting to the node-local collector at 127.0.0.1:4317/4318. - Config authored in values.yaml (obi.config) and rendered via `make obi-config` into obi/obi-config.yaml; written to the host by the launch-template user_data and bind-mounted read-only into the sidecar. - Terraform vars: enable_obi, obi_image, obi_image_version, obi_context_propagation, obi_config (full override). otel-linux-standalone: - OBI installed as an obi.service systemd unit (run as root); the release binary is downloaded (arch-detected) in user_data, mirroring the telemetrygen pattern. - Same helm-rendered config flow (make obi-config -> obi/obi-config.yaml), injected into user_data (base64+gzip). - Terraform vars: enable_obi, obi_version, obi_context_propagation, obi_config_path. Shared: - Full-parity OBI config with k8s (ebpf buffer sizes, payload_extraction incl GenAI, redis_db_cache, prometheus_export, gen_ai attribute select), dropping k8s-only bits and using host-process discovery (open_ports/exe_path). - Disabled by default; new obi/ subfolder + README per target. - Standalone chart versions bumped together (linux/windows/macos 0.0.46) to satisfy the version-check; ecs chart 0.0.41. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Live smoke test passed (both targets, Coralogix staging /
|
…ation The "Check Documentation formatting and links" job validates every .md file in the repo on each PR. It was failing on transient timeouts / 301 restructures of opentelemetry.io and kubernetes.io links in pre-existing files (root README.md, otel-integration/*) unrelated to this PR. Ignore those two domains in the mdox validator, matching the existing github.com "rate-limited" ignore rationale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds opt-in OpenTelemetry eBPF Instrumentation (OBI) integration to the non-Kubernetes shippers (ECS EC2 + Linux standalone), including config rendering via Helm and deployment wiring via Terraform/user-data, while bumping standalone chart versions in lockstep.
Changes:
- Add OBI configuration (values + Helm-gated ConfigMap) and generated
obi/obi-config.yamloutputs forotel-ecs-ec2andotel-linux-standalone. - Wire OBI deployment toggles into Terraform and bootstrapping (ECS sidecar; Linux systemd unit + binary download).
- Bump chart versions + changelogs (including macOS/Windows standalone alignment).
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| otel-windows-standalone/Chart.yaml | Bump chart version to align standalone releases. |
| otel-windows-standalone/CHANGELOG.md | Changelog entry for alignment bump. |
| otel-macos-standalone/Chart.yaml | Bump chart version to align standalone releases. |
| otel-macos-standalone/CHANGELOG.md | Changelog entry for alignment bump. |
| otel-linux-standalone/values.yaml | Add OBI config values (disabled by default). |
| otel-linux-standalone/terraform/variables.tf | Add Terraform variables controlling OBI install/runtime. |
| otel-linux-standalone/terraform/templates/user_data.sh.tmpl | Install OBI binary + configure/run obi.service when enabled. |
| otel-linux-standalone/terraform/main.tf | Pass rendered OBI config into user-data when enabled. |
| otel-linux-standalone/templates/obi-configmap.yaml | Helm-gated ConfigMap to render/extract OBI config via make obi-config. |
| otel-linux-standalone/README.md | Document OBI option and make obi-config. |
| otel-linux-standalone/obi/README.md | Detailed Linux-standalone OBI usage/config docs. |
| otel-linux-standalone/obi/obi-config.yaml | Generated default OBI config artifact. |
| otel-linux-standalone/Makefile | Add obi-config target and wire Terraform vars for OBI. |
| otel-linux-standalone/Chart.yaml | Bump chart version. |
| otel-linux-standalone/CHANGELOG.md | Changelog entry for OBI feature. |
| otel-ecs-ec2/values.yaml | Add OBI config values (disabled by default). |
| otel-ecs-ec2/terraform/variables.tf | Add Terraform variables controlling OBI sidecar behavior. |
| otel-ecs-ec2/terraform/README.md | Document OBI usage for ECS EC2 deployment. |
| otel-ecs-ec2/terraform/Makefile | Add example TF vars for enabling OBI and setting image tag. |
| otel-ecs-ec2/terraform/main.tf | Add OBI host config write + ECS sidecar container + log group when enabled. |
| otel-ecs-ec2/templates/obi-configmap.yaml | Helm-gated ConfigMap to render/extract OBI config via make obi-config. |
| otel-ecs-ec2/obi/README.md | Detailed ECS EC2 OBI usage/config docs. |
| otel-ecs-ec2/obi/obi-config.yaml | Generated default OBI config artifact. |
| otel-ecs-ec2/Makefile | Add obi-config target and include it in default make flow. |
| otel-ecs-ec2/Chart.yaml | Bump chart version. |
| otel-ecs-ec2/CHANGELOG.md | Changelog entry for OBI feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Reformat the Markdown tables in otel-ecs-ec2/obi/README.md and otel-linux-standalone/obi/README.md to mdox's canonical style so the 'Check Documentation formatting and links' job passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| app.kubernetes.io/part-of: obi | ||
| app.kubernetes.io/component: config | ||
| data: | ||
| obi-config.yml: | |
There was a problem hiding this comment.
Why is this needed? Lets not add templates here they should be in helm-charts
There was a problem hiding this comment.
im not sure how we usually template out this in linux and ecs?
should we use helm even if its not k8s? or terraform / something else
| `make otel-config` / `make manifest` renders are unaffected. | ||
| */ -}} | ||
| {{- if .Values.obi.enabled }} | ||
| apiVersion: v1 |
There was a problem hiding this comment.
this should be in opentelemetry-helm-charts or in your subchart?
There was a problem hiding this comment.
ill check but this just renders the config map even though its not k8s.
how should these configs be templated?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75285e25ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| default = "" | ||
|
|
||
| validation { | ||
| condition = !var.enable_obi || var.obi_config_path != "" |
There was a problem hiding this comment.
Avoid Terraform 1.9-only variable validation
For users running the documented minimum Terraform range (required_version >= 1.5.7 in this module), this cross-variable validation is rejected before planning: Terraform only added references to other variables in validation conditions in 1.9 (HashiCorp notes this as new in 1.9). That means Linux standalone deploys fail even when OBI is disabled on Terraform 1.5.7–1.8; either raise the required version to >= 1.9 or move this check to a resource precondition/local validation pattern.
Useful? React with 👍 / 👎.
| kernel.perf_event_paranoid=1 | ||
| SYSCTL | ||
| sysctl -p /etc/sysctl.d/99-ebpf.conf | ||
| ${var.enable_obi ? local.obi_user_data : ""} |
There was a problem hiding this comment.
Avoid launch-only writes for OBI config
When enable_obi (or obi_config) is changed on an already-applied ECS cluster, this launch-template user data is the only path that writes /etc/obi/obi-config.yml. Existing ASG instances do not rerun user data just because the launch template changes, and this ASG has no instance refresh, while the ECS daemon service can roll immediately to the task definition that bind-mounts /etc/obi; those hosts then start OBI with a missing or stale config until instances are manually replaced.
Useful? React with 👍 / 👎.
| obi_container = { | ||
| name = local.obi_name | ||
| image = "${var.obi_image}:${var.obi_image_version}" | ||
| essential = false |
There was a problem hiding this comment.
Add a restart policy for the OBI sidecar
If the OBI sidecar exits after the task starts, marking it non-essential keeps the collector task alive but does not restart OBI by itself; AWS documents that ECS container restart policies are not enabled by default and must be set explicitly (ECS restart policy docs). In any environment where OBI hits a transient eBPF/runtime failure, OBI telemetry stays off until the whole task is redeployed, so add a restartPolicy for this sidecar if it should recover independently.
Useful? React with 👍 / 👎.
…s-linux-standalone # Conflicts: # otel-ecs-ec2/CHANGELOG.md # otel-ecs-ec2/Chart.yaml # otel-linux-standalone/CHANGELOG.md # otel-linux-standalone/Chart.yaml # otel-macos-standalone/CHANGELOG.md # otel-macos-standalone/Chart.yaml # otel-windows-standalone/CHANGELOG.md # otel-windows-standalone/Chart.yaml
…ntation subchart Per review (Povilas): render the OBI config via the shared opentelemetry-ebpf-instrumentation subchart — the same chart the k8s-helm integration uses — instead of a bespoke values block + custom ConfigMap template, so the config is produced through Helm exactly like the collector config and the onboarding UI/backend can render it the same way. - Add opentelemetry-ebpf-instrumentation subchart dependency (0.1.18, from coralogix-charts-virtual so CI's helm dependency build resolves it) to both otel-ecs-ec2 and otel-linux-standalone, gated on opentelemetry-ebpf-instrumentation.enabled. - Replace hand-authored obi.config values with host overrides under the subchart alias (open_ports/exe_path discovery, 127.0.0.1 export endpoints, attributes.kubernetes.enable=false); ebpf/payload_extraction/redis_db_cache/ prometheus_export/health_check now come from the subchart defaults. - make obi-config extracts the subchart ConfigMap and strips the k8s network filter (cannot be removed via values). - Remove custom templates/obi-configmap.yaml; update READMEs and CHANGELOGs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
Adds opt-in OpenTelemetry eBPF Instrumentation (OBI, v0.10.0) to the two non-k8s shippers, coupled to each shipper's deploy mechanism so it isn't a separate product — mirroring the existing
otel-integration/k8s-helmOBI subchart integration. (Requested in this thread.)otel-ecs-ec2
coralogix_otel_agenttask (already host-net/host-pid/privileged with all eBPF host mounts), exporting to the node-local collector at127.0.0.1:4317/4318.values.yaml(obi.config), rendered viamake obi-config→obi/obi-config.yaml, written to the host by the launch-template user-data and bind-mounted read-only into the sidecar atOTEL_EBPF_CONFIG_PATH.enable_obi,obi_image,obi_image_version,obi_context_propagation,obi_config(full override).otel-linux-standalone
obi.servicesystemd unit (as root); the release binary is downloaded (arch-detected amd64/arm64) inuser_data.sh.tmpl, mirroring the existing telemetrygen pattern.make obi-config→obi/obi-config.yaml), injected into user-data (base64+gzip).enable_obi,obi_version,obi_context_propagation,obi_config_path.Shared
payload_extractionincl. GenAI,redis_db_cache,prometheus_export,gen_aiattribute select), dropping k8s-only pieces (Kubernetes metadata, k8s cache, k8s owner-name network filters) and using host-process discovery (open_ports/exe_path).obi/subfolder + README per target.0.0.46) to satisfy the standalone version-check; ecs chart →0.0.41.How Has This Been Tested?
Static validation (all passing):
helm lint+helm template(default and--set obi.enabled=true) for both charts.make obi-configrenders a valid OBI config for both targets; defaultmake otel-configoutput is unaffected (OBI ConfigMap is gated behindobi.enabled).tofu validatefor both terraform modules.user_datatemplate was rendered withenable_obi=trueand passesbash -n.Live smoke test (deploy each target with
enable_obi=trueand confirm OBI telemetry reaches Coralogix) is pending and will be run before marking ready for review.Checklist:
🤖 Generated with Claude Code