1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-30 21:20:04 +02:00

Flush metric events prior to shutdown in OTLP example (#1678)

* Flush metric events prior to shutdown in OTLP example

* Add changes to changelog
This commit is contained in:
Tyler Yahn 2021-03-10 08:19:59 -08:00 committed by GitHub
parent 66b1135af4
commit 9c305bde9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -38,6 +38,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- `SamplingResult.TraceState` is correctly propagated to a newly created
span's `SpanContext`. (#1655)
- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626)
- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678)
## [0.18.0] - 2020-03-03

View File

@ -90,11 +90,11 @@ func initProvider() func() {
handleErr(cont.Start(context.Background()), "failed to start controller")
return func() {
// Shutdown will flush any remaining spans.
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")
// Push any last metric events to the exporter.
handleErr(cont.Stop(context.Background()), "failed to stop controller")
// Shutdown will flush any remaining spans and shut down the exporter.
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")
}
}