Skip to content

Add agent health during merge#2039

Merged
jefchien merged 2 commits intofeature/yamlfrom
jefchien/add-agenthealth
Mar 5, 2026
Merged

Add agent health during merge#2039
jefchien merged 2 commits intofeature/yamlfrom
jefchien/add-agenthealth

Conversation

@jefchien
Copy link
Contributor

Description of the issue

Following #2029, we want to retain the UserAgent attached to AWS requests.

Description of changes

  • Adds a new mergeAgentHealth that gets run on the result of the OTEL YAML merge.
  • Moves mergeConfigs into a separate merge.go.

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

Built and tested against a simple configuration

exporters:
    awscloudwatch:
        force_flush_interval: 1m0s
        max_datums_per_call: 1000
        max_values_per_datum: 150
        namespace: TestMerge
        region: us-east-1
        resource_to_telemetry_conversion:
            enabled: true
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: localhost:4317
      http:
        endpoint: localhost:4318
service:
  pipelines:
    metrics:
      receivers: [otlp]
      exporters: [awscloudwatch]

With AWS SDK debug logging on

2026-02-27T18:52:49Z I! DEBUG: Request monitoring/PutMetricData Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: monitoring.us-east-1.amazonaws.com
User-Agent: CWAgent/1.300064.1-15-gefad4e835-dirty-untracked (go1.25.7; linux; amd64) ID/<snip> inputs:(otlp) outputs:(awscloudwatch) feature:(otel_merge_yaml) aws-sdk-go/1.48.6 (go1.25.7; linux; amd64)
X-Amz-Agent-Stats: "cpu":0.6,"mem":105365504,"fd":12,"th":8,"ric":0

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.

@jefchien jefchien requested a review from a team as a code owner February 27, 2026 23:07
@jefchien jefchien added the ready for testing Indicates this PR is ready for integration tests to run label Feb 27, 2026
@jefchien jefchien merged commit d92cc3f into feature/yaml Mar 5, 2026
14 of 16 checks passed
@jefchien jefchien deleted the jefchien/add-agenthealth branch March 5, 2026 15:35
jefchien added a commit that referenced this pull request Mar 24, 2026
JayPolanco pushed a commit that referenced this pull request Mar 24, 2026
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.

3 participants