You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +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:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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") | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user