How to parameterize the name from the mount path using fluentd?

I’m trying to send my application logs to AWS Cloudwatch. My application is in microservices and I have like 80 containers. Let’s assume one of the service is “xyz” I gave it a path to write files to a volume. So the path of its logs would be /var/log/containers/xyz.log

Now here’s my problem, fluentd needs to detect the particular “xyz.log” to send it to cloudwatch. How can I parameterize xyz From the above path using fluentd. The document I followed is

If you see under fluentd_rbac.yaml This is for a section where it filters the logs to send to cloudwatch

<label @NORMAL>
  <match **>
    @type cloudwatch_logs
    @id out_cloudwatch_logs_containers
    region "#{ENV.fetch('REGION')}"
    log_group_name "/aws/containerinsights/#{ENV.fetch('CLUSTER_NAME')}/(need parameter to get xyz here, something like servicename)"