Skip to content

[receiver/awsecscontainermetrics]Add ignore_missing_endpoint option #41149

@tanagumo

Description

@tanagumo

Component(s)

receiver/awsecscontainermetrics

Is your feature request related to a problem? Please describe.

Currently, awsecscontainermetricsreceiver fails to start when the ECS metadata endpoint is not available, which makes it difficult to use the same OpenTelemetry configuration across different environments (development, testing, staging, production).
The receiver throws an error like:
unable to detect task metadata endpoint:
This prevents the collector from starting in environments where ECS metadata endpoint is not available, such as:

Local development environments
Testing environments outside of ECS
CI/CD pipelines

Describe the solution you'd like

Add an optional ignore_missing_endpoint boolean configuration option that allows the receiver to start successfully even when the ECS metadata endpoint is not available. When this option is enabled and the endpoint is missing, the receiver should:

Log a warning message
Start successfully without collecting metrics
Maintain backward compatibility (default: false)

Proposed configuration:

receivers:
  awsecscontainermetrics:
    collection_interval: 20s
    ignore_missing_endpoint: true  # Optional, defaults to false

I have a complete implementation ready for this feature, including:

✅ Configuration option with proper defaults
✅ Backward compatibility maintained
✅ No-op RestClient implementation for missing endpoints
✅ Comprehensive test coverage

I'm ready to submit a PR if this feature request is approved.

Describe alternatives you've considered

No response

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions