Skip to content

[receiver/awsecscontainermetrics] Add instance_level_metrics config option#48407

Open
ollypom wants to merge 1 commit into
open-telemetry:mainfrom
ollypom:instance-level-metrics
Open

[receiver/awsecscontainermetrics] Add instance_level_metrics config option#48407
ollypom wants to merge 1 commit into
open-telemetry:mainfrom
ollypom:instance-level-metrics

Conversation

@ollypom
Copy link
Copy Markdown

@ollypom ollypom commented May 15, 2026

Description

Adds instance_level_metrics config option to the awsecscontainermetrics receiver. When enabled, the receiver queries the /tasks and /tasks/stats endpoints (available to Managed Daemon Services on ECS Managed Instances) to collect metrics for all tasks on the instance, not just the receiver's own task.

Link to tracking issue

Fixes #48396

Testing

  • Unit tests for GetInstanceStats() in stats_provider_test.go (success, failure, invalid JSON)
  • Integration test for collectInstanceLevelMetrics in receiver_test.go
  • Config unmarshalling test for the new option
  • All existing tests pass, lint clean

Documentation

  • Added instance_level_metrics config option to README with usage example
  • Changelog entry added

@ollypom ollypom requested a review from a team as a code owner May 15, 2026 14:53
@ollypom ollypom requested a review from axw May 15, 2026 14:53
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 15, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ollypom / name: Olly Pomeroy (f6a3b30)

@github-actions github-actions Bot added the first-time contributor PRs made by new contributors label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

  • Read our Contributing Guidelines.
  • Sign the CLA if you haven't already.
  • First-time contributors should have at most one PR not marked as draft until their first PR is merged.
  • If your change isn't one of our priority components, reviews may take more time.
  • Give reviewers at least a few days before pinging them for feedback.
  • If you need help or struggle to move your PR forward, raise the topic on #otel-collector-dev or a Collector SIG meeting.

…ption

Add support for collecting metrics from all tasks on an ECS Managed Instance
by querying the /tasks and /tasks/stats endpoints available to Managed Daemon
Services. When instance_level_metrics is enabled, the receiver fetches
instance-wide container stats instead of only the receiver's own task.
@ollypom ollypom force-pushed the instance-level-metrics branch from 8fcfb20 to 58a71e7 Compare May 18, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

awsecscontainermetrics receiver: Support daemon-only /tasks/stats endpoint for instance-wide container metrics

2 participants