Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Dependency graph endpoints 2 #128

Closed
wants to merge 110 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

jerryli9876 commented Aug 28, 2012

Part 1 redux of several pull requests that will make up the dependency graph.

Fixed some minor issues with the hadoop scripts, and with email.mustache.
Added dependency graph endpoints on the server side.

There are a few files such as QueryService and Index that changed that I didn't touch...not sure what's going on there.

johanoskarsson and others added some commits Jun 6, 2012

@johanoskarsson johanoskarsson Linkify the Twitter accounts in the README. e9ee209
@johanoskarsson johanoskarsson Make the required changes to let us create releases 25aae4a
@johanoskarsson johanoskarsson Change version to 0.2.0-SNAPSHOT 79d28ed
Franklin Hu s/ui/UI/
Author: franklinhu
Pull Request: #6
URL: #6
c21b39b
Franklin Hu zipkin-web: query result sorting
Allow sorting by:
- timestamp (asc|desc)
- duration (asc|desc)

Author: franklinhu
Pull Request: #9
URL: #9
a7d393d
@johanoskarsson johanoskarsson Added a section to the readme describing how to instrument a library
Author: johanoskarsson
Pull Request: #10
URL: #10
3179777
@johanoskarsson johanoskarsson Seems the EB repo has moved. Updated the url
Author: johanoskarsson
Pull Request: #14
URL: #14
08e3910
Franklin Hu zipkin-web: sort order fix
- Sort query results correctly when doing additional searches
- Fix typo

Author: franklinhu
Pull Request: #16
URL: #16
de8b7fc
Franklin Hu zipkin-tracer gem
Add tracing to a Rack application

- In config.ru: `use ZipkinTracer::RackHandler`
- Configurable in Rails configs

Author: franklinhu
Pull Request: #13
URL: #13
b4f2198
@johanoskarsson johanoskarsson Fix the hadoop command, tools class no longer needed. Update readme
Author: johanoskarsson
Pull Request: #18
URL: #18
66bb8e5
Franklin Hu zipkin-query gem
Split access to Zipkin Query service out into separate gem
- Fix generated ruby namespacing in `zipkin-thrift`
- Thrift files are symlinked in `zipkin-gems/zipkin-query/thrift`, and
  the generated code is in `zipkin-gems/zipkin-query/vendor`

Author: franklinhu
Pull Request: #19
URL: #19
f05094c
Franklin Hu Split common classes into zipkin-common
- 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
b7534c3
Franklin Hu zipkin-query gem thrift fix
- Needed `Endpoint` thrift structs, so moved through over from `zipkin-web/lib`
- Bumped version `0.0.1` -> `0.0.2`

Author: franklinhu
Pull Request: #21
URL: #21
8edcc1b
Franklin Hu Tear down ZK server after test is finished
Author: franklinhu
Pull Request: #23
URL: #23
a4fbcf7
@johanoskarsson johanoskarsson Reduce the garbage generated in the collector. Before we got about 40…
…0kb of garbage per sampled request, after it's at about 300kb.

Includes these changes
* don't recalculate the lowercase version of service names in span each time they are used
* don't create the incoming data log message unless debug is turned on
* reuse some data instead of recalculating when indexing in Cassandra

Author: johanoskarsson
Pull Request: #25
URL: #25
02fbd24
Franklin Hu Merge branch 'master' of github.com:twitter/zipkin 46574a9
Franklin Hu zipkin-scrooge
Pull scrooge/thrift dependency out of `zipkin-common` and `zipkin-server` into `zipkin-scrooge`. This will allow us to do further refactoring easily.
- Add `AnnotationType` and `BinaryAnnotation` classes for direct mirroring of thrift structs
- Unify `toThrift` and `fromThrift` methods in `ThriftAdapter` that handles the different structs defined in the thrift file. We can in the future make this configurable in the collector service.
- Use one set of `Constants` rather than the thrift generated ones
- Fix tests
  - Move thrift related tests to `ThriftAdapterSpec`

Author: @franklinhu
Pull Request: #24
URL: #24
8dad6f2
Franklin Hu Make Github commit author linkable
Author: @franklinhu
Pull Request: #26
URL: #26
a168cba
Franklin Hu Move Scribe collector/config to zipkin-scribe
Move the Scribe specific code to a new module: `zipkin-scribe` including:
- ScribeCollectorService
- ScribeCollectorService related configs
- collector-dev config
- Main class
- related tests

The collector can no longer be run from `zipkin-server`.

