ashb commented on a change in pull request #8:
URL: https://github.com/apache/airflow-ci-infra/pull/8#discussion_r594209880



##########
File path: cloud-init.yml
##########
@@ -242,23 +251,50 @@ write_files:
             timeout_ms = 250
 
       [transforms.grok-runner-logs]
-        type = "grok_parser"
+        type = "remap"
         inputs=["runner-logs"]
-        pattern = "(?m)\\[%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} 
%{NOTSPACE:logger}\\] %{GREEDYDATA:message}"
-        types.timestamp = "timestamp|%F %TZ"
+        source = '''
+          structured, err = parse_grok(.message, 
"(?m)\\[%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{NOTSPACE:logger}\\] 
%{GREEDYDATA:message}")
+
+          if err != null {
+            .err = err
+          } else {
+            . = merge(., structured)
+          }
+        '''
+      [transforms.filter-runner-logs]
+        type = "filter"
+        inputs = ['grok-runner-logs']
+        condition.type = "remap"
+        condition.source = '''
+          if .logger == "JobServerQueue" {
+            !match!(.message, r'Try to append \d+ batches web console lines 
for record')
+          } else if .logger == "HostContext" {
+            !starts_with!(.message, "Well known directory")

Review comment:
       Drop lots of repeated log messages that aren't useful to use now we have 
job logs directly in CloudWatch




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to