opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
Rename `go.opentelemetry.io/contrib/processors/baggage/baggagetrace`
- The
go.opentelemetry.io/contrib/processors/baggage/baggagetracepackage sits on thego.opentelemetry.io/contrib/processors/*prefix. This package prefix will need to be used for log processors as well. - The
baggagetracepackage name is not descriptive of the functionality it provides. A name indicating the package provides aSpanProcessorthat will copy baggage values into a span should be used instead.
Proposal
- Copy the package to a new package under the new
processors/spandirectory
- Use
processors/spanand notprocessors/traceas this is for aSpanProcessor
- Rename the package to one of:
go.opentelemetry.io/contrib/processors/span/bagcpgo.opentelemetry.io/contrib/processors/span/bagcopygo.opentelemetry.io/contrib/processors/span/baggagecpgo.opentelemetry.io/contrib/processors/span/baggagecopy
- Deprecate
go.opentelemetry.io/contrib/processors/baggage/baggagetracein favor of the new package.
I would go for go.opentelemetry.io/contrib/processors/span/baggagecopy. The long import path shouldn't matter much (and we have longer ones), and it's the clearest name.
May not be ideal to split on type. There may be the case where a baggage span processor and log processor are needed.
Instead: go.opentelemetry.io/contrib/processors/baggagecopy and then have NewSpanProcessor and add in the future NewLogProcessor.