derailed / ex_ray_tracers

Sample Phoenix apps to demonstrate OpenTracing with Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracers


Motivation

Sample Phoenix applications to demonstrate the use ExRay and OpenTracing via Otter


Up And Running

  1. Start Jaeger Docker Image

    docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
    -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp \
    -p5778:5778 -p16686:16686 -p14268:14268 -p9411:9411 \
    jaegertracing/all-in-one:latest
  2. Start TraceMe Phoenix App

    This is the main application that retrieves available castles and their associated avatars

    You will need to run a local instance of Postgres and modify the db config to match your environment.

    cd traceme
    mix do deps.get, ecto.create, ecto.migrate
    mix run priv/repo/seeds.exs
    mix phx.server
  3. Start Avatars Phoenix App

    This app simulate avatar generation.

    cd avatars
    mix do deps.get, phx.server
    
  4. Open Jaeger UI

    Select the TraceMe service and observe the various spans associated with the api calls below.

      open http://localhost:16686
  5. Exercise the tracing APIs

    # Regular call
    curl -XGET http://localhost:4000/api/castles
    # GenFlow call
    curl -XGET http://localhost:4000/api/castles_flow
    # External Avatar Service call
    curl -XGET http://localhost:4000/api/castles_svc

© 2017 Imhotep Software LLC. All materials licensed under Apache v2.0

About

Sample Phoenix apps to demonstrate OpenTracing with Elixir


Languages

Language:Elixir 90.0%Language:JavaScript 6.7%Language:HTML 3.2%Language:CSS 0.1%