Coder Social home page Coder Social logo

boroskoyo / sidekick-loki Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 7 KB

Ingest your Sidekick logs & snapshots to Loki. Thanks to winston & winston-loki

Home Page: https://medium.com/runsidekick/sidekick-recipes-2-add-missing-logs-to-your-running-microservices-and-send-them-to-loki-1f5a3449343c

JavaScript 73.54% Dockerfile 26.46%

sidekick-loki's Introduction


Logo

+

Logo

Sidekick Recipes: Send logs to Loki -Add missing logs to your running microservices

Send your collected tracepoint & logpoint events to your Loki instances.
Explore the docs »

Sidekick Home · Report Bug & Request Feature

Table of Contents
  1. About The Recipe
  2. Getting Started
  3. Usage
  4. Contact

About The Recipe


Sidekick is a production debugging and on-demand logging tool where you can debug your running applications while they keep on running. Sidekick provides the ability to add logs and put non-breaking breakpoints in your application code which captures the snapshot of the application state, the call stack, variables, etc.

Sidekick Actions:

  • A tracepoint is basically a non-breaking remote breakpoint. In short, it takes a snapshot of the variables when the code hits that line.
  • Logpoints open the way for dynamic logging to Sidekick users. Replacing traditional logging with dynamic logging has the potential to lower stage sizes, costs, and time for log searching while adding the ability to add new logpoints without editing the source code, redeploying or restarting the application

This recipe aims to help you send your collected tracepoint & logpoint events to your own Loki instances.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

tested with node v16.14.2

Installation

  1. Clone the repo

    git clone https://github.com/boroskoyo/sidekick-elastic.git
  2. Install NPM packages

    npm install
  3. Create a .env file and edit according to your needs

     sidekick_email: ""
     sidekick_password: ""
     loki_url: ""
     loki_auth: ""
  4. Edit the ingestFunc function if yo want to alter your logs. You can also define different functions for tracepoints & logpoints.

     function ingestFunc () {
         return async function (data) {
             logger.info(JSON.stringify(data));
         }
     }
  5. Run!

    npm start

(back to top)

Usage

You can also run this recipe in a container. For this purpose a Dockerfile is located in the directory.

(back to top)

Contact

Barış Kaya - @boroskoyo

Sidekick: website

(back to top)

sidekick-loki's People

Contributors

boroskoyo avatar

Stargazers

 avatar  avatar

Watchers

 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.