shutdown tracer provider first

Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
This commit is contained in:
Yingrong Zhao
2022-09-06 11:26:31 -04:00
parent 1869fa9db2
commit 57206f9dfb
2 changed files with 8 additions and 8 deletions

View File

@ -109,12 +109,12 @@ func newTracingExporter(ctx context.Context, cfg *Config) (*tracingExporter, err
}
func (te *tracingExporter) Close(ctx context.Context) {
if te.exporter != nil {
te.exporter.Shutdown(ctx)
}
if te.provider != nil {
te.provider.Shutdown(ctx)
}
if te.exporter != nil {
te.exporter.Shutdown(ctx)
}
}
func determineSampler(samplingRate int) tracesdk.Sampler {