Created
March 31, 2014 18:16
-
-
Save sprsquish/9898660 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.twitter.zipkin.collector | |
import com.twitter.finagle.stats.StatsReceiver | |
import com.twitter.server.TwitterServer | |
import com.twitter.util.{Await, Future} | |
import com.twitter.zipkin.storage.cassandra.CassieSpanStoreFactory | |
import com.twitter.zipkin.common.Span | |
import com.twitter.zipkin.receiver.scribe.ScribeSpanReceiverFactory | |
import com.twitter.zipkin.storage.WriteSpanStore | |
import com.twitter.zipkin.zookeeper.ZooKeeperClientFactory | |
object ZipkinCollectorServer extends TwitterServer | |
with ZipkinQueuedCollectorFactory | |
with CassieSpanStoreFactory | |
with ZooKeeperClientFactory | |
with ScribeSpanReceiverFactory | |
{ | |
def newReceiver(receive: Seq[Span] => Future[Unit], stats: StatsReceiver): SpanReceiver = | |
newScribeSpanReceiver(receive, stats.scope("scribeSpanReceiver")) | |
def newSpanStore(stats: StatsReceiver): WriteSpanStore = | |
newCassieStore(stats.scope("cassie")) | |
def main() { | |
val collector = newCollector(statsReceiver) | |
onExit { collector.close() } | |
Await.ready(collector) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment