Skip to content

fix: add missing labels for target health - #3

Merged
gusfcarvalho merged 1 commit into
mainfrom
gc-fix-labels-to-target-health
May 28, 2026
Merged

fix: add missing labels for target health#3
gusfcarvalho merged 1 commit into
mainfrom
gc-fix-labels-to-target-health

Conversation

@gusfcarvalho

@gusfcarvalho gusfcarvalho commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced target health record labeling to ensure target IDs are accurately captured and assigned. This improvement enables proper disambiguation of targets sharing configuration identifiers and improves data clarity for health monitoring operations. Strengthened validation tests confirm correct behavior.

Review Change Stack

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a15dc8de-0f1c-46b2-95fd-a60193311244

📥 Commits

Reviewing files that changed from the base of the PR and between 063dfc1 and 6206a8c.

📒 Files selected for processing (2)
  • collector_test.go
  • input.go

📝 Walkthrough

Walkthrough

The PR adds a target_id label to target-health records to allow downstream consumers to distinguish targets that share the same target-group ARN. The label is populated in newTargetHealthRecord and validated by test assertions ensuring it appears only on target-health records, not on other resource types.

Changes

Target ID Label Addition

Layer / File(s) Summary
Target ID label for target-health records
input.go, collector_test.go
newTargetHealthRecord assigns record.Labels["target_id"] from the resolved target ID with inline comments explaining the purpose. Test assertions verify only target-health records include this label while load balancer, listener, and target group records do not.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A target finds its ID so bright,
Labels now distinguish left from right,
Tests assert what's true and what's not,
Each resource type gets its proper spot! 🎯


Comment @coderabbitai help to get the list of available commands and usage tips.

@gusfcarvalho
gusfcarvalho merged commit 50167a6 into main May 28, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant