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

ZipkinExporter shutdown #1153

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

esigo
Copy link
Member

@esigo esigo commented Dec 19, 2021

Fixes ZipkinExporter shutdown

Changes

ZipkinExporter shutdown should set shutdown before return

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@esigo esigo requested a review from a team December 19, 2021 12:08
@codecov
Copy link

codecov bot commented Dec 19, 2021

Codecov Report

Merging #1153 (8ba7ecc) into main (7b9132c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1153   +/-   ##
=======================================
  Coverage   93.39%   93.39%           
=======================================
  Files         165      165           
  Lines        6229     6229           
=======================================
  Hits         5817     5817           
  Misses        412      412           

@ThomsonTan ThomsonTan merged commit 3701a6e into open-telemetry:main Dec 20, 2021
@esigo esigo deleted the ZipkinExporter-shutdown branch December 20, 2021 17:50
@@ -98,6 +98,12 @@ void ZipkinExporter::InitializeLocalEndpoint()
local_end_point_["port"] = url_parser_.port_;
}

bool ZipkinExporter::Shutdown(std::chrono::microseconds timeout) noexcept
{
isShutdown_ = true;
Copy link
Member

@lalitb lalitb Dec 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to PR, but probably we need to discuss if this should be an atomic operation to protect against Shutdown() and Export() called from separate threads. While specs don't allow Export() to be called concurrently ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#exportbatch ), it doesn't talk about Export() and Shutdown().

This is valid to all exporters, and not blocking this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree it should be protected somehow.

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.

3 participants