Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-4284

[vector] PHP multiline error detection not enabled

    XMLWordPrintable

Details

    • Log Collection - Sprint 238, Log Collection - Sprint 239

    Description

      Description of problem:

      When deploy vector as the collector and enable detectMultilineErrors, the PHP errors are still collected line by line:

      $ curl -sk http://elasticsearch-server-e2e-test-vector-es-namespace-cw4wn.apps.xxxx.com/app*/_search?pretty -H "Content-type: application/json" -d '{"query": {"match_phrase": {"kubernetes.namespace_name": "multiline-log"}}, "size": "100", "sort": [{"@timestamp": {"order":"desc"}}]}'  |grep message
                "message" : "Stack trace:",
                "message" : "exception 'Exception' with message 'Custom exception' in /home/joe/work/test-php/test.php:5",
                "message" : "#0 /home/joe/work/test-php/test.php(9): func1()",
                "message" : "#1 /home/joe/work/test-php/test.php(13): func2()",
                "message" : "#2 {main}",
                "message" : "#0 [internal function]: ErrorEntryGenerator::{closure}()",
                "message" : "Stack trace:",
                "message" : "#1 /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php(20): call_user_func_array(Object(Closure), Array)",
                "message" : "#2 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->__call('raise', Array)",
                "message" : "#4 {main}",
                "message" : "PHP Fatal error:  Uncaught exception 'Exception' with message 'message' in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php:60",
                "message" : "#3 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->raise()",
                "message" : "  thrown in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php on line 60",
                "message" : "#1 /home/joe/work/test-php/test.php(13): func2()",
                "message" : "#2 {main}",
                "message" : "Stack trace:",
                "message" : "exception 'Exception' with message 'Custom exception' in /home/joe/work/test-php/test.php:5",
                "message" : "#0 /home/joe/work/test-php/test.php(9): func1()",
                "message" : "Stack trace:",
                "message" : "#1 /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php(20): call_user_func_array(Object(Closure), Array)",
                "message" : "#2 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->__call('raise', Array)",
                "message" : "#3 /base/data/home/apps/s~crash-example-php/1.388306779641080894/index.php(36): ErrorEntry->raise()",
                "message" : "PHP Fatal error:  Uncaught exception 'Exception' with message 'message' in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php:60",
                "message" : "  thrown in /base/data/home/apps/s~crash-example-php/1.388306779641080894/errors.php on line 60",
                "message" : "#0 [internal function]: ErrorEntryGenerator::{closure}()",
                "message" : "#4 {main}",
                "message" : "exception 'Exception' with message 'Custom exception' in /home/joe/work/test-php/test.php:5",
                "message" : "Stack trace:",
                "message" : "#0 /home/joe/work/test-php/test.php(9): func1()",
                "message" : "#1 /home/joe/work/test-php/test.php(13): func2()",
                "message" : "#2 {main}", 

      Version-Release number of selected component (if applicable):

      Logging 5.8.0

      openshift-logging/cluster-logging-rhel9-operator/images/v5.8.0-65

      openshift-logging/vector-rhel9/images/v0.28.1-3

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a pod to generate multiline errors 
      2. Enable detectMultilineErrors in CLF
      3. Deploy logging using vector as the collector

      Actual results:

      PHP errors are collected line by line

      Expected results:

      PHP errors should be treated as single message. 

      Additional info:

      Attachments

        Activity

          People

            cahartma@redhat.com Casey Hartman
            qitang@redhat.com Qiaoling Tang
            Qiaoling Tang Qiaoling Tang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: