Skip to content

Conversation

@paulojmdias
Copy link
Member

@paulojmdias
Copy link
Member Author

Moved to draft to check the test errors

@paulojmdias paulojmdias marked this pull request as draft October 8, 2025 14:40
Signed-off-by: Paulo Dias <[email protected]>
…-contrib into chore/exporter/awsxrayexporter

Signed-off-by: Paulo Dias <[email protected]>
@paulojmdias
Copy link
Member Author

paulojmdias commented Oct 9, 2025

@paulojmdias paulojmdias marked this pull request as ready for review October 9, 2025 23:37
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil"
)

func setSkipTimestampValidation(tb testing.TB, value bool) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this test failing intermittently before? not sure i understand why the refactor in this PR would have caused the tests to fail where they hadn't before 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure was not caused by this PR. I can reproduce it locally directly from the main branch. 🤔

I ran gotestsum as make run-changed-tests was doing nothing.

❯ ../../.tools/gotestsum --packages="./..." -- -race -timeout 900s -parallel 4 -count=3
∅  internal/metadata
✓  internal/translator (1.647s)
✖  . (3.537s)

=== Failed
=== FAIL: . TestXrayAndW3CSpanTraceResourceExtraction (0.00s)
    awsxray_test.go:58:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray_test.go:58
        	Error:      	"[{"name":"/users/junit","id":"0d226912b0c77a4f","start_time":1760650419,"service":{"version":"v1"},"trace_id":"1-68f1650c-ebf18704c6a03c6866925d7d","end_time":1760650509,"http":{"request":{"method":"GET","url":"https://api.example.com/users/junit"},"response":{"status":200,"content_length":0}},"fault":false,"error":false,"throttle":false,"aws":{"xray":{"auto_instrumentation":false},"account_id":"999999998"},"namespace":"remote","parent_id":"1153bc3dcdac2878","type":"subsegment"}
        	            	 {"name":"signup_aggregator","id":"a1cce7188fd5b544","start_time":1760650419,"service":{"version":"v1"},"trace_id":"1-68f1650c-f848e39bd59de27743b1dea3","end_time":1760650509,"http":{"request":{"x_forwarded_for":true,"method":"GET","url":"https://api.example.com/users/junit","client_ip":"192.168.15.32"},"response":{"status":200,"content_length":0}},"fault":false,"error":false,"throttle":false,"aws":{"xray":{"auto_instrumentation":false},"account_id":"999999998"},"metadata":{"default":{"otel.resource.cloud.account.id":"999999998","otel.resource.cloud.availability_zone":"us-west-1b","otel.resource.cloud.provider":"aws","otel.resource.cloud.region":"us-west-2","otel.resource.container.image.name":"otel/signupaggregator","otel.resource.container.image.tag":"v1","otel.resource.container.name":"signup_aggregator","otel.resource.service.name":"signup_aggregator"}},"parent_id":"f7b0b80664736000"}
        	            	]" should have 4 item(s), but has 2
        	Test:       	TestXrayAndW3CSpanTraceResourceExtraction
        	Messages:   	4 spans have xray/w3c trace id

=== FAIL: . TestW3CSpanTraceResourceExtraction (0.00s)
    awsxray_test.go:64:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray_test.go:64
        	Error:      	"[]" should have 2 item(s), but has 0
        	Test:       	TestW3CSpanTraceResourceExtraction
        	Messages:   	2 spans have w3c trace id

=== FAIL: . TestCreateDefaultConfig (0.00s)
    factory_test.go:25:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/factory_test.go:25
        	Error:      	Not equal:
        	            	expected: &awsxrayexporter.Config{AWSSessionSettings:awsutil.AWSSessionSettings{NumberOfWorkers:8, Endpoint:"", RequestTimeoutSeconds:30, MaxRetries:2, NoVerifySSL:false, ProxyAddress:"", Region:"", LocalMode:false, ResourceARN:"", RoleARN:"", ExternalID:""}, IndexedAttributes:[]string(nil), IndexAllAttributes:false, LogGroupNames:[]string(nil), TelemetryConfig:telemetry.Config{Enabled:false, IncludeMetadata:false, Contributors:[]component.ID(nil), Hostname:"", InstanceID:"", ResourceARN:""}, skipTimestampValidation:true}
        	            	actual  : &awsxrayexporter.Config{AWSSessionSettings:awsutil.AWSSessionSettings{NumberOfWorkers:8, Endpoint:"", RequestTimeoutSeconds:30, MaxRetries:2, NoVerifySSL:false, ProxyAddress:"", Region:"", LocalMode:false, ResourceARN:"", RoleARN:"", ExternalID:""}, IndexedAttributes:[]string(nil), IndexAllAttributes:false, LogGroupNames:[]string(nil), TelemetryConfig:telemetry.Config{Enabled:false, IncludeMetadata:false, Contributors:[]component.ID(nil), Hostname:"", InstanceID:"", ResourceARN:""}, skipTimestampValidation:false}

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -25,3 +25,3 @@
        	            	  },
        	            	- skipTimestampValidation: (bool) true
        	            	+ skipTimestampValidation: (bool) false
        	            	 })
        	Test:       	TestCreateDefaultConfig
        	Messages:   	failed to create default config

