Giter Site home page Giter Site logo

malafeev / java-specialagent-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opentracing-contrib/java-specialagent-demo

0.0 1.0 0.0 11.03 MB

A SpecialAgent Demo

License: Apache License 2.0

JavaScript 12.72% CSS 11.36% HTML 6.27% Makefile 4.34% Java 65.31%

java-specialagent-demo's Introduction

MicroDonuts: An OpenTracing SpecialAgent Demo

Build Status

Welcome to MicroDonuts! This is a SpecialAgent demo application, written in Java, based on the original OpenTracing walkthrough.

OpenTracing is a vendor-neutral, open standard for distributed tracing. To learn more, check out opentracing.io, and try the demo application below!

Step 0: Setup MicroDonuts

Getting it

Clone this repository and build the jar file (for this, Maven must be installed):

git clone [email protected]:opentracing-contrib/java-specialagent-demo.git
cd java-specialagent-demo/microdonuts
make

Running

MicroDonuts has two server components, API and Kitchen, which communicate each other over HTTP - they are, however, part of the same process:

cd java-specialagent-demo/microdonuts
make run-no-agent

In your web broswer, navigate to http://127.0.0.1:10001 and order yourself some µ-donuts.

Run with the SpecialAgent and a Tracer

First, please download the latest SpecialAgent JAR and move it to the microdonuts directory:

mv opentracing-specialagent-*.jar microdonuts/

Jaeger

To run Jaeger locally (via Docker):

$ docker run -d -p 5775:5775/udp -p 16686:16686 jaegertracing/all-in-one:latest

To run MicroDonuts with Jaegger, configuration has to be specified through environment variables:

cd microdonuts
make run-with-jaeger

Note that the all-in-one docker image presents the Jaeger UI at localhost:16686.

LightStep

If you have access to LightStep, you will need your access token. Add the following to ls_config.properties:

ls.accessToken=XXXXXXXXXXXXXXX  // TODO: replace with your token

To run MicroDonuts with LightStep:

cd microdonuts
make run-with-lightstep

Provide your own Tracer

A provided jar containing any TracerFactory provider can be used to run MicroDonuts too:

cd microdonuts
env TRACER_JAR=MyOwnTracer.jar make run-with-tracer-jar

Now that we're all hooked up, try ordering some donuts in the browser. You should see the traces appear in your tracer.

Search for traces starting belonging to the MicroDonuts component to see the patterns of requests that occur when you click the order button.

Thanks for playing, and welcome to OpenTracing!

Thanks for joining us in this walkthrough! Hope you enjoyed it. If you did, let us know, and consider spreading the love!

A great way to get the feel for OpenTracing is to try your hand at instrumenting the OSS servers, frameworks, and client libraries that we all share. If you make one, consider adding it to the growing ecosystem at http://github.com/opentracing-contrib. If you maintain a library yourself, plase consider adding built-in OT support.

We also need walkthroughs for languages other than Golang. Feel free to reuse the client, protobufs, and other assets from here if you'd like to make one.

For a more detailed explanation of OSS Instrumentation, check out the Turnkey Tracing proposal at http://bit.ly/turnkey-tracing.

Aloha!

java-specialagent-demo's People

Contributors

bcronin avatar carlosalberto avatar safris 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.