Skip to content

Commit

Permalink
Merge pull request #807 from dcwangmit01/fix-otlp-example
Browse files Browse the repository at this point in the history
Fixed OTLP example's accidental early close of exporter
  • Loading branch information
MrAlias authored Jun 9, 2020
2 parents a98bb97 + ce49579 commit c58680a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/otlp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func initProvider() (*otlp.Exporter, *push.Controller) {

func main() {
exp, pusher := initProvider()
defer handleErr(exp.Stop(), "Failed to stop exporter")
defer func() { handleErr(exp.Stop(), "Failed to stop exporter") }()
defer pusher.Stop() // pushes any last exports to the receiver

tracer := global.Tracer("mage-sense")
Expand Down

0 comments on commit c58680a

Please sign in to comment.