Skip to content

dapper tracing implementation for akka-streams and akka-http using htrace and zipkin

Notifications You must be signed in to change notification settings

raam86/akka-stream-trace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitter Chat

Htrace extension for akka http and akka streams

prerequistes:

docker run -d -p 9411:9411 -p 9410:9410 openzipkin/zipkin

running the examples:

sbt examples/run

then choose 1 for http example or 2 for streaming example

The http example will bind to port 8080. point your browesr to localhost:8080/frontend in order to initiate a request.

Getting Started:

The main advantage of using this library is that it eliminates the need for manual calls for logs and lets you focus on the right things, when things break you will still have a clear view into your applications, you can always add anontations later.

The first part of integrating the library is adding a config file, here's a basic example:


htrace{
  span.receiver.classes = org.apache.htrace.impl.ZipkinSpanReceiver
  sampler.classes = org.apache.htrace.core.AlwaysSampler
  zipkin.scribe.hostname = "localhost"

This example tells htrace to use the zipkin receiver, samples all traces and points htrace to localhost as the span server.

if you are using akka-http you are done, if this is a akka-streams applications add this call before your call to run:

val s = StreamTracer.tracer.newScope("compute")

and close the scope after the call to run

s.close()

this method is shown in here https://github.com/FindHotel/akka-stream-trace/blob/master/modules/examples/src/main/scala/BasicStreamExample.scala

Videos:

Tracing akka streams (scalar 2017):

Tracing Akka Steams with htrach

About

dapper tracing implementation for akka-streams and akka-http using htrace and zipkin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%