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

Duration for async one way span #24

Open
DarwinSin opened this issue Jul 8, 2020 · 5 comments
Open

Duration for async one way span #24

DarwinSin opened this issue Jul 8, 2020 · 5 comments

Comments

@DarwinSin
Copy link

The duration of an async one way span is not captured on the Zipkin UI. The span is shared across processes, with only ‘cs’ and ‘sr’ annotations captured at the client and server side respectively. There is an explicit Start and flush in both client and server. No spam.finish invoked anywhere. The trace json from the zipkin server shows 2 spans with the same Id, each having the correct time stamp and no duration. I effectively want to see the duration of this entire span from Cs to Sr . - I see this information on the right tab of the span as ‘Relative Time’ under the ‘Server Start’ annotation. But the actual span does not show the duration bar.
Using 2.21 version of zipkin with inmemory storage and java brave client library.
Am I missing anything, or is this the expected behaviour?

@codefromthecrypt
Copy link
Member

@DarwinSin we've deprecated the practice of one-way for the reason you mention

@codefromthecrypt codefromthecrypt transferred this issue from openzipkin/zipkin Jul 9, 2020
@DarwinSin
Copy link
Author

@DarwinSin we've deprecated the practice of one-way for the reason you mention

So if I want to capture the duration between processes in a span, how do I go about it?

@codefromthecrypt
Copy link
Member

span should use normal start/finish apis. the duration between different spans is currently not done anywhere except in the trace view

@DarwinSin
Copy link
Author

When sharing spans across processes, the normal start and finish would work though, would it?
Are there any recommendations on how this can be modelled/implemented?

@codefromthecrypt
Copy link
Member

@DarwinSin sharing spans across processes is an anti-practice at this point. the only use case to share a span ID is client+server for legacy reasons, and in modeling that, both should have timestamp and duration, and the server-side have the "shared" flag set to disambiguate it.

https://github.com/openzipkin/zipkin-api/blob/master/zipkin2-api.yaml

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

2 participants