Skip to content

Add support for configuring EFA receiver on EC2 via JSON#2093

Open
mitali-salvi wants to merge 3 commits intomainfrom
feature/efa-receiver-translator
Open

Add support for configuring EFA receiver on EC2 via JSON#2093
mitali-salvi wants to merge 3 commits intomainfrom
feature/efa-receiver-translator

Conversation

@mitali-salvi
Copy link
Copy Markdown
Contributor

Description of the issue

Add support for configuring the awsefareceiver via the CWA JSON configuration. Customers will be able to configure EFA (Elastic Fabric Adapter) metrics collection under metrics.metrics_collected.efa.

EFA is a distinct hardware type (Elastic Fabric Adapter) that exposes 22 cumulative monotonic sum
metrics via /sys/class/infiniband/ sysfs.

Collect all 22 EFA metrics with defaults:

json
{
  "metrics": {
    "metrics_collected": {
      "efa": {}
    }
  }
}

Collect specific metrics with a custom interval and selected metrics:

json
{
  "metrics": {
    "metrics_collected": {
      "efa": {
        "measurement": ["efa_tx_bytes", "efa_rx_bytes", "efa_rdma_read_bytes"],
        "metrics_collection_interval": 30
      }
    }
  }
}

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

  • Unit tests: 9 test cases all passing
  • Manual: deployed CWA to EC2 instance with EFA devices, generated traffic between two EFA-
    enabled instances, confirmed agent starts and collects metrics
Screenshot 2026-04-17 at 14 51 41

Requirements

Before commiting your code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

Integration Tests

To run integration tests against this PR, add the ready for testing label.

@mitali-salvi mitali-salvi requested a review from a team as a code owner April 17, 2026 18:52
@mitali-salvi mitali-salvi added the ready for testing Indicates this PR is ready for integration tests to run label Apr 17, 2026
Add a new translator that converts CloudWatch Agent JSON config to OTel
YAML config for the awsefareceiver. Customers can configure EFA metrics
collection under metrics.metrics_collected.efa with optional measurement
filtering and collection interval overrides.

The translator follows the existing awsnvme translator pattern:
- Reads from metrics::metrics_collected::efa config path
- Supports collection_interval with agent-level fallback (default 60s)
- Supports measurement filtering with efa_ prefix auto-detection
- Validates metric names against the 22 known EFA metrics
- Disables unselected metrics when measurement list is specified

Assisted-by: Kiro CLI
Register the EFA receiver in the host delta metrics pipeline alongside
diskio and net receivers. Add EFA as a recognized native OTel receiver
in the adapter layer and include efaKey in the cumulativetodelta
processor's default keys so EFA alone satisfies the delta pipeline
requirement.

Assisted-by: Kiro CLI
Add efaDefinitions to the JSON schema under metrics_collected. Unlike
other receivers, measurement is optional for EFA - an empty config
enables all 22 metrics by default.

Assisted-by: Kiro CLI
@mitali-salvi mitali-salvi force-pushed the feature/efa-receiver-translator branch from e6c81b3 to df22c22 Compare April 17, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for testing Indicates this PR is ready for integration tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant