GithubHelp home page GithubHelp logo

salesforce / timbermill Goto Github PK

View Code? Open in Web Editor NEW
98.0 17.0 14.0 3.63 MB

A better logging service

Home Page: https://engineering.salesforce.com/timbermill-a-better-logging-service-d86ff32fec58

License: Other

Java 96.18% Python 3.73% Dockerfile 0.08%
hacktoberfest

timbermill's Introduction

Timbermill

A Task-Based, Context-Aware Logging service

Timbermill is an advanced, open-source logging service built for Elasticsearch.
Timbermill collects all events sent to it, processes them, and sends them to your elasticsearch cluster in a task-based, context-aware manner which gives an easy way to search, analyze and monitor your system. (mainly by using Kibana)

Task-based, Context-Aware, cool. What's that?

Task-based:

Timbermill logs are not just lines of text, they are Tasks.

Task characteristics:

  • Represented by a specific name.
  • Has a unique ID.
  • Represents multiple Events that were called for it.
    • Start event that open the Task.
    • Zero or more info events (Strings/Texts/Context/Metrics) that add properties values to the task.
    • Closing event that closes the Task either successfully or with an error (Success/Error), note that as long as an event is in the works its status is Unterminated
  • Has a start-time, end-time and duration.
Context-Aware:

System events doesn't occur in a void.

Events always have context. When did this event happen? Why did it happen? What was the path of events leading to this event? What were the values we encountered along the path? It's rarely enough just to know that something happened and simple logging just doesn't let us know a lot more than that.

Timbermill does.

Every task in Timbermill points to a parent task and automatically keeps important information from it:

  • Complete path of tasks leading to this task.
  • Important properties from its ancestors.
  • More!

Requirements

  • Elasticsearch cluster
  • Java project (1.8+)
  • Add dependency to maven

Timbermill is designed to be plug-and-play out-of-the-box.

    public void main() {
        TimberLogger.bootstrap();
        
        log();
        
    }

    @TimberLog(name = "hello_world")
    public void log() {
        LogParams params = LogParams.create().string("foo", "bar").text("text", "This is a text!").metric("number", 42);
        TimberLogger.logParams(params);
        /**
         *  Your Code
         */
    }

This code bootstraps Timbermill with a local default Elasticsearch cluster (http://localhost:9200). It will write one task of name hello_world with the above properties to elasticsearch.

Alt text

  • A custom Elasticsearch URL (along with other configurations) can be defined using LocalOutputPipeConfig.
LocalOutputPipeConfig.Builder builder = new LocalOutputPipeConfig.Builder().url("https://elasticsearch:9200");
LocalOutputPipeConfig config = builder.build();
TimberLog.bootstrap(config);

What can I do next?

Get familiar with our wiki so you get a better sense on how to properly use Timbermill.

timbermill's People

Contributors

amit-a-ishai avatar anat-rei avatar dependabot[bot] avatar edengal avatar eyalfa avatar galkarpsf avatar guyshemer avatar or-koren avatar oz-zafar avatar sagiksf avatar shimk52 avatar stasp44 avatar udikidron avatar valeriaares avatar yonatanlevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timbermill's Issues

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

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.