Giter Site home page Giter Site logo

lenn0x / milo-tracing-framework Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 1008 KB

Milo is designed to remove uncertainty and provide insight into how applications are performing. It is a tracing infrastructure with goals of providing low overhead, and application-level transparency.

License: Apache License 2.0

Python 10.47% Java 22.81% PHP 66.72%

milo-tracing-framework's Introduction

Milo Tracing Framework

Milo is designed to remove uncertainty and provide insight into how applications are performing. It is a tracing infrastructure with goals of providing low overhead, and application-level transparency. Milo collects data in real-time from applications using adaptive sampling, and provides a central location to analyze performance data.

Goals

  • Low overhead
  • Application-level transparency
  • Scalability

Architecture

In a service oriented architecture, you have many clients and servers that have specific purposes. Using the Milo Tracing framework, you can make your Thrift Services trace aware.

Clients can touch dozens of services, which in turn could query multiple data stores and other services. The Milo Tracing framework will send trace data out of band to scribe, which will handle sending the trace data over to Milo Collectors. The purpose of a Milo collector is to write the trace data to Cassandra and MySQL. Cassandra is used for storing raw trace data, and MySQL is used for being able to search across what traces have been created.

Below is a very basic callgraph of a frontend request talking to services [A,B].

                Frontend Request
                  /           \
                 /             \
              Service        Service
                A               B

Each service will send it's specific trace data that was generated, out of band to Scribe. One thing to note, as each depth of the tree increases, each service is only responsible for it's trace data. When services talk to each other over Thrift, the only additional data that is sent across the wire is: - Trace ID (64-bit probabilistic identifer) - Span ID (64-bit probabilistic identifer) - Span Parent ID (64-bit probabilistic identifer)

It's the collectors job to reconstruct the tree later in an offline process.

Building

You need:

  • java 1.6
  • maven 2
  • thrift 0.2.0
  • scribe
  • cassandra 0.6
  • mysql 5
  • php 5

Optional:

  • python
  • python-scribe
  • python-thrift

Running

Configuring Cassandra: Add this to your storage config xml for the cluster that will hold tracing data:

Configuring Scribe:

At the moment Scribe is used as a transport mechanism that forwards traces to collectors.

scribe.conf:
    <store>
    category=Milo-Trace
    type=network
    remote_host=127.0.0.1
    remote_port=2100
    max_write_interval=1
    </store>

Configuring MySQL:

Create a database called `milo`.

Import SQL tables from ./sql/create_tables.sql

Configuring the Milo Collector:

Edit the defaults to fit your needs

$ vim conf/collector.yaml

Starting the Milo Collector:

$ mvn package
$ bin/milo_collector

Testing out a client/server application that is Milo Trace aware:

Start the server:

$ python src/py/examples/milo_server.py

Start the client:

$ python src/py/examples/milo_client.py

Configuring the web interface:

Edit the defaults in web/includes/config.php

Copy the files under web/ to a folder on your webserver, you can name it `milo`.

Enjoy!

TODO

  • Better support for annotations/events in PHP and Python
  • Support nonblocking servers in Java and Python
  • C library
  • Provide a gevent based Thrift server in Python
  • Better buffering of messages in executors in Java
  • More logging support
  • Support speculative tracing
  • Waterfall breakdown in the web interface
  • Aggregation support
  • Hadoop Map/Reduce support

Community

License: Apache 2 (see included LICENSE file)

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.