Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Latest commit

 

History

History
178 lines (122 loc) · 4.48 KB

README.md

File metadata and controls

178 lines (122 loc) · 4.48 KB

Logo

+

Logo

Sidekick Recipes: Elasticsearch Ingest

Send your logs and traces to Elasticsearch in seconds!
Explore the docs »

Sidekick Home · Report Bug & Request Feature

Table of Contents
  1. About The Recipe
  2. Getting Started
  3. Usage
  4. Roadmap
  5. 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 Elasticsearch instances.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

tested with node v16.14.2

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo

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

    npm install
  3. Edit config.json according to your needs

     "elasticsearch-url": "<>",
     "elasticsearch-apikey": "<>",
     "sidekick_email": "",
     "sidekick_password": ""

Log event index is sidekick_logpoint & snapshot event index is sidekick_tracepoint by default. You can override them like below:

 "sidekick_tracepoint_index": "sidekick_tracepoint",
 "sidekick_logpoint_index": "sidekick_logpoint"

If have an on-premise setup add the fields below according to your setup:

 "sidekick_host": "ws://127.0.0.1",
 "sidekick_port": "7777"

If have your user token you can use it instead of email & password :

 "sidekick_token": "<>"
  1. 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)

Roadmap

  • Add Tracepoint Support
  • Add Logpoint Support
  • Add Logpoint Detail setting
  • [ ] Filter Logpoints
  • [ ] Filter Tracepoints
  • Custom ingest function (this also includes the filtering options above)
  • Update with the offical Sidekick client

(back to top)

Contact

Barış Kaya - @boroskoyo

Sidekick: website

(back to top)