1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-02-03 13:11:53 +02:00

Update example/otel-collector/main.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Stefan Prisca 2020-05-12 13:04:22 +02:00 committed by GitHub
parent 41ca31f31a
commit a09fd990c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,10 @@ func main() {
log.Fatalf("Failed to create the collector exporter: %v", err)
}
defer func() {
_ = exp.Stop()
err := exp.Stop()
if err != nil {
log.Fatalf("Failed to stop the exporter: %v", err)
}
}()
tp, err := sdktrace.NewProvider(