diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/resource/ecs.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/resource/ecs.py index 6bd396e69d..44df3e7738 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/resource/ecs.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/resource/ecs.py @@ -171,10 +171,10 @@ def _get_logs_resource(metadata_container): ResourceAttributes.AWS_LOG_STREAM_ARNS: [logs_stream_arn], } ) - else: - logger.warning( - "The metadata endpoint v4 has returned 'awslogs' as 'LogDriver', but there is no 'LogOptions' data" - ) + + logger.warning( + "The metadata endpoint v4 has returned 'awslogs' as 'LogDriver', but there is no 'LogOptions' data" + ) return Resource.get_empty()