Author: @franklinhu
Pull Request: #27
URL: #27
73105fd
@johanoskarsson johanoskarsson Two simple tests for the ServerResponsetime Hadoop jobs
Author: @johanoskarsson
Pull Request: #28
URL: #28
741c3c9
@johanoskarsson johanoskarsson Move the ServerResponsetimeSpec into the correct directory
Author: @johanoskarsson
Pull Request: #29
URL: #29
0a3d75e
Franklin Hu Modularize remaining collector Scribe dependencies
This change makes it easier to extend the collector to accept different
input types. Doing so would only require writing an `Adapter` and a
`ProcessFilter`.

Changes:
- Add `ProcessorFilter`
  - Composable filter on top of `Processor`s that can transform the
    input data type
- Move all deserialization and extraction of data from
  `CollectorService` and `WriteQueueWorker` to Scribe related
  `ProcessFilter` and `Processor`.
- `WriteQueueWorker` now takes only one `Processor` rather than a
  sequence of them.
- Add `FanoutProcessor` to blast work to multiple `Processor`s
- Update README with module diagram

Author: @franklinhu
Pull Request: #31
URL: #31
9e5c223
@johanoskarsson johanoskarsson Add two simple startup scripts for the collector and query daemons
Author: @johanoskarsson
Pull Request: #32
URL: #32
074a775
Franklin Hu Add package dist name for zipkin-scribe
Author: @franklinhu
Pull Request: #33
URL: #33
b9e485a
Franklin Hu Pull out msg from Thrift struct in ScribeCollectorService
Move code that pulls out the base64 encoded Span from the Thrift struct back to
the CollectorService since putting the entire Thrift struct in the write queue
causes major GC regression.

Author: @franklinhu
Pull Request: #34
URL: #34
7602367
Franklin Hu Misc changes
* Add metric for batch size (how many entries are added to the write queue)
* Remove `OstrichProcessor` from default processors

Author: @franklinhu
Pull Request: #35
URL: #35
dc22e0e
Franklin Hu Bump versions, Cassandra fix
* Bump to
  * finagle 5.1.0
  * ostrich 8.1.0
  * util 5.2.0
* Only close a cassie keyspace if it has not already been closed

Author: @franklinhu
Pull Request: #39
URL: #39
bb3902c
@johanoskarsson johanoskarsson Make changes needed to build on travis-ci
Adds the travis-ci maven repositories for faster downloads.

Reduces sbt memory used so it doesn't try to grab more than the travis-ci nodes have. If this poses a problem elsewhere we can just have a specific travis-ci sbt script.

Author: @johanoskarsson
Pull Request: #41
URL: #41
a08e4fc
Franklin Hu Fix build.properties output package
Sets correct package com.twitter.zipkin for build.properties. This
fixes the issue where curling host:post/server_info.txt returns
unknown values.

Author: @franklinhu
Fixes #42
URL: #42
bb89394
Franklin Hu Remove unnecessary github api call
Including the string "Fixes #..." automatically closes a pull request

Author: @franklinhu
Fixes #43
URL: #43
af5a1ee
Franklin Hu Add syntax highlighting to README code blocks
Author: @franklinhu
Fixes #44
URL: #44
cd9c4e0
@johanoskarsson johanoskarsson Clarify the Scribe setup documentation.
No need to push for the Twitter Scribe version

Author: @johanoskarsson
Fixes #45
URL: #45
9f11f96
Franklin Hu Misc fixes
* Cleaner summing of scribe message size
* Remove unnecessary `GlobalSampler` dependency from `WriteQueue`,
  `WriteQueueWorker`

Author: @franklinhu
Fixes #40
URL: #40
d1618c6
Franklin Hu Top annotations
Add collector and query support for adding "top annotation" data that may be
computed offline

* New collector endpoints
  * `storeTopAnnotations`
  * `storeTopKeyValueAnnotations`
* New query endpoints
  * `getTopAnnotations`
  * `getTopKeyValueAnnotations`

Author: @franklinhu
Fixes #46
URL: #46
641ab4c
Franklin Hu Add StatsProcessor
Author: @franklinhu
Fixes #48
URL: #48
27b0f50
Franklin Hu Update zipkin-query gem
* Generate Ruby with new Thrift changes
* Bump version number

Author: @franklinhu
Fixes #49
URL: #49
aacd84d
Franklin Hu Add annotation suggestions support in UI
* Upgrade to zipkin-query v0.0.3
* Add autocomplete dropdown with suggestions if they exist

