Error Tracking

at

Importance

Some years ago. . .

/**
 * @param Object $object
 * @param $item
 */
public function exampleAction(Object $object, $item)
{
    foreach ($object->getCarriers() as $i => $value) {
        if ($item->getCount() > 2 && $value == 100) {
            $option = $i;
        }
    }

    //nasty code
    //more
    //more
    //more
    //and more . . .

    foreach ($object->getOtherThing() as $option => $value) {
        if ($item->getMount() > 100 && $value == 'A') {
            $item->setMountType($option);
        }
    }

    $item->setCarrier($option);
}

Linio Systems

Logging

https://github.com/LinioIT/linio-standards/blob/master/standards/logging.md

Common fields

    - level_name

    - message

    - context

    - extra

    - channel

    - datetime

Parsing entry rules

    - JSON encoded

    - single line

    - fields requirements

Log entry example

Request Id Generation

Event listeners

on request

on response

e0675e7030d3eecee0be4b7cf22a7063

Shop Front

Request Id generation

    - Angular interceptor

    - Symfony listener

Shop Front

Logging

    - monolog

        * stream

        * new relic

Bob For Alice

Bob For Alice

Bob For Alice

Other Systems

Notifier

Partner API

Tools

Tools

Tools

Example

Trying to place an order

Example

Getting the request Id

Example

Getting the request Id

Example

Searching over all application logs

Example

Searching over an specific application log

Example

Example

Example

Conclusion

For whom is it useful?

    - Developers

    - PM team

    - Business people

Thanks for your attention!

Damian Arroyo
Sagrario Meneses

Software Engineers

Tracking Error

By smmd

Tracking Error

  • 158