Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds v2 SpanStore and a bridging adapter to v1 #1709

Merged
merged 1 commit into from
Aug 30, 2017
Merged

Conversation

codefromthecrypt
Copy link
Member

@codefromthecrypt codefromthecrypt commented Aug 27, 2017

This represents the minimal read apis needed for Zipkin

As discussed earlier on gitter w/ @basvanbeek, we no longer do
adjustment at storage layer. Essentially, all operations are "raw",
which reduces the responsibility of implementors. This also midly
changes the getTrace call, disallowing it from returning null (as
empty will suffice).

This adds SpanStore which returns Call objects as opposed to replicating
signatures for synchronous and asynchronous invocations. Unlike before,
this does not support "adjustments" rather assumes they happen at a
layer above storage. This decision refines the storage query api to the
following:

Call<List<List<Span>>> getTraces(QueryRequest request);

Call<List<Span>> getTrace(long traceIdHigh, long traceIdLow);

Call<List<String>> getServiceNames();

Call<List<String>> getSpanNames(String serviceName);

Call<List<DependencyLink>> getDependencies(long endTs, long lookback);

A later change might replace the getTrace call with a hex string
parameter.

@codefromthecrypt
Copy link
Member Author

PS once this is in, the v2 http api (openapi/swagger etc) can be implemented. Later, we can formalize and make the java libraries not-internal.

@codefromthecrypt codefromthecrypt force-pushed the call-goodies branch 2 times, most recently from 55c0148 to 176099f Compare August 28, 2017 00:50
@codefromthecrypt codefromthecrypt changed the base branch from call-goodies to master August 28, 2017 01:37
@codefromthecrypt codefromthecrypt force-pushed the spanstore2 branch 2 times, most recently from a6ef2bc to b19b1e3 Compare August 28, 2017 01:54
@codefromthecrypt
Copy link
Member Author

ok all apis are here, and I'll raise two other PRs: one to add the http api and another to implement with elasticsearch. There's still a solid amount of work on this PR, yet, which is to backfill tests and make a v2 replacement for SpanStoreTest

One thing you'll notice is I made a copy of the bridging read api from elasticsearch to here. This is to decouple change. The elasticsearch copy will be deleted later.

cc @anuraaga

@codefromthecrypt
Copy link
Member Author

OK backfilled almost all tests. nearly there

@codefromthecrypt codefromthecrypt changed the title Work In Progress: Adds SpanStore v2 interface Adds v2 SpanStore and a bridging adapter to v1 Aug 29, 2017
This adds SpanStore which returns Call objects as opposed to replicating
signatures for synchronous and asynchronous invocations. Unlike before,
this does not support "adjustments" rather assumes they happen at a
layer above storage. This decision refines the storage query api to the
following:

```java
Call<List<List<Span>>> getTraces(QueryRequest request);

Call<List<Span>> getTrace(long traceIdHigh, long traceIdLow);

Call<List<String>> getServiceNames();

Call<List<String>> getSpanNames(String serviceName);

Call<List<DependencyLink>> getDependencies(long endTs, long lookback);
```

A later change might replace the getTrace call with a hex string
parameter.
@codefromthecrypt codefromthecrypt merged commit 5372659 into master Aug 30, 2017
@codefromthecrypt codefromthecrypt deleted the spanstore2 branch August 30, 2017 01:38
abesto pushed a commit to abesto/zipkin that referenced this pull request Sep 10, 2019
This adds SpanStore which returns Call objects as opposed to replicating
signatures for synchronous and asynchronous invocations. Unlike before,
this does not support "adjustments" rather assumes they happen at a
layer above storage. This decision refines the storage query api to the
following:

```java
Call<List<List<Span>>> getTraces(QueryRequest request);

Call<List<Span>> getTrace(long traceIdHigh, long traceIdLow);

Call<List<String>> getServiceNames();

Call<List<String>> getSpanNames(String serviceName);

Call<List<DependencyLink>> getDependencies(long endTs, long lookback);
```

A later change might replace the getTrace call with a hex string
parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant