Code Monkey home page Code Monkey logo

loggy's Introduction

loggy header

LOGGY

Monitor your services and track errors in production. ๐Ÿš€๐Ÿ“ˆ


Related:

๐Ÿ’ป LOGGY Client

๐Ÿ“ก LOGGY NodeJS Adapter


Features

๐Ÿ”ฅ Flexible

  • Group events by services
  • Easy-to-use adapter
  • Custom adapters for any platform and language
  • Customizable
  • Can be self-hosted

๐Ÿ”ฅ Extensive Event Details

  • Platform information
  • Detailed evolution
  • Stacktrace
  • Code Snippets
  • Logs
  • Metrics
  • Individual badges
  • Adapter information

๐Ÿ”ฅ Aggregated events

  • Live updates
  • Same events are aggregated
  • Event count
  • Evolution preview

๐Ÿ”ฅ User management

  • Invite and remove users from your organization

๐Ÿ”ฅ Highly scalable infrastructure

  • Containerized backend
  • Simple to deploy and scale

Run Locally

Running the LOGGY Docker image is the easiest way to get started. All you need is Docker and a MongoDB instance. You can install MongoDB locally, run it as a separate container or use a remote instance provided by services like mLab or Atlas.

docker loggy

docker run \
--env PORT=2800 \
--env SECRET=secret \
--env MONGO_URI=mongodb://admin:[email protected]:63108/loggy-test\?retryWrites=false \
--env MONGO_DB_NAME=loggy-test \
--env IS_SELFHOSTED=true \
-p 2800:2800 \
-it \
jz222/loggy:0.1.0
Environment Variable Description
PORT Determines the port that the server should listen on.
SECRET Secret key that is used to sign JWT's. Make sure to provide a strong key.
MONGO_URI The connection string of the MongoDB. Please refer to the MongoDB documentation for the format of the connection string.
MONGO_DB_NAME The name of the actual database.
IS_SELFHOSTED Can either be true or false. If this environment variable is set to true, only one organization can be set up.

Development Setup

Clone the repository and install dependencies with go get. After adding an .env file that corresponds to the .example.env file, you can start the server with go run main.go.

Build

To build a Docker image run the script build.dev.sh. It will create a local Docker image called loggy that can be run with the Docker command shown above.

Register an Error

Use the NodeJS adapter to register errors or build your own. To register an error, send a POST request to /logging/error with a JSON body like shown below.

{
	"ticket": "2ATNP1AD70",
	"message": "test is not a function",
	"path": "/User/example/server/src/server/server.js",
	"line": 15,
	"stacktrace": "the error stack trace",
	"badges": {
		"cluster": "test"
	},
	"type": "exception",
	"metrics": {
		"platform": "linux"
	},
	"logs": [
		{
			"type": "info",
			"log": "process started",
			"timestamp": 1585689440
		}
	],
	"snippet": {
		"10": "        cluster: 'EU',",
        	"11": "        serviceID: '20010-A'",
        	"12": "    }",
        	"13": "});",
        	"14": "",
        	"15": "test();",
        	"16": "",
        	"17": "// Routes",
        	"18": "const routes = require('../routes');",
        	"19": "",
        	"20": "// Configs"
	},
	"timestamp": 1585689898,
	"adapter": {
		"name": "loggy-adapter-nodejs",
		"type": "nodejs",
		"version": "v0.1.0"
	}
}

Please notice that timestamps have to be UTC timestamps in seconds.

loggy's People

Contributors

jz222 avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

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.