Skip to content

Commit

Permalink
Split common classes into zipkin-common
Browse files Browse the repository at this point in the history
- Moved:
  - `Annotation` (and spec)
  - `Endpoint` (and spec)
  - `IncompleteTraceDataException`
  - `Span` (and spec)
- Left `Trace`, `TraceSummary` in `zipkin-server` since they're
  specific to the query service
- Left `ZooKeeperClientService` since don't want to introduce a ZK
  dependency in common project
- `IncompleteTraceDataException` can be later removed when we pull
  out the Thrift dependencies

Author: franklinhu
Pull Request: #20
URL: #20
  • Loading branch information
Franklin Hu committed Jun 12, 2012
1 parent f05094c commit b7534c3
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 6 deletions.
36 changes: 34 additions & 2 deletions project/Project.scala
Expand Up @@ -91,6 +91,39 @@ object Zipkin extends Build {
val OSTRICH_VERSION = "8.0.1"
val UTIL_VERSION = "5.0.3"

lazy val common =
Project(
id = "zipkin-common",
base = file("zipkin-common"),
settings = Project.defaultSettings ++
StandardProject.newSettings ++
SubversionPublisher.newSettings ++
CompileThriftScrooge.newSettings
).settings(
version := "0.2.0-SNAPSHOT",

libraryDependencies ++= Seq(
"com.twitter" % "finagle-thrift" % FINAGLE_VERSION,
"com.twitter" % "finagle-zipkin" % FINAGLE_VERSION,
"com.twitter" % "ostrich" % OSTRICH_VERSION,
"com.twitter" % "util-core" % UTIL_VERSION,

"com.twitter" % "scrooge" % "3.0.1" intransitive(),
"com.twitter" % "scrooge-runtime_2.9.2" % "3.0.1" intransitive(),

/* Test dependencies */
"org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test",
"org.jmock" % "jmock" % "2.4.0" % "test",
"org.hamcrest" % "hamcrest-all" % "1.1" % "test",
"cglib" % "cglib" % "2.2.2" % "test",
"asm" % "asm" % "1.5.3" % "test",
"org.objenesis" % "objenesis" % "1.1" % "test"
),

CompileThriftScrooge.scroogeVersion := "3.0.1"
)


lazy val server =
Project(
id = "zipkin-server",
Expand All @@ -99,7 +132,6 @@ object Zipkin extends Build {
StandardProject.newSettings ++
SubversionPublisher.newSettings ++
CompileThriftScrooge.newSettings).settings(
name := "zipkin-server",
version := "0.2.0-SNAPSHOT",

libraryDependencies ++= Seq(
Expand Down Expand Up @@ -145,5 +177,5 @@ object Zipkin extends Build {
base =>
(base / "config" +++ base / "src" / "test" / "resources").get
}
)
).dependsOn(common)
}
1 change: 1 addition & 0 deletions zipkin-common/src/main/thrift/zipkinCore.thrift
@@ -1,6 +1,6 @@
/*
* Copyright 2012 Twitter Inc.
*
*
* 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
Expand Down
@@ -1,6 +1,6 @@
/*
* Copyright 2012 Twitter Inc.
*
*
* 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
Expand Down
@@ -1,6 +1,6 @@
/*
* Copyright 2012 Twitter Inc.
*
*
* 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
Expand All @@ -24,7 +24,7 @@ class SpanSpec extends Specification {
val annotationValue = "NONSENSE"
val expectedAnnotation = Annotation(1, annotationValue, Some(Endpoint(1, 2, "service")))
val expectedSpan = Span(12345, "methodcall", 666, None,
List(expectedAnnotation), Nil)
List(expectedAnnotation), Nil)

val annotation1 = Annotation(1, "value1", Some(Endpoint(1, 2, "service")))
val annotation2 = Annotation(2, "value2", Some(Endpoint(3, 4, "service")))
Expand Down

0 comments on commit b7534c3

Please sign in to comment.