title: How to log a custom field to AWS CloudWatch to allow filtering from Insights?
body: <p>I have an ECS Task Definition with the following Cloud Formation configuration:</p>
  
  <pre><code>          LogConfiguration:
              LogDriver: awslogs
              Options:
                awslogs-group: !Ref 'AWS::StackName'
                awslogs-region: !Ref 'AWS::Region'
                awslogs-stream-prefix: !Ref Name
                awslogs-datetime-format: '%d %b %Y %H:%M'
  
  </code></pre>
  
  <p>I would like the logs I send to CloudWatch to include HostName as a filterable field that would appear in the AWS Insights console.</p>
  
  <p>The application is using dotnet core 2.2.  I also have configuration in it as follows:</p>
  
  <pre><code>  "AWS.Logging": {
      "Region": "us-east-1",
      "LogGroup": "one-hub-stack-qa",
      "LogLevel": {
        "Default": "Debug",
        "System": "Information",
        "Microsoft": "Information"
      }
    },
  
  </code></pre>
  
  <p>How can I filter on a custom field @HostName in AWS Insights?  Note: this question might also require an understanding of how to actually send HostName to CloudWatch.  </p>