Coder Social home page Coder Social logo

leekyoungil / illuminati Goto Github PK

View Code? Open in Web Editor NEW
117.0 15.0 19.0 22.34 MB

This is a Platform that collects all the data accuring in your Application and shows the data in real time by using Kibana or other tools.

License: Apache License 2.0

Java 82.92% JavaScript 9.45% Groovy 7.60% Shell 0.03%
log event spring stream rabbitmq kafka logging illuminati javascript agent

illuminati's Introduction

Project illuminati

image

This is a Platform that collects all the data accruing in your Application and shows the data in real time by using Kibana or other tools.

illuminati's intention to develop

There is no garbage data in your Application. It is necessary to identify what data is the most important among the collecting data from your Applications. Also collect and analysis must be performed in different processes. The illuminati is designed to make collect all data easily, and it can be possible scalability working by separated analysis process.

required

  • Java8 or higher.
  • Java Application that can use AspectJ
  • Simple Mode is No infrastructure required

optional

  • Message queue (RabbitMQ or Kafka)
  • H2 Database (for backup)

recommendations

  • ElasticSearch (5.x or higher)
  • Hadoop (3.x or higher)
  • Kibana
  • Spring Cloud Stream - used to create a consumer application

struct of illuminati Project

data to collect of illuminati.

  1. Applied server information(IP, HOST_NAME...ETC), status of JVM MEMORY.
  2. All of client request information.
    • All of Header and Cookie
    • OS, BROWSER, DEVICE information
    • Global Transaction ID generation enables application parent method call order and content traceability.
    • Execution methods and parameters on the application.
    • Method execution time in Application.
    • Value of Method request parameter. (GET, POST)
    • Result value of the method request on the application.
  3. Collect User Event data from Browser by User action. (Key board press or mouse click)
  4. It can collect Event data from Browser to Server to Response by One Transaction Id.

illuminati is easy to use

  1. Do not need to create a data type. (No DTO required)
  2. Agent installation is not required.
  3. Annotation type is easy to apply.
  4. Internal method request like the private method can't collect data. For example, if you call the a2 method of class A from the a1 method of class A, you cannot collect data.

illuminati operator method

  1. Add dependency of MAVEN or Gradle (illuminati)
  2. Add configuration in illuminati-{phase}.yml, properties (address of queue... etc)
  3. When execute application with add -Dspring.profiles.active={phase}
  4. Add "@Illuminati" Annotation to where you want to collect
  5. Add to Html in <script></script> in illuminatiJsAgent.min.js script file.

illuminati does not affect the origin application logic

  1. It was developed to have no influence on this logic by using a separate thread and Buffer.
  2. Drop in performance can occur, but there is no big difference in physical server. (It can happen a little more on virtual machines.)
  3. Even if an exception occurs in the original application logic, illuminati can also collect the corresponding exception information.
  4. When the Illuminati collect the Data. If a problems aries. Save that data to separate storage. and If the problem is fixed. data will automatically restore. (Backup function)
  5. Grace Shutdown mode is supported. (When Backup function is activated.)

struct of illuminati

Basic state

image

Backup function when there is a problem with the broker

image

Simple Mode (No infrastructure required. Can be used with Java Console log solutions.)

image

add to Maven Dependency

* Maven
<dependencies>
   <dependency>
      <groupId>me.phoboslabs.illuminati</groupId>
      <artifactId>illuminati-annotation</artifactId>
      <version>1.2.4</version>
   </dependency>

   <dependency>
      <groupId>me.phoboslabs.illuminati</groupId>
      <artifactId>illuminati-processor</artifactId>
      <version>0.9.9.39</version>
   </dependency>
   
   <!-- This is an option. If you add the module, you can turn it on and off without deploying it. -->
   <dependency>
       <groupId>me.phoboslabs.illuminati</groupId>
       <artifactId>illuminati-switch</artifactId>
       <version>1.0.18</version>
   </dependency>

   <!-- This is an option. If you add the module, you can collect Event data from Browser to server to response by one transaction id. -->
   <dependency>
      <groupId>me.phoboslabs.illuminati</groupId>
      <artifactId>illuminati-jscollector</artifactId>
      <version>0.5.19</version>
   </dependency>
</dependencies>

add to Gradle Dependency

* Gradle
repositories {
    jcenter()
}