Author: @franklinhu
Fixes #50
URL: #50
ff04826
Franklin Hu Add static query linking
* Show 'link' button for linking
* pushState the query params so going 'back' from a trace page loads
  the original search results

Author: @franklinhu
Fixes #51
URL: #51
dd9ca09
@jerryli9876 jerryli9876 Hadoop jobs
Added a bunch of scalding queries and tests

DependencyTree : Finds out how often services call each other throughout the entire system

MemcacheRequest : Find out how often each service does memcache accesses

MostCommonCalls : For each service finds the services that it most commonly calls

PopularKeys : Per service, find the 100 most common keys used to annotate spans involving that service

Timeouts : Find which service calls timeout the most

WorstRuntimes : Obtain the IDs and the durations of the one hundred service calls which take the longest per service

sources/Preprocessed : Preprocesses the data by merging different pieces of the same span and finds the best client side and service names possible, if any exist

sources/Util : Added a collection of useful functions throughout the library

Author: @jerryli9876
Fixes #47
URL: #47
c169c8c
Franklin Hu zipkin-web: Remove filtering of empty spans
Remove filtering of empty spans to fix UI side bug for case where span only has
a KV annotation

Author: @franklinhu
Fixes #53
URL: #53
ff71364
@jerryli9876 jerryli9876 Made preprocessing more complete
Preprocessed : Now only merges spans
FindNames : Finds client side and service
names
FindIDtoNames : Finds (id, service name)
Other files modified to
accommodate these

Author: @jerryli9876
Fixes #54
URL: #54
fad482d
Franklin Hu Scribe cleanup
* Move scribe reference from ZipkinCollectorConfig to zipkin-scribe
* Move scribe categories config to ScribeZipkinCollectorConfig

Author: @franklinhu
Fixes #55
URL: #55
d01971f
@johanoskarsson johanoskarsson Add some traces for our own query process
Lazy val the rootmost span, no point in regenerating that

Author: @johanoskarsson
Fixes #56
URL: #56
8f6bdcd
@jerryli9876 jerryli9876 Added ExpensiveEndpoints and test files
ExpensiveEndpoints : Per service call, finds the average duration

ExpensiveEndoints : per service call, finds average run time
Util.scala :
Changed repeatSpan to allow it to model API level requests

Author: @jerryli9876
Fixes #58
URL: #58
b8314e4
@jerryli9876 jerryli9876 Removed client name buisness from code
Simplified stuff to remove the need to store client names in SpanServiceName

Author: @jerryli9876
Fixes #60
URL: #60
8399069
@johanoskarsson johanoskarsson Add a note that it is possible to not use Scribe at all
Author: @johanoskarsson
Fixes #59
URL: #59
286b027
Franklin Hu Move ZooKeeper configs/client service to common
Author: @franklinhu
Fixes #61
URL: #61
8528eac
Franklin Hu Move TraceSummary to zipkin-common
Author: @franklinhu
Fixes #62
URL: #62
1807e47
@jerryli9876 jerryli9876 Run hadoop jobs
Renamed job-runner and made Processor accept both popular annotations and
popular keys

Author: @jerryli9876
Fixes #64
URL: #64
8eb2005
@jerryli9876 jerryli9876 Removed leading space
ProcessPopularKeys added a leading space; removed it

Author: @jerryli9876
Fixes #65
URL: #65
54692f4
Franklin Hu Move Trace to zipkin-common (part 1)
Moved TraceTimeline and TimelineAnnotation to zipkin-common, pulled out
some thrift dependencies

Author: @franklinhu
Fixes #66
URL: #66
3a32463
Franklin Hu Move trace (part 2)
* Move Trace to zipkin-common
* Pull out thrift dependencies into zipkin-scrooge

Author: @franklinhu
Fixes #67
URL: #67
db5487c
Franklin Hu fixed zipkin-web to actually return values from servers
Ruby 1.9.3 fixed a problem where do loops were sometimes not returning their
last value. However, for compatibility with 1.9.2, the with_transport do loops
need their last value to be assigned to a variable with a greater scope than the
do loop, ie to be initialized outside of the do loop and then assigned within.
Either the necessary ruby version should be specified in the documentation, or
this fix needs to be pulled in.

Author: @mosesn
Fixes #68
URL: #68
7b48932
@jerryli9876 jerryli9876 Script run jobs
Move error code to WhaleReport, fixed typo in run.sh and added comments to
run_job.sh

Author: @jerryli9876
Fixes #70
URL: #70
cfba24b
@johanoskarsson johanoskarsson Add duration to annotations.
Useful for timing blocks of code or other operations that don't warrant a full
Span.

