Giter Club home page Giter Club logo

logger's People

Contributors

christyjacob4 avatar eldadfux avatar harsh-siriah avatar lohanidamodar avatar maximilianmaihoefner avatar meldiron avatar pineappleionic avatar samarth2812 avatar sanjaydevtech avatar stnguyen90 avatar vermakhushboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logger's Issues

๐Ÿš€ Feature: Elastic Cloud Adapter | APM

๐Ÿ”– Feature description

Push logs to Elastic Cloud and/or hosted ELK cluster

๐ŸŽค Pitch

All actual adapter are paid. I use all day kibana / ELK stack for free (on dev, stagging, prod)

The best would be to implement the apm php agent to have a complete APM integration (ideally there should be an APM integration to all appwrite and not only this repo).

It's also possible via an http request to logstash (and others)

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

๐Ÿš€ Feature: Update Rollbar Logger to Send Stack Trace

๐Ÿ”– Feature description

Currently the Rollbar adapter does not send a stack trace and so errors in Rollbar look like:

image
{
  "body": {
    "timestamp": 1690241898,
    "message": {
      "body": "Document efgh5678 not found"
    }
  },
  "uuid": "7a49f3c1bb014cfc8e32bcdcbc78ce46",
  "level": "error",
  "timestamp": 1690241898,
  "custom": [
    "sdk: Flutter",
    "sdkVersion: 0.0.1",
    "authMode: default",
    "authMethod: cookie",
    "authProvider: MagicLink",
    "type: error",
    "environment: production",
    "sdk: utopia-logger/0.1.0"
  ],
  "environment": "production",
  "framework": "unknown",
  "trace_chain": [
    {
      "category": "http",
      "message": "DELETE /api/v1/database/abcd1234/efgh5678",
      "type": "default",
      "level": "debug"
    },
    {
      "category": "auth",
      "message": "Using API key",
      "type": "default",
      "level": "debug"
    },
    {
      "category": "auth",
      "message": "Authenticated with * Using API Key",
      "type": "default",
      "level": "info"
    },
    {
      "category": "database",
      "message": "Found collection abcd1234",
      "type": "default",
      "level": "info"
    },
    {
      "category": "database",
      "message": "Permission for collection abcd1234 met",
      "type": "default",
      "level": "debug"
    },
    {
      "category": "database",
      "message": "Missing document when searching by ID!",
      "type": "default",
      "level": "error"
    }
  ],
  "metadata": {}
}

It would be helpful to get the stack trace in Rollbar so it looks more like:

