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
@ -19,6 +19,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/internal/global"
|
||||
)
|
||||
|
||||
// simpleSpanProcessor is a SpanProcessor that synchronously sends all
|
||||
@ -43,6 +44,8 @@ func NewSimpleSpanProcessor(exporter SpanExporter) SpanProcessor {
|
||||
ssp := &simpleSpanProcessor{
|
||||
exporter: exporter,
|
||||
}
|
||||
global.Warn("SimpleSpanProcessor is not recommended for production use, consider using BatchSpanProcessor instead.")
|
||||
|
||||
return ssp
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user