You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-25 00:16:49 +02:00
Warn on intitialization of Simple SpanProcessor (#3854)
* add warning log about using simpleSpanProcessor in production * add changelog entry * fix changelog * switch to using the new Warn logging function * revert alignment formatting in changelog --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
de497def87
commit
b73a33c487
@ -22,6 +22,7 @@ See our [versioning policy](VERSIONING.md) for more information about these stab
|
|||||||
Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849)
|
Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849)
|
||||||
- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895)
|
- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895)
|
||||||
- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900)
|
- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900)
|
||||||
|
- Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
|
"go.opentelemetry.io/otel/internal/global"
|
||||||
)
|
)
|
||||||
|
|
||||||
// simpleSpanProcessor is a SpanProcessor that synchronously sends all
|
// simpleSpanProcessor is a SpanProcessor that synchronously sends all
|
||||||
@ -43,6 +44,8 @@ func NewSimpleSpanProcessor(exporter SpanExporter) SpanProcessor {
|
|||||||
ssp := &simpleSpanProcessor{
|
ssp := &simpleSpanProcessor{
|
||||||
exporter: exporter,
|
exporter: exporter,
|
||||||
}
|
}
|
||||||
|
global.Warn("SimpleSpanProcessor is not recommended for production use, consider using BatchSpanProcessor instead.")
|
||||||
|
|
||||||
return ssp
|
return ssp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user