Skip to content

Add application-signals routing rules to awsproxy translator#1979

Merged
sky333999 merged 17 commits intoaws:mainfrom
liustve:add-application-signals-routing
Apr 10, 2026
Merged

Add application-signals routing rules to awsproxy translator#1979
sky333999 merged 17 commits intoaws:mainfrom
liustve:add-application-signals-routing

Conversation

@liustve
Copy link
Copy Markdown
Contributor

@liustve liustve commented Jan 8, 2026

DO NOT MERGE until amazon-contributing/opentelemetry-collector-contrib#403 is merged and released and dependencies are updated.

Description of the issue

The awsproxy extension currently routes all requests to X-Ray by default, but we will need to support the new upcoming Application Signals APIs in the future as well.

Description of changes

Configure awsproxy extension to support new Application Signals APIs in the default configuration.

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

  • Update translator unit test to support new configuration.
    E2E testing verified:
  • Built local CW Agent with following config:
{
  "agent": { "region": "us-east-1" },
  "logs": { "metrics_collected": { "application_signals": {} } },
  "traces": { "traces_collected": { "application_signals": {} } }
}

Ran following command:
./build/bin/linux_amd64/config-translator --input test_config.json --output /tmp/test_cwagent.toml

cat /tmp/amazon-cloudwatch-agent.yaml | grep -A 15 "additional_routing_rules"
        additional_routing_rules:
            - aws_endpoint: https://application-signals.us-east-1.api.aws
              paths:
                - list-instrumentation-configurations
                - report-instrumentation-configuration-status
              region: ""
              role_arn: ""
              service_name: application-signals
        aws_endpoint: ""
        certificate_file_path: ""
        endpoint: 0.0.0.0:2000
        imds_retries: 1
        local_mode: false
        profile: ""
        proxy_address: ""

Test X-Ray routing (default)

curl -X POST http://localhost:2000/GetSamplingRules -d '{}' -H "Content-Type: application/json"

{"NextToken":null,"SamplingRuleRecords":[{"CreatedAt":0.0,"ModifiedAt":0.0,"SamplingRule":{"Attributes":{},"FixedRate":0.05,"HTTPMethod":"*","Host":"*","Priority":10000,"ReservoirSize":1,"ResourceARN":"*","RuleARN":"arn:aws:xray:us-west-2:571600841604:sampling-rule/Default","RuleName":"Default","ServiceName":"*","ServiceType":"*","URLPath":"*","Version":1}}]}

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.

Configure awsproxy extension to route list-instrumentation-configurations
and report-instrumentation-configuration-status APIs to the application-signals
service endpoint.
@liustve liustve requested a review from a team as a code owner January 8, 2026 23:12
@github-actions
Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity.

@github-actions github-actions Bot added the Stale label Jan 17, 2026
@github-actions github-actions Bot removed the Stale label Jan 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

This PR was marked stale due to lack of activity.

@github-actions github-actions Bot added the Stale label Feb 4, 2026
@github-actions github-actions Bot removed the Stale label Mar 12, 2026
@srprash
Copy link
Copy Markdown
Contributor

srprash commented Mar 17, 2026

Not stale

@github-actions
Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity.

@github-actions github-actions Bot added the Stale label Mar 25, 2026
@github-actions github-actions Bot removed the Stale label Mar 30, 2026
Comment thread translator/translate/otel/extension/awsproxy/translator.go
liustve and others added 10 commits April 1, 2026 12:47
Update extension/awsproxy and internal/aws/proxy replace directives
to use the merged commit from amazon-contributing/opentelemetry-collector-contrib#403.
…encies

Update all replace directives for the amazon-contributing fork from
20260324204452-4a51934bf0ec to 20260402202404-5df55d5284ff to keep
them in sync. This includes the merged changes from
amazon-contributing/opentelemetry-collector-contrib#403.
Update all amazon-contributing fork dependencies
Update 7 golden YAML files to include the new additional_routing_rules
block in awsproxy/application_signals config. Set agent.Global_Config.Region
in translator_test.go so getRegion() returns a valid region for endpoint URL
construction.
Fix failing CI tests for additional_routing_rules
Update all amazon-contributing fork dependencies
@jefchien jefchien added the ready for testing Indicates this PR is ready for integration tests to run label Apr 10, 2026
@sky333999 sky333999 merged commit 0e07319 into aws:main Apr 10, 2026
37 of 44 checks passed
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.

6 participants