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

I got several questions about trace wanna discuss with you. #3

Closed
leonly0224 opened this issue May 4, 2014 · 3 comments
Closed

I got several questions about trace wanna discuss with you. #3

leonly0224 opened this issue May 4, 2014 · 3 comments

Comments

@leonly0224
Copy link

hi, me again :)
I used brave-resteasy-example to build a trace demo, after run them, I try to understand the data struce, so i looking into database.

table_zipkin_spans.

span_id parent_id trace_id span_name debug duration
-1015356763606953178 -7464383308562486440 -7464383308562486440 /brave-resteasy-example/b 0 888000
-1015356763606953178 -7464383308562486440 -7464383308562486440 /RestEasyTest/brave-resteasy-example/b 0 896000
-7464383308562486440 -7464383308562486440 /brave-resteasy-example/a 0 956000

I have some questions blow.
1.I got three spans, one for a, and two for b, and there are two annotations (sr,ss)
) for a, and four annotation(cs,sr,ss,cr) for b. I guess you put the cs and cr annotation that occured by call a->b into span b.

2.why does the same spans b has two different span names (/brave-resteasy-example/b and /RestEasyTest/brave-resteasy-example/b)?

3.It seams like the dependencies tab not working. so I build my own test datas several times, and insert them into database, the only date that works fine lists below.

span_id parent_id trace_id span_name duration annotations
1 10 a 10000 sr,cr,cs,ss
2 1 10 b 9500 sr,ss

a.one name for one host.
b.one span for one host.(if not, e.g. host b have two spans with same span id(id=2), and this span id(id=2) associated with four annotations(sr,cr,cs,ss), in zipkin front UI these four annotations would be display twice for span b, that would be eight annotations)
c.host always have server part annotations(if don't have one, zipkin will make fake one), but client part annotations is not always needed.

If I generated two spans for one host, the only way avoid double annotations is like you did above, to give them different span name. but which name will be displayd in front is not so sure.

@kristofa
Copy link
Member

kristofa commented May 4, 2014

Hi,

The different span names are because the different ways for defining span names when processing client side (BraveClientExecutionInterceptor) and server side (BravePreProcessInterceptor). The client side uses

final URL url = new URL(request.getUri());
spanName = url.getPath();

while server side uses

request.getPreprocessedPath()

And if I'm not mistaken if the span names are different zipkin-web will take one randomly. So this gives inconsistent results. This can be considered a bug.

I'll look into you other questions later.

@kristofa
Copy link
Member

Hi,

If you run the example application 'as is' you will see that 4 span entries are logged to console. 2 for 'a' and 2 for 'b'. So a pair for both. Each pair consists of one client side entry with 'cs, cr' annotations, and one server side entry with 'sr, ss' annotations. That's how it is supposed to work.

If I use the Cassandra back-end they are correctly displayed in zipkin-web.

Which back-end do you have configured?
I know there were issues with the other back-ends. See also a previous reported issue.

@kristofa
Copy link
Member

I fixed the differences in span names in client vs server side. It is checked in and verified by test.

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

No branches or pull requests

3 participants