Author: @johanoskarsson
Fixes #72
URL: #72
3d2a9c2
Franklin Hu Add static trace rendering page
* Add export button on trace page
* Add /static to allow users to paste in the exported JSON to render
  the trace page

Author: @franklinhu
Fixes #73
URL: #73
25a311d
@johanoskarsson johanoskarsson Remove the compression and deserializing annotations. They lead to wa…
…y too many annotations and make it hard to see what is actually going on.

Author: @johanoskarsson
Fixes #74
URL: #74
72900b6
Franklin Hu Finatra
Port `zipkin-web` from Rails to Scala (using Finatra) for a variety of reasons
- Simpler deployment (all JVM-based)
- Simpler web logic (no need to replicate all the common data classes)
- Operational transparency

Changes:
- JsonAdapter and JsonQueryAdapter
- necessary since Javascript doesn't really support Longs, so we need
  to convert them to strings

Author: @franklinhu
Fixes #75
URL: #75
b1c8dfa
@johanoskarsson johanoskarsson Readding counts by category.
Useful for finding out when to turn of b3 but also for figuring out the hdfs
issue

Author: @johanoskarsson
Fixes #77
URL: #77
dd25b80
@jerryli9876 jerryli9876 Added WhaleReport and spec
WhaleReport finds all traces w/ 500 Internal Server Errors and finds all spans
in those traces with retries and/or timeouts

Author: @jerryli9876
Fixes #71
URL: #71
27987b5
Franklin Hu Fix 404 in README (link to zipkin.thrift) f7a2850
Franklin Hu Fix merge from forks
Author: @franklinhu
Fixes #78
URL: #78
a70cb0e
Franklin Hu Misc finatra fixes
- Fix span details modal on static trace page
- Remove unnecessary code
- Sort span annotations by timestamp when dumping to json

Author: @franklinhu
Fixes #80
URL: #80
baaea73
Franklin Hu Add release doc, changelog
Author: @franklinhu
Fixes #82
URL: #82
58c3851
Franklin Hu Bump master to 0.3.0-SNAPSHOT
Author: @franklinhu
Fixes #83
URL: #83
f4e1f72
@jerryli9876 jerryli9876 Modified scripts to fix minor bug
Modifications to run_job.sh amd run_all_jobs.sh and SpanSource to allow us to
run jobs remotely

Author: @jerryli9876
Fixes #79
URL: #79
2082fc8
Franklin Hu Bump finatra
- Bump Finatra version to 0.2.1
- Fixes for Finatra changes

Author: @franklinhu
Fixes #84
URL: #84
f6e8543
@johanoskarsson johanoskarsson Replace the word submit on the lookup page with Find traces. That exp…
…lains what will happens better.

Author: @johanoskarsson
Fixes #85
URL: #85
a5e1ee3
@johanoskarsson johanoskarsson Adds ability to receive debug flag from Finagle. If the debug flag is…
… set on a span we ensure it is stored. This allows developers to force tracing on a request

Author: @johanoskarsson
Fixes #86
URL: #86
a75e854
Franklin Hu Bump Twitter lib versions, cleanup
- Upgrade Twitter library versions
  - cassie: `0.22.0` -> `0.22.1`
  - finagle: `5.1.0` -> `5.3.1`
  - ostrich: `8.1.0` -> `8.2.1`
  - util: `5.2.0` -> `5.3.1`
- Clean up `Project.scala` slightly

Author: @franklinhu
Fixes #87
URL: #87
c79a7fc
Franklin Hu QueryService refactor
Author: @franklinhu
Fixes #88
URL: #88
a2f42a0
Franklin Hu Common refactor
- Move `Trace`, `TraceSummary` from `common` package to `query` since
  they are only used in the query service.
- Cleanup from the move

Author: @franklinhu
Fixes #89
URL: #89
391aef2
Franklin Hu Trace: merge spans and sort by timestamp by default
Author: @franklinhu
Fixes #91
URL: #91
9980e41
Franklin Hu Uncomment spec assertion
As @mosesn mentioned in #90

Author: @franklinhu
Fixes #93
URL: #93
cd65332
Franklin Hu Fix time skew adjustment for client sends with 127.0.0.1 as host IP
Author: @franklinhu
Fixes #94
URL: #94
9914ff4
@johanoskarsson johanoskarsson Use the new finagle-thrift version with flags.
Author: @johanoskarsson
Fixes #95
URL: #95
78a6fec
@johanoskarsson johanoskarsson Added this gem by mistake. Removing 4c4c3f0
@johanoskarsson johanoskarsson Grep by annotations value. Useful for finding particular trace ids
Author: @johanoskarsson
Fixes #97
URL: #97
4025721
Franklin Hu Remove Trace dependency from Storage
Rather than returning a Trace from Storage, return a sequence of Spans and let
the QueryService deal

Author: @franklinhu
Fixes #98
URL: #98
cd48498
@jerryli9876 jerryli9876 Add endpoints. Made clients to postprocess hadoop jobs
Made postprocessing framework, so that it is straightforward to add new
endpoints. Made postprocessors which write to servers and files.

Author: @jerryli9876
Fixes #92
URL: #92
bc52d61
@jerryli9876 jerryli9876 Added tracesExist support
traceExist queries the database to find which traces from a list are actually in the database

Author: @jerryli9876
Fixes #100
URL: #100
6449ab7
Franklin Hu Trace spec refactor
- Move Thrift conversion spec to ThriftQueryAdapter
- Replace thrift/scrooge dependencies with comparable common
  dependencies
- Move TraceSpec to zipkin-common

Author: @franklinhu
Fixes #101
URL: #101
684b4fe
Franklin Hu Add finatra start script
Author: @franklinhu
Fixes #103
URL: #103
45d3c06
Franklin Hu zipkin-finatra fixes
- Bump to Finatra `0.2.3`
- Fix /api/query response
- Fix timestamp text on query results

Author: @franklinhu
Fixes #104
URL: #104
4795387
@jerryli9876 jerryli9876 Make traces exist gem
- Added has-sampled.rb, which uses tracesExist
- Bumped zipkin-query to 0.1.0
-
Added tracesExist to thrift files and generated ruby code

Author: @jerryli9876
Fixes #105
URL: #105
3d12d9c
@jerryli9876 jerryli9876 Preliminary Version of formatting emails using Mustache
Made all the line processing simpler by using only lists

Removed standardization
stuff for now in ServiceNameList

using mustachejava to format all email service
reports

Author: @jerryli9876
Fixes #102
URL: #102
d580d87
Franklin Hu Fixup Scribe script, add a localhost Finatra config
- Fix issue in collector.sh (referencing the wrong JAR)
- Add config file for Finatra which uses the localhost zookeeper and
  doesn't override the queryhost

Author: @glynd
Fixes #106
URL: #106
9e266b0
@jerryli9876 jerryli9876 Upgrade Gemfile in zipkin-web
Author: @jerryli9876
Fixes #107
URL: #107
94460a5
Franklin Hu Remove annotations in ScroogeThriftCodec
Author: @franklinhu
Fixes #113
URL: #113
32dd9c6
Franklin Hu Bump Twitter lib versions
- Cassie `0.22.1` to `0.23.0`
- Finagle `5.3.1` to `5.3.5`
- Ostrich `8.2.1` to `8.2.3`
- Util `5.3.1` to `5.3.6`
- Cassie `Cluster` constructor change for new lib

Author: @franklinhu
Fixes #111
URL: #111
9c5c96b
Franklin Hu Improve local js,css development
Making changes to js,css can be painful with a packaged jar since a
compilation is needed to repackage any new changes. This change allows
for the paths to the static resources to be configured at runtime.
While developing locally, you can then set the prefix to bypass the jar
and the browser will resolve it on your local filesystem.

Author: @franklinhu
Fixes #112
URL: #112
dea7d78
Franklin Hu Update docs for local development
- Fix previously incorrect documentation on local development for UI

Author: @franklinhu
Fixes #114
URL: #114
a976e48
Franklin Hu Upgrade to Finatra 0.2.4
- Includes controller method level stats (time for each request)

Author: @franklinhu
Fixes #115
URL: #115
0d8ec15
@johanoskarsson johanoskarsson Added Centos6 quick start & fixed that bin/sbt '[' annoyance
First sane draft of a quick start on centos6
Also fixed the SBT '[' thing as
it's been bugging me (#30)

Author: @glynd
Fixes #116
URL: #116
0bdcd9f
Franklin Hu Backbone (part 1)
Initial changes to move the front end JS to Backbone
- Span, Service Name models
- Index page service name, span name populated through Backbone models/views
- Some Finatra side changes to accommodate Backbone

Author: @franklinhu
Fixes #118
URL: #118
03247bb
@johanoskarsson johanoskarsson Ensure that we can receive Scribe messages with endline at the end
Some codestyle changes and removed a few lines of unused code in my quest to
find the right code to test :)

