Skip to content

Fixed OTLP example's accidental early close of exporter #807

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

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

dcwangmit01
Copy link
Contributor

  • The exp.Stop() as argument to handleErr is getting executed
    immediately. Wrap this with an anonymous func so that this
    argument is executed when the defer statement is activated.
  • From the "Tour of Go" docs on Defer: "The deferred call's arguments
    are evaluated immediately, but the function call is not executed
    until the surrounding function returns."

* The exp.Stop() as argument to handleErr is getting executed
  immediately.  Wrap this with an anonymous func so that this
  argument is executed when the defer statement is activated.
* From the "Tour of Go" docs on Defer: "The deferred call's arguments
  are evaluated immediately, but the function call is not executed
  until the surrounding function returns."
@MrAlias MrAlias merged commit c58680a into open-telemetry:master Jun 9, 2020
@pellared pellared added this to the untracked milestone Nov 8, 2024
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