=== FAIL: . TestXrayAndW3CSpanTraceResourceExtraction (0.00s)
    awsxray_test.go:58:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray_test.go:58
        	Error:      	"[{"name":"/users/junit","id":"b236dfe5ad9cdf1a","start_time":1760650420,"service":{"version":"v1"},"trace_id":"1-68f1650d-fbafea511c2afcd12d12db97","end_time":1760650510,"http":{"request":{"method":"GET","url":"https://api.example.com/users/junit"},"response":{"status":200,"content_length":0}},"fault":false,"error":false,"throttle":false,"aws":{"xray":{"auto_instrumentation":false},"account_id":"999999998"},"namespace":"remote","parent_id":"0774bff62361e3c1","type":"subsegment"}
        	            	 {"name":"signup_aggregator","id":"a6d7b4df40b42490","start_time":1760650420,"service":{"version":"v1"},"trace_id":"1-68f1650d-421f8106364c110886bab0d2","end_time":1760650510,"http":{"request":{"x_forwarded_for":true,"method":"GET","url":"https://api.example.com/users/junit","client_ip":"192.168.15.32"},"response":{"status":200,"content_length":0}},"fault":false,"error":false,"throttle":false,"aws":{"xray":{"auto_instrumentation":false},"account_id":"999999998"},"metadata":{"default":{"otel.resource.cloud.account.id":"999999998","otel.resource.cloud.availability_zone":"us-west-1b","otel.resource.cloud.provider":"aws","otel.resource.cloud.region":"us-west-2","otel.resource.container.image.name":"otel/signupaggregator","otel.resource.container.image.tag":"v1","otel.resource.container.name":"signup_aggregator","otel.resource.service.name":"signup_aggregator"}},"parent_id":"5b2ae7c011354d24"}
        	            	]" should have 4 item(s), but has 2
        	Test:       	TestXrayAndW3CSpanTraceResourceExtraction
        	Messages:   	4 spans have xray/w3c trace id

=== FAIL: . TestW3CSpanTraceResourceExtraction (0.00s)
    awsxray_test.go:64:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/awsxray_test.go:64
        	Error:      	"[]" should have 2 item(s), but has 0
        	Test:       	TestW3CSpanTraceResourceExtraction
        	Messages:   	2 spans have w3c trace id

=== FAIL: . TestCreateDefaultConfig (0.00s)
    factory_test.go:25:
        	Error Trace:	/repos/opentelemetry-collector-contrib/exporter/awsxrayexporter/factory_test.go:25
        	Error:      	Not equal:
        	            	expected: &awsxrayexporter.Config{AWSSessionSettings:awsutil.AWSSessionSettings{NumberOfWorkers:8, Endpoint:"", RequestTimeoutSeconds:30, MaxRetries:2, NoVerifySSL:false, ProxyAddress:"", Region:"", LocalMode:false, ResourceARN:"", RoleARN:"", ExternalID:""}, IndexedAttributes:[]string(nil), IndexAllAttributes:false, LogGroupNames:[]string(nil), TelemetryConfig:telemetry.Config{Enabled:false, IncludeMetadata:false, Contributors:[]component.ID(nil), Hostname:"", InstanceID:"", ResourceARN:""}, skipTimestampValidation:true}
        	            	actual  : &awsxrayexporter.Config{AWSSessionSettings:awsutil.AWSSessionSettings{NumberOfWorkers:8, Endpoint:"", RequestTimeoutSeconds:30, MaxRetries:2, NoVerifySSL:false, ProxyAddress:"", Region:"", LocalMode:false, ResourceARN:"", RoleARN:"", ExternalID:""}, IndexedAttributes:[]string(nil), IndexAllAttributes:false, LogGroupNames:[]string(nil), TelemetryConfig:telemetry.Config{Enabled:false, IncludeMetadata:false, Contributors:[]component.ID(nil), Hostname:"", InstanceID:"", ResourceARN:""}, skipTimestampValidation:false}

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -25,3 +25,3 @@
        	            	  },
        	            	- skipTimestampValidation: (bool) true
        	            	+ skipTimestampValidation: (bool) false
        	            	 })
        	Test:       	TestCreateDefaultConfig
        	Messages:   	failed to create default config

DONE 594 tests, 6 failures in 3.537s

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 4, 2025
@paulojmdias
Copy link
Member Author

/label -stale

@crobert-1
Copy link
Member

Pinging code owners @wangzlei and @srprash for review

@crobert-1 crobert-1 removed the Stale label Nov 4, 2025
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.

5 participants