Author: @johanoskarsson
Fixes #117
URL: #117
f6fbc6a
Franklin Hu Fix query service error counter
Author: @franklinhu
Fixes #120
URL: #120
edb79fd
Franklin Hu Add license headers
Author: @franklinhu
Fixes #119
URL: #119
59999c7
Franklin Hu Backbone (part 2)
- Remove some Rails-isms in JS files
- Backbone-ify index querying

Author: @franklinhu
Fixes #122
URL: #122
b758814
Franklin Hu Trace Finatra app
Author: @franklinhu
Fixes #123
URL: #123
15d4cee
Franklin Hu Fix NPE when querying for time annotations
Author: @franklinhu
Fixes #121
URL: #121
238816e
Franklin Hu Merge branch 'master' of github.com:twitter/zipkin 655d877
@jerryli9876 jerryli9876 Merge branch 'master' of https://github.com/twitter/zipkin 14f3e5f
@jerryli9876 jerryli9876 Add dependency graph endpoints e8d4e85
@jerryli9876 jerryli9876 Reverted unwanted changes d31ebf9

@johanoskarsson johanoskarsson commented on an outdated diff Aug 28, 2012

...src/main/scala/com/twitter/zipkin/storage/Index.scala
@@ -48,7 +47,7 @@ trait Index {
* Only return maximum of limit trace ids from before the endTs.
*/
def getTraceIdsByAnnotation(serviceName: String, annotation: String, value: Option[ByteBuffer],
- endTs: Long, limit: Int): Future[Seq[IndexedTraceId]]
+ endTs: Long, limit: Int): Future[Seq[Long]]
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

You need to pull in master

@johanoskarsson johanoskarsson and 1 other commented on an outdated diff Aug 28, 2012

...finatra/src/main/resources/public/css/application.css
@@ -680,4 +680,4 @@ div#annotation-modal {
width: 700px;
}
-/* END show.html.erb */
+/* END show.html.erb */
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

Nop diff

@jerryli9876

jerryli9876 Aug 28, 2012

Contributor

I honestly can't figure out what the diff here is. The version in my repo is exactly the same as the one in master.

@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

Do a git checkout master filename to get that version

@johanoskarsson johanoskarsson commented on an outdated diff Aug 28, 2012

...ain/scala/com/twitter/zipkin/query/QueryService.scala
@@ -324,7 +324,7 @@ class QueryService(storage: Storage, index: Index, aggregates: Aggregates, adjus
*/
private def getTraceIdDurations(
traceIds: Future[Seq[Long]]
- ): Future[Seq[TraceIdDuration]] = {
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

Nop diff

@johanoskarsson johanoskarsson commented on an outdated diff Aug 28, 2012

...er/zipkin/storage/cassandra/CassandraAggregates.scala
val Delimiter: String = ":"
/**
* Get the top annotations for a service name
*/
+ def getDependencies(serviceName: String): Future[Seq[String]] = {
+ getDependencies(serviceName)
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

Isn't this calling itself?

@johanoskarsson johanoskarsson commented on an outdated diff Aug 28, 2012

zipkin-server/src/schema/cassandra-schema.txt
+create column family TopAnnotations with comparator = LongType;
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

Let's add a comment here describing each these two column families.

@johanoskarsson johanoskarsson commented on the diff Aug 28, 2012

...er/zipkin/storage/cassandra/CassandraAggregates.scala
@@ -70,6 +80,17 @@ trait CassandraAggregates extends Aggregates with Cassandra {
}
/** Synchronize these so we don't do concurrent writes from the same box */
+ def storeDependencies(serviceName: String, endpoints: Seq[String]): Future[Unit] = synchronized {
+ val remove = dependencies.removeRow(serviceName)
+ val batch = dependencies.batch()
+ endpoints.zipWithIndex.foreach { case (endpoint: String, index: Int) =>
+ batch.insert(serviceName, new Column[Long, String](index, endpoint))
+ }
+ remove()
@johanoskarsson

johanoskarsson Aug 28, 2012

Contributor

You shouldn't have to block here, but instead chain the futures so you can return one that executes this first and then the batch

Contributor

johanoskarsson commented Aug 28, 2012

+1 except for the blocking part above.

@adriancole adriancole added a commit that referenced this pull request Jun 3, 2016

@adriancole adriancole Merge pull request #128 from anuraaga/fix_spans
Fix all service names and span names not being returned because the d…
7ebc8ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment