1
0
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:
Eduardo Bonzi da Conceição
2023-03-24 12:29:52 -03:00
committed by GitHub
parent de497def87
commit b73a33c487
2 changed files with 4 additions and 0 deletions

View File

@ -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
}