compile 'me.phoboslabs.illuminati:illuminati-annotation:1.2.4'
compile 'me.phoboslabs.illuminati:illuminati-processor:0.9.9.39'
// This is an option. If you add the module, you can turn it on and off without deploying it.
compile 'me.phoboslabs.illuminati:illuminati-switch:1.0.18'
<!-- This is an option. If you add the module, you can collect Event data from Browser to server to response by one transaction id. -->
compile 'me.phoboslabs.illuminati:illuminati-jscollector:0.5.19'

add @Illuminati to Class

* apply to all sub methods
@Illuminati
@RestController
@RequestMapping(value = "/api/v1/", produces = MediaType.APPLICATION_JSON_VALUE)
public class ApiSampleController {

    @RequestMapping(value = "test1")
    public String test1 (String a, Integer b) throws Exception {
        String testJson = "{\"test\" : 1}";
        return testJson;
    }
    
    @RequestMapping(value = "test2")
        public String test2 (String a, Integer b) throws Exception {
            String testJson = "{\"test\" : 2}";
            return testJson;
        }
}

add @Illuminati to Method

* apply to all target method
@RestController
@RequestMapping(value = "/api/v1/", produces = MediaType.APPLICATION_JSON_VALUE)
public class ApiSampleController {

    @RequestMapping(value = "test1")
    public String test1 (String a, Integer b) throws Exception {
        String testJson = "{\"test\" : 1}";
        return testJson;
    }
    
    @Illuminati
    @RequestMapping(value = "test2")
        public String test2 (String a, Integer b) throws Exception {
            String testJson = "{\"test\" : 2}";
            return testJson;
        }
}

(Optional) add to Javascript in HTML & initialization

* javascript
<script src="/js/illuminatiJsAgent.js"></script>
<script type="text/javascript">
    illuminatiJsAgent.init();
</script>   

add illuminati consumer

  1. Easily add Consumer using Spring Cloud Stream
  2. Consumer can transfer data. (ElasticSearch, MongoDB, MySQL, Hadoop, etc.)
    • Multiple consumers can receive the same Event data.
    • It is easy to increase throughput by dividing data from many consumers.

Illuminati data can be used in Kibana

  • Sample of Commerce Data.

image

License

Project illuminati is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

Copyright 2017 Phoboslabs.me.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

illuminati's People

Contributors

asomejay avatar dependabot[bot] avatar leekyoungil 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  avatar  avatar

Watchers

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

illuminati's Issues

Code refactoring Kafka client

  • The PublishMessageException modify to extends exception
  • Modify the SendToIlluminatu method of exception
  • Add method the wait befor close of the Kafka, RabbitMQ client
  • Modify the Kafka sync type
  • Code refactoring

Kafka cluster healthCheck bug fix

The Kafka works even if only one server is alive.
But now all Kafka servers(broker) must be running, so the illuminati work.

fix Even if only one is alive. work without problem.

Add nullSafeEquals method for Object compare

When we compare Object values, if it enters more than 2depth, it may become a bit annoying.

For example

class Bar {
    String testBarString = "test";
}

class Foo {
    Bar bar = new Bar();
}

Foo foo = new Foo();

if ( foo.getBar() != null && "test".equals(foo.getBar().getTestBarString()) ) {
    // TODO
}

So I will made a feature that can be compared at once and is null safe.

for example...

// AS-IS
if ( foo.getBar() != null && "test".equals(foo.getBar().getTestBarString()) ) {
    // TODO
}

// TO-BE
if ( ObjectUtils.nullSafeEquals(foo, "bar.testBarString", "test') ) {
    // TODO
}

Improve code with Java8 style

At first, the Project illuminati was to develop with the Java6 style.
No more, do not have to support the Java6.

Because. to improve code with the Java8 style.

Add simple trace view mode

Without the need for other infra solution.
Allows simple trace viewing by itself.

Support for clustering in the future.

deploy maven central

Currently, The Project illuminati is deployed in the Jcenter.
But, the Jcenter has gone. It is not coming back.
Because. The Project illuminati move to the Maven central.

Remove the existing TestCase and create a new one

As the Source code kept changing, I didn't care about the Test cases
As a result, the number of test cases that did not work properly increased.

Delete all existing tests and create new ones.

And it solves the issues in the sonarcube.

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.