Skip to content

Commit 93fa590

Browse files
authored
Merge branch 'main' into http-status-omit-message-status-code
2 parents 545e324 + 9c305bd commit 93fa590

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
3838
- `SamplingResult.TraceState` is correctly propagated to a newly created
3939
span's `SpanContext`. (#1655)
4040
- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626)
41+
- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678)
4142

4243
### Fixed
4344
- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681)

example/otel-collector/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func initProvider() func() {
9090
handleErr(cont.Start(context.Background()), "failed to start controller")
9191

9292
return func() {
93-
// Shutdown will flush any remaining spans.
94-
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")
95-
9693
// Push any last metric events to the exporter.
9794
handleErr(cont.Stop(context.Background()), "failed to stop controller")
95+
96+
// Shutdown will flush any remaining spans and shut down the exporter.
97+
handleErr(tracerProvider.Shutdown(ctx), "failed to shutdown TracerProvider")
9898
}
9999
}
100100

0 commit comments

Comments
 (0)