From e3e19fcad495d1158180350c0c8472aae7a8ed9c Mon Sep 17 00:00:00 2001 From: csuzhang Date: Thu, 10 Jun 2021 20:52:33 +0800 Subject: [PATCH 1/2] document if Shutdown was called on the specific implementation --- sdk/trace/batch_span_processor.go | 3 ++- sdk/trace/simple_span_processor.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/trace/batch_span_processor.go b/sdk/trace/batch_span_processor.go index db873c16f52..881de1b0839 100644 --- a/sdk/trace/batch_span_processor.go +++ b/sdk/trace/batch_span_processor.go @@ -153,7 +153,8 @@ func (bsp *batchSpanProcessor) Shutdown(ctx context.Context) error { return err } -// ForceFlush exports all ended spans that have not yet been exported. +// ForceFlush does a flush if some data is buffered, and +// exports all ended spans that have not yet been exported. func (bsp *batchSpanProcessor) ForceFlush(ctx context.Context) error { var err error if bsp.e != nil { diff --git a/sdk/trace/simple_span_processor.go b/sdk/trace/simple_span_processor.go index 9dc87f893b9..8105c717299 100644 --- a/sdk/trace/simple_span_processor.go +++ b/sdk/trace/simple_span_processor.go @@ -97,7 +97,8 @@ func (ssp *simpleSpanProcessor) Shutdown(ctx context.Context) error { return err } -// ForceFlush does nothing as there is no data to flush. +// ForceFlush has no need to be called in SimpleSpanProcessor +// as there is no data to flush. func (ssp *simpleSpanProcessor) ForceFlush(context.Context) error { return nil } From ac4f462eb8c3f711be76e78af2372ab6a153d240 Mon Sep 17 00:00:00 2001 From: zhyChesterCheung Date: Thu, 10 Jun 2021 21:26:55 +0800 Subject: [PATCH 2/2] add CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae0eccd125e..1db953aca27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package has been updated to accept a `string` instead of an `attribute.Key` type. (#1931) - The `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package has been updated to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931) - The `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package has been updated to accept a `string` instead of an `attribute.Key` type. (#1931) +- Changed documentation about if `Shutdown` was called on the specific implementation. (#1694) ### Deprecated