image
{
  "body": {
    "trace": {
      "frames": [
        {
          "method": "include",
          "args": [
            "/workspace/logger/vendor/phpunit/phpunit/phpunit"
          ],
          "lineno": 122,
          "filename": "/workspace/logger/vendor/bin/phpunit"
        },
        {
          "method": "PHPUnit\\TextUI\\Command::main",
          "args": [],
          "lineno": 107,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/phpunit"
        },
        {
          "method": "PHPUnit\\TextUI\\Command::run",
          "args": [
            [
              "vendor/bin/phpunit",
              "--configuration",
              "phpunit.xml",
              "tests"
            ],
            true
          ],
          "lineno": 97,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/TextUI/Command.php"
        },
        {
          "method": "PHPUnit\\TextUI\\TestRunner::run",
          "args": [
            {
              "class": "PHPUnit\\Framework\\TestSuite",
              "value": [
                {
                  "class": "PHPUnit\\Framework\\TestSuite",
                  "value": [
                    {
                      "class": "LoggerTest",
                      "value": []
                    },
                    {
                      "class": "LoggerTest",
                      "value": []
                    },
                    {
                      "class": "LoggerTest",
                      "value": []
                    },
                    {
                      "class": "LoggerTest",
                      "value": []
                    }
                  ]
                }
              ]
            },
            {
              "registerMockObjectsFromTestArgumentsRecursively": false,
              "forceCoversAnnotation": false,
              "verbose": false,
              "convertDeprecationsToExceptions": false,
              "executionOrderDefects": 0,
              "failOnSkipped": false,
              "beStrictAboutResourceUsageDuringSmallTests": false,
              "stopOnFailure": false,
              "disallowTodoAnnotatedTests": false,
              "colors": "auto",
              "stopOnRisky": false,
              "listSuites": false,
              "executionOrder": 0,
              "convertNoticesToExceptions": true,
              "stopOnError": false,
              "failOnRisky": false,
              "noInteraction": false,
              "stopOnSkipped": false,
              "processIsolation": false,
              "enforceTimeLimit": false,
              "backupGlobals": false,
              "notLoadedExtensions": [],
              "strictCoverage": false,
              "reportLowUpperBound": 50,
              "reverseList": false,
              "resolveDependencies": true,
              "testdoxExcludeGroups": [],
              "randomOrderSeed": 1690242484,
              "testdoxGroups": [],
              "cacheResult": true,
              "failOnEmptyTestSuite": false,
              "columns": 80,
              "crap4jThreshold": 30,
              "cacheResultFile": "/workspace/logger",
              "listGroups": false,
              "repeat": false,
              "stopOnDefect": false,
              "listTests": false,
              "warnings": [],
              "groups": [],
              "beStrictAboutChangesToGlobalState": false,
              "timeoutForMediumTests": 10,
              "useDefaultConfiguration": true,
              "configurationObject": {
                "class": "PHPUnit\\TextUI\\XmlConfiguration\\Configuration",
                "value": []
              },
              "convertErrorsToExceptions": true,
              "reportUselessTests": true,
              "disableCodeCoverageIgnore": false,
              "configuration": "phpunit.xml",
              "stopOnWarning": false,
              "unavailableExtensions": [],
              "failOnWarning": false,
              "loadedExtensions": [],
              "stopOnIncomplete": false,
              "defaultTimeLimit": 1,
              "listTestsXml": false,
              "failOnIncomplete": false,
              "backupStaticAttributes": false,
              "bootstrap": "./vendor/autoload.php",
              "timeoutForSmallTests": 1,
              "disallowTestOutput": false,
              "testSuffixes": [
                "Test.php",
                ".phpt"
              ],
              "filter": false,
              "reportHighLowerBound": 90,
              "listeners": [],
              "excludeGroups": [],
              "extensions": [],
              "stderr": false,
              "debug": false,
              "convertWarningsToExceptions": true,
              "ignoreDeprecatedCodeUnitsFromCodeCoverage": false,
              "reverseDefectList": false,
              "timeoutForLargeTests": 60
            },
            [],
            true
          ],
          "lineno": 144,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/TextUI/Command.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestSuite::run",
          "args": [
            {
              "class": "PHPUnit\\Framework\\TestResult",
              "value": []
            }
          ],
          "lineno": 651,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/TextUI/TestRunner.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestSuite::run",
          "args": [
            {
              "class": "PHPUnit\\Framework\\TestResult",
              "value": []
            }
          ],
          "lineno": 684,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestSuite.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestCase::run",
          "args": [
            {
              "class": "PHPUnit\\Framework\\TestResult",
              "value": []
            }
          ],
          "lineno": 684,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestSuite.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestResult::run",
          "args": [
            {
              "class": "LoggerTest",
              "value": []
            }
          ],
          "lineno": 964,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestCase.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestCase::runBare",
          "args": [],
          "lineno": 728,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestResult.php"
        },
        {
          "method": "PHPUnit\\Framework\\TestCase::runTest",
          "args": [],
          "lineno": 1214,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestCase.php"
        },
        {
          "method": "LoggerTest::testAdapters",
          "args": [],
          "lineno": 1608,
          "filename": "/workspace/logger/vendor/phpunit/phpunit/src/Framework/TestCase.php"
        },
        {
          "lineno": 201,
          "filename": "/workspace/logger/tests/LoggerTest.php"
        }
      ],
      "exception": {
        "message": "test exception",
        "class": "Exception"
      }
    }
  },
  "uuid": "1a71e944-02b4-457a-a02a-3f0d38b4f074",
  "language": "php",
  "level": "error",
  "timestamp": 1690242484,
  "code_version": "",
  "request": {
    "POST": [],
    "GET": []
  },
  "server": {
    "host": "55b92c98fe5a",
    "argv": [
      "vendor/bin/phpunit",
      "--configuration",
      "phpunit.xml",
      "tests"
    ]
  },
  "environment": "production",
  "platform": "Linux 55b92c98fe5a 6.1.27-060127-generic #202305051509 SMP PREEMPT_DYNAMIC Fri May  5 15:48:49 UTC 2023 x86_64",
  "framework": "unknown",
  "custom": [],
  "notifier": {
    "version": "3.1.2",
    "name": "rollbar-php"
  },
  "metadata": {
    "customer_timestamp": 1690242484
  }
}

๐ŸŽค Pitch

Having a stacktrace would make it easier to troubleshoot errors.

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

Help by implementing GlitchTip adapter ๐Ÿ›ฐ

Introduction

All Utopia libraries focus on supporting multiple adapters such as storage, database, cache or logger. We currently support only 3 providers for Logger library, but we are looking to increase this number! By preparing easy-to-follow instructions, we believe anyone can implement a new provider and get their contribution counts up ๐Ÿ˜Ž

Your task is to implement GlitchTip adapter into our Logger library. You can find a complete in-depth tutorial in our official tutorial for adding a new logger adapter. To find out more about GlitchTip, check out their Website.

Tasks summary:

  • Read through our tutorial
  • Fork & clone utopia-php/logger (this repository)
  • Switch to branch feat-add-glitchtip-adapter
  • Create file for your provider in src/Logger/Adapter/GlitchTip.php and implement it
  • Add your provider into PROVIDERS array in src/Logger/Logger.php
  • Implement a test for your provider in tests/LoggerTest.php
  • Push changes and submit a pull request
  • Inside your PR, add screenshots of your test log pushed into GlitchTip

If you need any help, reach out to us on Appwrite Discord server.

Are you ready to work on this issue? ๐Ÿค” Let us know, and we will assign it to you ๐Ÿ˜Š

๐Ÿš€ Feature: Support for self hosted Sentry

๐Ÿ”– Feature description

Sentry can be self hosted, so it would be nice if we could specify the Host instead of having it hardcoded tohttps://sentry.io/api.

๐ŸŽค Pitch

This would allow users of self hosted sentry instances to also use the Utopia Logger by allowing sentryHost to be passed into the SentryAdapter the same way projectId and sentryKey are.

In Appwrite we could append/prepend it to the _APP_LOGGING_CONFIG and if it's missing default to sentry.io

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.