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

Tracer implementing Closable #32

Closed
carlosalberto opened this issue Apr 2, 2019 · 5 comments
Closed

Tracer implementing Closable #32

carlosalberto opened this issue Apr 2, 2019 · 5 comments
Labels
Deferred Feature This will be addressed in a future version

Comments

@carlosalberto
Copy link
Contributor

In OT, Tracer implements Closable, which lets users flush pending Spans and dispose related resources.

Is there any point against this for the new API? I don't see any, but let me know ;)

@carlosalberto carlosalberto changed the title Tracer implementing Closable Tracer implementing Closable Apr 2, 2019
@tedsuo tedsuo added the Agreed Issues that the group agreed on. label Apr 2, 2019
@tedsuo
Copy link
Contributor

tedsuo commented Apr 2, 2019

In OT, It was helpful to close the tracer without knowing the underlying implementation.

@bogdandrutu please add Closable unless you object.

@bogdandrutu
Copy link
Member

I think close is not good because the Tracer is shared between multiple threads and race conditions can happen (users need to synchronize the close call, or make sure they close after all the usages of the Tracer). I probably suggest having a "Flush" method if that is needed for tests or for the shutdown hook. Also a good question is if the Flush should be a method on the Tracer implementation or on the main Tracer interface.

@carlosalberto
Copy link
Contributor Author

A flush method is ok - essentially we need a way to let remaining Span instances be sent in case the service is about to shutdown.

@tedsuo tedsuo removed the Agreed Issues that the group agreed on. label Apr 8, 2019
@tedsuo
Copy link
Contributor

tedsuo commented Apr 8, 2019

We need to gather use cases to better understand if Close and/or Flush should be on the Tracer interface.

Main use case:

  • Shutdown code

@tedsuo tedsuo added Deferred Feature This will be addressed in a future version and removed Action Required labels Apr 9, 2019
@bogdandrutu bogdandrutu removed their assignment Apr 10, 2019
@bogdandrutu
Copy link
Member

We do have a shutdown method on the SDK. I think the shutdown belongs to the implementation that is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deferred Feature This will be addressed in a future version
Projects
None yet
Development

No branches or pull requests

3 participants